diff --git a/.codeclimate.yml b/.codeclimate.yml index e628bb023..d959270c8 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -2,6 +2,10 @@ engines: eslint: enabled: true + tslint: + enabled: true + channel: beta + config: tslint.json ratings: paths: - "src/**.js" @@ -14,7 +18,7 @@ ratings: - "lib/path/**.js" - "lib/pool/**.js" - "lib/utf8/**.js" - - "**.md" + - "**/*.d.ts" exclude_paths: - "dist/**" - "**/tests/**" diff --git a/README.md b/README.md index 953968cf7..24dbcbf78 100644 --- a/README.md +++ b/README.md @@ -346,7 +346,7 @@ Documentation * [Frequently asked questions](https://github.com/dcodeIO/protobuf.js/wiki) on our wiki #### Community -* [Questions and answers](http://stackoverflow.com/questions/tagged/protobuf.js) on StackOverflow +* [Questions and answers](http://stackoverflow.com/search?q=protobuf.js) on StackOverflow Command line ------------ diff --git a/index.d.ts b/index.d.ts index 332deb494..2ccf20e21 100644 --- a/index.d.ts +++ b/index.d.ts @@ -27,7 +27,7 @@ export class Class { * @param {*} [ctor] Custom constructor to set up, defaults to create a generic one if omitted * @returns {Message} Message prototype */ - static create(type: Type, ctor?: any): Message; + public static create(type: Type, ctor?: any): Message; /** * Creates a new message of this type from a plain object. Also converts values to their respective internal types. @@ -36,7 +36,7 @@ export class Class { * @param {Object.} object Plain object * @returns {Message} Message instance */ - fromObject(object: { [k: string]: any }): Message; + public fromObject(object: { [k: string]: any }): Message; /** * Creates a new message of this type from a plain object. Also converts values to their respective internal types. @@ -46,7 +46,7 @@ export class Class { * @param {Object.} object Plain object * @returns {Message} Message instance */ - from(object: { [k: string]: any }): Message; + public from(object: { [k: string]: any }): Message; /** * Creates a plain object from a message of this type. Also converts values to other types if specified. @@ -56,7 +56,7 @@ export class Class { * @param {ConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - toObject(message: Message, options?: ConversionOptions): { [k: string]: any }; + public toObject(message: Message, options?: ConversionOptions): { [k: string]: any }; /** * Encodes a message of this type. @@ -66,7 +66,7 @@ export class Class { * @param {Writer} [writer] Writer to use * @returns {Writer} Writer */ - encode(message: (Message|Object), writer?: Writer): Writer; + public encode(message: (Message|Object), writer?: Writer): Writer; /** * Encodes a message of this type preceeded by its length as a varint. @@ -76,7 +76,7 @@ export class Class { * @param {Writer} [writer] Writer to use * @returns {Writer} Writer */ - encodeDelimited(message: (Message|Object), writer?: Writer): Writer; + public encodeDelimited(message: (Message|Object), writer?: Writer): Writer; /** * Decodes a message of this type. @@ -85,7 +85,7 @@ export class Class { * @param {Reader|Uint8Array} reader Reader or buffer to decode * @returns {Message} Decoded message */ - decode(reader: (Reader|Uint8Array)): Message; + public decode(reader: (Reader|Uint8Array)): Message; /** * Decodes a message of this type preceeded by its length as a varint. @@ -94,7 +94,7 @@ export class Class { * @param {Reader|Uint8Array} reader Reader or buffer to decode * @returns {Message} Decoded message */ - decodeDelimited(reader: (Reader|Uint8Array)): Message; + public decodeDelimited(reader: (Reader|Uint8Array)): Message; /** * Verifies a message of this type. @@ -103,7 +103,7 @@ export class Class { * @param {Message|Object} message Message or plain object to verify * @returns {?string} `null` if valid, otherwise the reason why it is not */ - verify(message: (Message|Object)): string; + public verify(message: (Message|Object)): string; } /** @@ -189,19 +189,19 @@ export class Enum extends ReflectionObject { * Enum values by id. * @type {Object.} */ - valuesById: { [k: number]: string }; + public valuesById: { [k: number]: string }; /** * Enum values by name. * @type {Object.} */ - values: { [k: string]: number }; + public values: { [k: string]: number }; /** * Value comment texts, if any. * @type {Object.} */ - comments: { [k: string]: string }; + public comments: { [k: string]: string }; /** * Creates an enum from JSON. @@ -210,7 +210,7 @@ export class Enum extends ReflectionObject { * @returns {Enum} Created enum * @throws {TypeError} If arguments are invalid */ - static fromJSON(name: string, json: { [k: string]: any }): Enum; + public static fromJSON(name: string, json: { [k: string]: any }): Enum; /** * Adds a value to this enum. @@ -221,7 +221,7 @@ export class Enum extends ReflectionObject { * @throws {TypeError} If arguments are invalid * @throws {Error} If there is already a value with this name or id */ - add(name: string, id: number, comment: string): Enum; + public add(name: string, id: number, comment: string): Enum; /** * Removes a value from this enum @@ -230,7 +230,7 @@ export class Enum extends ReflectionObject { * @throws {TypeError} If arguments are invalid * @throws {Error} If `name` is not a name of this enum */ - remove(name: string): Enum; + public remove(name: string): Enum; } /** @@ -265,103 +265,103 @@ export class Field extends ReflectionObject { * Field rule, if any. * @type {string|undefined} */ - rule?: string; + public rule?: string; /** * Field type. * @type {string} */ - type: string; + public type: string; /** * Unique field id. * @type {number} */ - id: number; + public id: number; /** * Extended type if different from parent. * @type {string|undefined} */ - extend?: string; + public extend?: string; /** * Whether this field is required. * @type {boolean} */ - required: boolean; + public required: boolean; /** * Whether this field is optional. * @type {boolean} */ - optional: boolean; + public optional: boolean; /** * Whether this field is repeated. * @type {boolean} */ - repeated: boolean; + public repeated: boolean; /** * Whether this field is a map or not. * @type {boolean} */ - map: boolean; + public map: boolean; /** * Message this field belongs to. * @type {?Type} */ - message: Type; + public message: Type; /** * OneOf this field belongs to, if any, * @type {?OneOf} */ - partOf: OneOf; + public partOf: OneOf; /** * The field type's default value. * @type {*} */ - typeDefault: any; + public typeDefault: any; /** * The field's default value on prototypes. * @type {*} */ - defaultValue: any; + public defaultValue: any; /** * Whether this field's value should be treated as a long. * @type {boolean} */ - long: boolean; + public long: boolean; /** * Whether this field's value is a buffer. * @type {boolean} */ - bytes: boolean; + public bytes: boolean; /** * Resolved type if not a basic type. * @type {?(Type|Enum)} */ - resolvedType: (Type|Enum); + public resolvedType: (Type|Enum); /** * Sister-field within the extended type if a declaring extension field. * @type {?Field} */ - extensionField: Field; + public extensionField: Field; /** * Sister-field within the declaring namespace if an extended field. * @type {?Field} */ - declaringField: Field; + public declaringField: Field; /** * Determines whether this field is packed. Only relevant when repeated and working with proto2. @@ -369,7 +369,7 @@ export class Field extends ReflectionObject { * @type {boolean} * @readonly */ - readonly packed: boolean; + public readonly packed: boolean; /** * Constructs a field from JSON. @@ -378,14 +378,14 @@ export class Field extends ReflectionObject { * @returns {Field} Created field * @throws {TypeError} If arguments are invalid */ - static fromJSON(name: string, json: { [k: string]: any }): Field; + public static fromJSON(name: string, json: { [k: string]: any }): Field; /** * Resolves this field's type references. * @returns {Field} `this` * @throws {Error} If any reference cannot be resolved */ - resolve(): Field; + public resolve(): Field; } /** @@ -472,8 +472,9 @@ export function loadSync(filename: (string|string[]), root?: Root): Root; * Build type, one of `"full"`, `"light"` or `"minimal"`. * @name build * @type {string} + * @const */ -export var build: string; +export const build: string; /** * Named roots. @@ -490,7 +491,7 @@ export var build: string; * // in any subsequent module: * var root = protobuf.roots["myroot"]; */ -export var roots: { [k: string]: Root }; +export let roots: { [k: string]: Root }; /** * Reconfigures the library according to the environment. @@ -528,13 +529,13 @@ export class MapField extends Field { * Key type. * @type {string} */ - keyType: string; + public keyType: string; /** * Resolved key type if not a basic type. * @type {?ReflectionObject} */ - resolvedKeyType: ReflectionObject; + public resolvedKeyType: ReflectionObject; /** * Constructs a map field from JSON. @@ -543,7 +544,7 @@ export class MapField extends Field { * @returns {MapField} Created map field * @throws {TypeError} If arguments are invalid */ - static fromJSON(name: string, json: { [k: string]: any }): MapField; + public static fromJSON(name: string, json: { [k: string]: any }): MapField; } /** @@ -574,7 +575,7 @@ export class Message { * @type {Type} * @readonly */ - static readonly $type: Type; + public static readonly $type: Type; /** * Reference to the reflected type. @@ -582,7 +583,7 @@ export class Message { * @type {Type} * @readonly */ - readonly $type: Type; + public readonly $type: Type; /** * Encodes a message of this type. @@ -590,7 +591,7 @@ export class Message { * @param {Writer} [writer] Writer to use * @returns {Writer} Writer */ - static encode(message: (Message|Object), writer?: Writer): Writer; + public static encode(message: (Message|Object), writer?: Writer): Writer; /** * Encodes a message of this type preceeded by its length as a varint. @@ -598,7 +599,7 @@ export class Message { * @param {Writer} [writer] Writer to use * @returns {Writer} Writer */ - static encodeDelimited(message: (Message|Object), writer?: Writer): Writer; + public static encodeDelimited(message: (Message|Object), writer?: Writer): Writer; /** * Decodes a message of this type. @@ -607,7 +608,7 @@ export class Message { * @param {Reader|Uint8Array} reader Reader or buffer to decode * @returns {Message} Decoded message */ - static decode(reader: (Reader|Uint8Array)): Message; + public static decode(reader: (Reader|Uint8Array)): Message; /** * Decodes a message of this type preceeded by its length as a varint. @@ -616,7 +617,7 @@ export class Message { * @param {Reader|Uint8Array} reader Reader or buffer to decode * @returns {Message} Decoded message */ - static decodeDelimited(reader: (Reader|Uint8Array)): Message; + public static decodeDelimited(reader: (Reader|Uint8Array)): Message; /** * Verifies a message of this type. @@ -625,14 +626,14 @@ export class Message { * @param {Message|Object} message Message or plain object to verify * @returns {?string} `null` if valid, otherwise the reason why it is not */ - static verify(message: (Message|Object)): string; + public static verify(message: (Message|Object)): string; /** * Creates a new message of this type from a plain object. Also converts values to their respective internal types. * @param {Object.} object Plain object * @returns {Message} Message instance */ - static fromObject(object: { [k: string]: any }): Message; + public static fromObject(object: { [k: string]: any }): Message; /** * Creates a new message of this type from a plain object. Also converts values to their respective internal types. @@ -641,7 +642,7 @@ export class Message { * @param {Object.} object Plain object * @returns {Message} Message instance */ - static from(object: { [k: string]: any }): Message; + public static from(object: { [k: string]: any }): Message; /** * Creates a plain object from a message of this type. Also converts values to other types if specified. @@ -649,20 +650,20 @@ export class Message { * @param {ConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - static toObject(message: Message, options?: ConversionOptions): { [k: string]: any }; + public static toObject(message: Message, options?: ConversionOptions): { [k: string]: any }; /** * Creates a plain object from this message. Also converts values to other types if specified. * @param {ConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - toObject(options?: ConversionOptions): { [k: string]: any }; + public toObject(options?: ConversionOptions): { [k: string]: any }; /** * Converts this message to JSON. * @returns {Object.} JSON object */ - toJSON(): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } /** @@ -699,43 +700,43 @@ export class Method extends ReflectionObject { * Method type. * @type {string} */ - type: string; + public type: string; /** * Request type. * @type {string} */ - requestType: string; + public requestType: string; /** * Whether requests are streamed or not. * @type {boolean|undefined} */ - requestStream?: boolean; + public requestStream?: boolean; /** * Response type. * @type {string} */ - responseType: string; + public responseType: string; /** * Whether responses are streamed or not. * @type {boolean|undefined} */ - responseStream?: boolean; + public responseStream?: boolean; /** * Resolved request type. * @type {?Type} */ - resolvedRequestType: Type; + public resolvedRequestType: Type; /** * Resolved response type. * @type {?Type} */ - resolvedResponseType: Type; + public resolvedResponseType: Type; /** * Constructs a service method from JSON. @@ -744,7 +745,7 @@ export class Method extends ReflectionObject { * @returns {Method} Created method * @throws {TypeError} If arguments are invalid */ - static fromJSON(name: string, json: { [k: string]: any }): Method; + public static fromJSON(name: string, json: { [k: string]: any }): Method; } /** @@ -778,7 +779,7 @@ export class Namespace extends NamespaceBase { * @returns {Namespace} Created namespace * @throws {TypeError} If arguments are invalid */ - static fromJSON(name: string, json: { [k: string]: any }): Namespace; + public static fromJSON(name: string, json: { [k: string]: any }): Namespace; /** * Converts an array of reflection objects to JSON. @@ -786,7 +787,7 @@ export class Namespace extends NamespaceBase { * @param {ReflectionObject[]} array Object array * @returns {Object.|undefined} JSON object or `undefined` when array is empty */ - static arrayToJSON(array: ReflectionObject[]): ({ [k: string]: any }|undefined); + public static arrayToJSON(array: ReflectionObject[]): ({ [k: string]: any }|undefined); } /** @@ -806,7 +807,7 @@ export abstract class NamespaceBase extends ReflectionObject { * Nested objects by name. * @type {Object.|undefined} */ - nested?: { [k: string]: ReflectionObject }; + public nested?: { [k: string]: ReflectionObject }; /** * Nested objects of this namespace as an array for iteration. @@ -814,21 +815,21 @@ export abstract class NamespaceBase extends ReflectionObject { * @type {ReflectionObject[]} * @readonly */ - readonly nestedArray: ReflectionObject[]; + public readonly nestedArray: ReflectionObject[]; /** * Adds nested elements to this namespace from JSON. * @param {Object.} nestedJson Nested JSON * @returns {Namespace} `this` */ - addJSON(nestedJson: { [k: string]: any }): Namespace; + public addJSON(nestedJson: { [k: string]: any }): Namespace; /** * Gets the nested object of the specified name. * @param {string} name Nested object name * @returns {?ReflectionObject} The reflection object or `null` if it doesn't exist */ - get(name: string): ReflectionObject; + public get(name: string): ReflectionObject; /** * Gets the values of the nested {@link Enum|enum} of the specified name. @@ -837,7 +838,7 @@ export abstract class NamespaceBase extends ReflectionObject { * @returns {Object.} Enum values * @throws {Error} If there is no such enum */ - getEnum(name: string): { [k: string]: number }; + public getEnum(name: string): { [k: string]: number }; /** * Adds a nested object to this namespace. @@ -846,7 +847,7 @@ export abstract class NamespaceBase extends ReflectionObject { * @throws {TypeError} If arguments are invalid * @throws {Error} If there is already a nested object with this name */ - add(object: ReflectionObject): Namespace; + public add(object: ReflectionObject): Namespace; /** * Removes a nested object from this namespace. @@ -855,7 +856,7 @@ export abstract class NamespaceBase extends ReflectionObject { * @throws {TypeError} If arguments are invalid * @throws {Error} If `object` is not a member of this namespace */ - remove(object: ReflectionObject): Namespace; + public remove(object: ReflectionObject): Namespace; /** * Defines additial namespaces within this one if not yet existing. @@ -863,13 +864,13 @@ export abstract class NamespaceBase extends ReflectionObject { * @param {*} [json] Nested types to create from JSON * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty */ - define(path: (string|string[]), json?: any): Namespace; + public define(path: (string|string[]), json?: any): Namespace; /** * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree, but comes at a cost. * @returns {Namespace} `this` */ - resolveAll(): Namespace; + public resolveAll(): Namespace; /** * Looks up the reflection object at the specified path, relative to this namespace. @@ -878,7 +879,7 @@ export abstract class NamespaceBase extends ReflectionObject { * @param {boolean} [parentAlreadyChecked=false] If known, whether the parent has already been checked * @returns {?ReflectionObject} Looked up object or `null` if none could be found */ - lookup(path: (string|string[]), filterType: () => any, parentAlreadyChecked?: boolean): ReflectionObject; + public lookup(path: (string|string[]), filterType: () => any, parentAlreadyChecked?: boolean): ReflectionObject; /** * Looks up the reflection object at the specified path, relative to this namespace. @@ -889,7 +890,7 @@ export abstract class NamespaceBase extends ReflectionObject { * @returns {?ReflectionObject} Looked up object or `null` if none could be found * @variation 2 */ - lookup(path: (string|string[]), parentAlreadyChecked?: boolean): ReflectionObject; + public lookup(path: (string|string[]), parentAlreadyChecked?: boolean): ReflectionObject; /** * Looks up the {@link Type|type} at the specified path, relative to this namespace. @@ -898,7 +899,7 @@ export abstract class NamespaceBase extends ReflectionObject { * @returns {Type} Looked up type * @throws {Error} If `path` does not point to a type */ - lookupType(path: (string|string[])): Type; + public lookupType(path: (string|string[])): Type; /** * Looks up the {@link Service|service} at the specified path, relative to this namespace. @@ -907,7 +908,7 @@ export abstract class NamespaceBase extends ReflectionObject { * @returns {Service} Looked up service * @throws {Error} If `path` does not point to a service */ - lookupService(path: (string|string[])): Service; + public lookupService(path: (string|string[])): Service; /** * Looks up the values of the {@link Enum|enum} at the specified path, relative to this namespace. @@ -916,7 +917,7 @@ export abstract class NamespaceBase extends ReflectionObject { * @returns {Object.} Enum values * @throws {Error} If `path` does not point to an enum */ - lookupEnum(path: (string|string[])): { [k: string]: number }; + public lookupEnum(path: (string|string[])): { [k: string]: number }; } /** @@ -933,37 +934,37 @@ export abstract class ReflectionObject { * Options. * @type {Object.|undefined} */ - options?: { [k: string]: any }; + public options?: { [k: string]: any }; /** * Unique name within its namespace. * @type {string} */ - name: string; + public name: string; /** * Parent namespace. * @type {?Namespace} */ - parent: Namespace; + public parent: Namespace; /** * Whether already resolved or not. * @type {boolean} */ - resolved: boolean; + public resolved: boolean; /** * Comment text, if any. * @type {?string} */ - comment: string; + public comment: string; /** * Defining file name. * @type {?string} */ - filename: string; + public filename: string; /** * Reference to the root namespace. @@ -971,7 +972,7 @@ export abstract class ReflectionObject { * @type {Root} * @readonly */ - readonly root: Root; + public readonly root: Root; /** * Full name including leading dot. @@ -979,41 +980,41 @@ export abstract class ReflectionObject { * @type {string} * @readonly */ - readonly fullName: string; + public readonly fullName: string; /** * Converts this reflection object to its JSON representation. * @returns {Object.} JSON object * @abstract */ - toJSON(): { [k: string]: any }; + public toJSON(): { [k: string]: any }; /** * Called when this object is added to a parent. * @param {ReflectionObject} parent Parent added to * @returns {undefined} */ - onAdd(parent: ReflectionObject): void; + public onAdd(parent: ReflectionObject): void; /** * Called when this object is removed from a parent. * @param {ReflectionObject} parent Parent removed from * @returns {undefined} */ - onRemove(parent: ReflectionObject): void; + public onRemove(parent: ReflectionObject): void; /** * Resolves this objects type references. * @returns {ReflectionObject} `this` */ - resolve(): ReflectionObject; + public resolve(): ReflectionObject; /** * Gets an option value. * @param {string} name Option name * @returns {*} Option value or `undefined` if not set */ - getOption(name: string): any; + public getOption(name: string): any; /** * Sets an option. @@ -1022,7 +1023,7 @@ export abstract class ReflectionObject { * @param {boolean} [ifNotSet] Sets the option only if it isn't currently set * @returns {ReflectionObject} `this` */ - setOption(name: string, value: any, ifNotSet?: boolean): ReflectionObject; + public setOption(name: string, value: any, ifNotSet?: boolean): ReflectionObject; /** * Sets multiple options. @@ -1030,13 +1031,13 @@ export abstract class ReflectionObject { * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set * @returns {ReflectionObject} `this` */ - setOptions(options: { [k: string]: any }, ifNotSet?: boolean): ReflectionObject; + public setOptions(options: { [k: string]: any }, ifNotSet?: boolean): ReflectionObject; /** * Converts this instance to its string representation. * @returns {string} Class name[, space, full name] */ - toString(): string; + public toString(): string; } /** @@ -1065,14 +1066,14 @@ export class OneOf extends ReflectionObject { * Field names that belong to this oneof. * @type {string[]} */ - oneof: string[]; + public oneof: string[]; /** * Fields that belong to this oneof as an array for iteration. * @type {Field[]} * @readonly */ - readonly fieldsArray: Field[]; + public readonly fieldsArray: Field[]; /** * Constructs a oneof from JSON. @@ -1081,21 +1082,21 @@ export class OneOf extends ReflectionObject { * @returns {MapField} Created oneof * @throws {TypeError} If arguments are invalid */ - static fromJSON(name: string, json: { [k: string]: any }): MapField; + public static fromJSON(name: string, json: { [k: string]: any }): MapField; /** * Adds a field to this oneof and removes it from its current parent, if any. * @param {Field} field Field to add * @returns {OneOf} `this` */ - add(field: Field): OneOf; + public add(field: Field): OneOf; /** * Removes a field from this oneof and puts it back to the oneof's parent. * @param {Field} field Field to remove * @returns {OneOf} `this` */ - remove(field: Field): OneOf; + public remove(field: Field): OneOf; } /** @@ -1163,19 +1164,19 @@ export class Reader { * Read buffer. * @type {Uint8Array} */ - buf: Uint8Array; + public buf: Uint8Array; /** * Read buffer position. * @type {number} */ - pos: number; + public pos: number; /** * Read buffer length. * @type {number} */ - len: number; + public len: number; /** * Creates a new reader using the specified buffer. @@ -1184,26 +1185,26 @@ export class Reader { * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader} * @throws {Error} If `buffer` is not a valid buffer */ - static create(buffer: (Uint8Array|Buffer)): (Reader|BufferReader); + public static create(buffer: (Uint8Array|Buffer)): (Reader|BufferReader); /** * Reads a varint as an unsigned 32 bit value. * @function * @returns {number} Value read */ - uint32(): number; + public uint32(): number; /** * Reads a varint as a signed 32 bit value. * @returns {number} Value read */ - int32(): number; + public int32(): number; /** * Reads a zig-zag encoded varint as a signed 32 bit value. * @returns {number} Value read */ - sint32(): number; + public sint32(): number; /** * Reads a varint as a signed 64 bit value. @@ -1211,7 +1212,7 @@ export class Reader { * @function * @returns {Long|number} Value read */ - int64(): (Long|number); + public int64(): (Long|number); /** * Reads a varint as an unsigned 64 bit value. @@ -1219,7 +1220,7 @@ export class Reader { * @function * @returns {Long|number} Value read */ - uint64(): (Long|number); + public uint64(): (Long|number); /** * Reads a zig-zag encoded varint as a signed 64 bit value. @@ -1227,25 +1228,25 @@ export class Reader { * @function * @returns {Long|number} Value read */ - sint64(): (Long|number); + public sint64(): (Long|number); /** * Reads a varint as a boolean. * @returns {boolean} Value read */ - bool(): boolean; + public bool(): boolean; /** * Reads fixed 32 bits as an unsigned 32 bit integer. * @returns {number} Value read */ - fixed32(): number; + public fixed32(): number; /** * Reads fixed 32 bits as a signed 32 bit integer. * @returns {number} Value read */ - sfixed32(): number; + public sfixed32(): number; /** * Reads fixed 64 bits. @@ -1253,7 +1254,7 @@ export class Reader { * @function * @returns {Long|number} Value read */ - fixed64(): (Long|number); + public fixed64(): (Long|number); /** * Reads zig-zag encoded fixed 64 bits. @@ -1261,47 +1262,47 @@ export class Reader { * @function * @returns {Long|number} Value read */ - sfixed64(): (Long|number); + public sfixed64(): (Long|number); /** * Reads a float (32 bit) as a number. * @function * @returns {number} Value read */ - float(): number; + public float(): number; /** * Reads a double (64 bit float) as a number. * @function * @returns {number} Value read */ - double(): number; + public double(): number; /** * Reads a sequence of bytes preceeded by its length as a varint. * @returns {Uint8Array} Value read */ - bytes(): Uint8Array; + public bytes(): Uint8Array; /** * Reads a string preceeded by its byte length as a varint. * @returns {string} Value read */ - string(): string; + public string(): string; /** * Skips the specified number of bytes if specified, otherwise skips a varint. * @param {number} [length] Length if known, otherwise a varint is assumed * @returns {Reader} `this` */ - skip(length?: number): Reader; + public skip(length?: number): Reader; /** * Skips the next element of the specified wire type. * @param {number} wireType Wire type received * @returns {Reader} `this` */ - skipType(wireType: number): Reader; + public skipType(wireType: number): Reader; } /** @@ -1327,7 +1328,7 @@ export class BufferReader extends Reader { * @name BufferReader#buf * @type {Buffer} */ - buf: Buffer; + public buf: Buffer; /** * Reads a sequence of bytes preceeded by its length as a varint. @@ -1335,7 +1336,7 @@ export class BufferReader extends Reader { * @function * @returns {Buffer} Value read */ - bytes(): Buffer; + public bytes(): Buffer; } /** @@ -1360,13 +1361,13 @@ export class Root extends NamespaceBase { * Deferred extension fields. * @type {Field[]} */ - deferred: Field[]; + public deferred: Field[]; /** * Resolved file names of loaded files. * @type {string[]} */ - files: string[]; + public files: string[]; /** * Loads a JSON definition into a root namespace. @@ -1374,7 +1375,7 @@ export class Root extends NamespaceBase { * @param {Root} [root] Root namespace, defaults to create a new one if omitted * @returns {Root} Root namespace */ - static fromJSON(json: { [k: string]: any }, root?: Root): Root; + public static fromJSON(json: { [k: string]: any }, root?: Root): Root; /** * Resolves the path of an imported file, relative to the importing origin. @@ -1384,7 +1385,7 @@ export class Root extends NamespaceBase { * @param {string} target The file name being imported * @returns {?string} Resolved path to `target` or `null` to skip the file */ - resolvePath(origin: string, target: string): string; + public resolvePath(origin: string, target: string): string; /** * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback. @@ -1393,7 +1394,7 @@ export class Root extends NamespaceBase { * @param {LoadCallback} callback Callback function * @returns {undefined} */ - load(filename: (string|string[]), options: ParseOptions, callback: LoadCallback): void; + public load(filename: (string|string[]), options: ParseOptions, callback: LoadCallback): void; /** * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise. @@ -1404,7 +1405,7 @@ export class Root extends NamespaceBase { * @returns {Promise} Promise * @variation 3 */ - load(filename: (string|string[]), options?: ParseOptions): Promise; + public load(filename: (string|string[]), options?: ParseOptions): Promise; /** * Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace (node only). @@ -1415,7 +1416,7 @@ export class Root extends NamespaceBase { * @returns {Root} Root namespace * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid */ - loadSync(filename: (string|string[]), options?: ParseOptions): Root; + public loadSync(filename: (string|string[]), options?: ParseOptions): Root; } /** @@ -1488,19 +1489,19 @@ export namespace rpc { * RPC implementation. Becomes `null` once the service is ended. * @type {?RPCImpl} */ - rpcImpl: RPCImpl; + public rpcImpl: RPCImpl; /** * Whether requests are length-delimited. * @type {boolean} */ - requestDelimited: boolean; + public requestDelimited: boolean; /** * Whether responses are length-delimited. * @type {boolean} */ - responseDelimited: boolean; + public responseDelimited: boolean; /** * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}. @@ -1511,14 +1512,14 @@ export namespace rpc { * @param {rpc.ServiceMethodCallback} callback Service callback * @returns {undefined} */ - rpcCall(method: (Method|rpc.ServiceMethod), requestCtor: () => any, responseCtor: () => any, request: (Message|Object), callback: rpc.ServiceMethodCallback): void; + public rpcCall(method: (Method|rpc.ServiceMethod), requestCtor: () => any, responseCtor: () => any, request: (Message|Object), callback: rpc.ServiceMethodCallback): void; /** * Ends this service and emits the `end` event. * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation. * @returns {rpc.Service} `this` */ - end(endedByRPC?: boolean): rpc.Service; + public end(endedByRPC?: boolean): rpc.Service; } } @@ -1577,7 +1578,7 @@ export class Service extends NamespaceBase { * Service methods. * @type {Object.} */ - methods: { [k: string]: Method }; + public methods: { [k: string]: Method }; /** * Constructs a service from JSON. @@ -1586,7 +1587,7 @@ export class Service extends NamespaceBase { * @returns {Service} Created service * @throws {TypeError} If arguments are invalid */ - static fromJSON(name: string, json: { [k: string]: any }): Service; + public static fromJSON(name: string, json: { [k: string]: any }): Service; /** * Methods of this service as an array for iteration. @@ -1594,7 +1595,7 @@ export class Service extends NamespaceBase { * @type {Method[]} * @readonly */ - readonly methodsArray: Method[]; + public readonly methodsArray: Method[]; /** * Creates a runtime service using the specified rpc implementation. @@ -1603,7 +1604,7 @@ export class Service extends NamespaceBase { * @param {boolean} [responseDelimited=false] Whether responses are length-delimited * @returns {rpc.Service} RPC service. Useful where requests and/or responses are streamed. */ - create(rpcImpl: RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): rpc.Service; + public create(rpcImpl: RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): rpc.Service; } /** @@ -1652,31 +1653,31 @@ export class Type extends NamespaceBase { * @param {Object.} json JSON object * @returns {Type} Created message type */ - static fromJSON(name: string, json: { [k: string]: any }): Type; + public static fromJSON(name: string, json: { [k: string]: any }): Type; /** * Message fields. * @type {Object.} */ - fields: { [k: string]: Field }; + public fields: { [k: string]: Field }; /** * Oneofs declared within this namespace, if any. * @type {Object.} */ - oneofs: { [k: string]: OneOf }; + public oneofs: { [k: string]: OneOf }; /** * Extension ranges, if any. * @type {number[][]} */ - extensions: number[][]; + public extensions: number[][]; /** * Reserved ranges, if any. * @type {Array.} */ - reserved: (number[]|string)[]; + public reserved: (number[]|string)[]; /** * Message fields by id. @@ -1684,7 +1685,7 @@ export class Type extends NamespaceBase { * @type {Object.} * @readonly */ - readonly fieldsById: { [k: number]: Field }; + public readonly fieldsById: { [k: number]: Field }; /** * Fields of this message as an array for iteration. @@ -1692,7 +1693,7 @@ export class Type extends NamespaceBase { * @type {Field[]} * @readonly */ - readonly fieldsArray: Field[]; + public readonly fieldsArray: Field[]; /** * Oneofs of this message as an array for iteration. @@ -1700,14 +1701,14 @@ export class Type extends NamespaceBase { * @type {OneOf[]} * @readonly */ - readonly oneofsArray: OneOf[]; + public readonly oneofsArray: OneOf[]; /** * The registered constructor, if any registered, otherwise a generic constructor. * @name Type#ctor * @type {Class} */ - ctor: Class; + public ctor: Class; /** * Adds a nested object to this type. @@ -1716,7 +1717,7 @@ export class Type extends NamespaceBase { * @throws {TypeError} If arguments are invalid * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id */ - add(object: ReflectionObject): Type; + public add(object: ReflectionObject): Type; /** * Removes a nested object from this type. @@ -1725,34 +1726,34 @@ export class Type extends NamespaceBase { * @throws {TypeError} If arguments are invalid * @throws {Error} If `object` is not a member of this type */ - remove(object: ReflectionObject): Type; + public remove(object: ReflectionObject): Type; /** * Tests if the specified id is reserved. * @param {number} id Id to test * @returns {boolean} `true` if reserved, otherwise `false` */ - isReservedId(id: number): boolean; + public isReservedId(id: number): boolean; /** * Tests if the specified name is reserved. * @param {string} name Name to test * @returns {boolean} `true` if reserved, otherwise `false` */ - isReservedName(name: string): boolean; + public isReservedName(name: string): boolean; /** * Creates a new message of this type using the specified properties. * @param {Object.} [properties] Properties to set * @returns {Message} Runtime message */ - create(properties?: { [k: string]: any }): Message; + public create(properties?: { [k: string]: any }): Message; /** * Sets up {@link Type#encode|encode}, {@link Type#decode|decode} and {@link Type#verify|verify}. * @returns {Type} `this` */ - setup(): Type; + public setup(): Type; /** * Encodes a message of this type. Does not implicitly {@link Type#verify|verify} messages. @@ -1760,7 +1761,7 @@ export class Type extends NamespaceBase { * @param {Writer} [writer] Writer to encode to * @returns {Writer} writer */ - encode(message: (Message|Object), writer?: Writer): Writer; + public encode(message: (Message|Object), writer?: Writer): Writer; /** * Encodes a message of this type preceeded by its byte length as a varint. Does not implicitly {@link Type#verify|verify} messages. @@ -1768,7 +1769,7 @@ export class Type extends NamespaceBase { * @param {Writer} [writer] Writer to encode to * @returns {Writer} writer */ - encodeDelimited(message: (Message|Object), writer?: Writer): Writer; + public encodeDelimited(message: (Message|Object), writer?: Writer): Writer; /** * Decodes a message of this type. @@ -1778,7 +1779,7 @@ export class Type extends NamespaceBase { * @throws {Error} If the payload is not a reader or valid buffer * @throws {util.ProtocolError} If required fields are missing */ - decode(reader: (Reader|Uint8Array), length?: number): Message; + public decode(reader: (Reader|Uint8Array), length?: number): Message; /** * Decodes a message of this type preceeded by its byte length as a varint. @@ -1787,21 +1788,21 @@ export class Type extends NamespaceBase { * @throws {Error} If the payload is not a reader or valid buffer * @throws {util.ProtocolError} If required fields are missing */ - decodeDelimited(reader: (Reader|Uint8Array)): Message; + public decodeDelimited(reader: (Reader|Uint8Array)): Message; /** * Verifies that field values are valid and that required fields are present. * @param {Message|Object} message Message to verify * @returns {?string} `null` if valid, otherwise the reason why it is not */ - verify(message: (Message|Object)): string; + public verify(message: (Message|Object)): string; /** * Creates a new message of this type from a plain object. Also converts values to their respective internal types. * @param {Object.} object Plain object * @returns {Message} Message instance */ - fromObject(object: { [k: string]: any }): Message; + public fromObject(object: { [k: string]: any }): Message; /** * Creates a new message of this type from a plain object. Also converts values to their respective internal types. @@ -1810,7 +1811,7 @@ export class Type extends NamespaceBase { * @param {Object.} object Plain object * @returns {Message} Message instance */ - from(object: { [k: string]: any }): Message; + public from(object: { [k: string]: any }): Message; /** * Creates a plain object from a message of this type. Also converts values to other types if specified. @@ -1818,7 +1819,7 @@ export class Type extends NamespaceBase { * @param {ConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - toObject(message: Message, options?: ConversionOptions): { [k: string]: any }; + public toObject(message: Message, options?: ConversionOptions): { [k: string]: any }; } /** @@ -1872,7 +1873,7 @@ export namespace types { * @property {number} string=2 Ldelim wire type * @property {number} bytes=2 Ldelim wire type */ - var basic: { + let basic: { "double": number, "float": number, "int32": number, @@ -1910,7 +1911,7 @@ export namespace types { * @property {Array.} bytes=Array(0) Bytes default * @property {Message} message=null Message default */ - var defaults: { + let defaults: { "double": number, "float": number, "int32": number, @@ -1938,7 +1939,7 @@ export namespace types { * @property {number} fixed64=1 Fixed64 wire type * @property {number} sfixed64=1 Fixed64 wire type */ - var long: { + let long: { "int64": number, "uint64": number, "sint64": number, @@ -1962,7 +1963,7 @@ export namespace types { * @property {number} bool=0 Varint wire type * @property {number} string=2 Ldelim wire type */ - var mapKey: { + let mapKey: { "int32": number, "uint32": number, "sint32": number, @@ -1994,7 +1995,7 @@ export namespace types { * @property {number} sfixed64=1 Fixed64 wire type * @property {number} bool=0 Varint wire type */ - var packed: { + let packed: { "double": number, "float": number, "int32": number, @@ -2057,86 +2058,86 @@ export namespace util { * Low bits. * @type {number} */ - lo: number; + public lo: number; /** * High bits. * @type {number} */ - hi: number; + public hi: number; /** * Zero bits. * @memberof util.LongBits * @type {util.LongBits} */ - static zero: util.LongBits; + public static zero: util.LongBits; /** * Zero hash. * @memberof util.LongBits * @type {string} */ - static zeroHash: string; + public static zeroHash: string; /** * Constructs new long bits from the specified number. * @param {number} value Value * @returns {util.LongBits} Instance */ - static fromNumber(value: number): util.LongBits; + public static fromNumber(value: number): util.LongBits; /** * Constructs new long bits from a number, long or string. * @param {Long|number|string} value Value * @returns {util.LongBits} Instance */ - static from(value: (Long|number|string)): util.LongBits; + public static from(value: (Long|number|string)): util.LongBits; /** * Converts this long bits to a possibly unsafe JavaScript number. * @param {boolean} [unsigned=false] Whether unsigned or not * @returns {number} Possibly unsafe number */ - toNumber(unsigned?: boolean): number; + public toNumber(unsigned?: boolean): number; /** * Converts this long bits to a long. * @param {boolean} [unsigned=false] Whether unsigned or not * @returns {Long} Long */ - toLong(unsigned?: boolean): Long; + public toLong(unsigned?: boolean): Long; /** * Constructs new long bits from the specified 8 characters long hash. * @param {string} hash Hash * @returns {util.LongBits} Bits */ - static fromHash(hash: string): util.LongBits; + public static fromHash(hash: string): util.LongBits; /** * Converts this long bits to a 8 characters long hash. * @returns {string} Hash */ - toHash(): string; + public toHash(): string; /** * Zig-zag encodes this long bits. * @returns {util.LongBits} `this` */ - zzEncode(): util.LongBits; + public zzEncode(): util.LongBits; /** * Zig-zag decodes this long bits. * @returns {util.LongBits} `this` */ - zzDecode(): util.LongBits; + public zzDecode(): util.LongBits; /** * Calculates the length of this longbits when encoded as a varint. * @returns {number} Length */ - length(): number; + public length(): number; } /** @@ -2144,20 +2145,20 @@ export namespace util { * @memberof util * @type {Array.<*>} */ - var emptyArray: any[]; + let emptyArray: any[]; /** * An immutable empty object. * @type {Object} */ - var emptyObject: Object; + let emptyObject: Object; /** * Whether running within node or not. * @memberof util * @type {boolean} */ - var isNode: boolean; + let isNode: boolean; /** * Tests if the specified value is an integer. @@ -2185,7 +2186,7 @@ export namespace util { * Node's Buffer class if available. * @type {?function(new: Buffer)} */ - var Buffer: () => any; + let Buffer: () => any; /** * Creates a new buffer of whatever type supported by the environment. @@ -2198,31 +2199,31 @@ export namespace util { * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`. * @type {?function(new: Uint8Array, *)} */ - var Array: () => any; + let Array: () => any; /** * Long.js's Long class if available. * @type {?function(new: Long)} */ - var Long: () => any; + let Long: () => any; /** * Regular expression used to verify 2 bit (`bool`) map keys. * @type {RegExp} */ - var key2Re: RegExp; + let key2Re: RegExp; /** * Regular expression used to verify 32 bit (`int32` etc.) map keys. * @type {RegExp} */ - var key32Re: RegExp; + let key32Re: RegExp; /** * Regular expression used to verify 64 bit (`int64` etc.) map keys. * @type {RegExp} */ - var key64Re: RegExp; + let key64Re: RegExp; /** * Converts a number or long to an 8 characters long hash string. @@ -2281,7 +2282,7 @@ export namespace util { * Default conversion options used for toJSON implementations. Converts longs, enums and bytes to strings. * @type {ConversionOptions} */ - var toJSONOptions: ConversionOptions; + let toJSONOptions: ConversionOptions; /** * Constructs a new protocol error. @@ -2323,14 +2324,14 @@ export namespace util { * So far decoded message instance, if applicable. * @type {?Message} */ - instance: Message; + public instance: Message; } /** * Node's fs module if available. * @type {Object.} */ - var fs: { [k: string]: any }; + let fs: { [k: string]: any }; /** * Converts an object's values to an array. @@ -2440,7 +2441,7 @@ export namespace util { * @param {*} [ctx] Listener context * @returns {util.EventEmitter} `this` */ - on(evt: string, fn: () => any, ctx?: any): util.EventEmitter; + public on(evt: string, fn: () => any, ctx?: any): util.EventEmitter; /** * Removes an event listener or any matching listeners if arguments are omitted. @@ -2448,7 +2449,7 @@ export namespace util { * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted. * @returns {util.EventEmitter} `this` */ - off(evt?: string, fn?: () => any): util.EventEmitter; + public off(evt?: string, fn?: () => any): util.EventEmitter; /** * Emits an event by calling its listeners with the specified arguments. @@ -2456,7 +2457,7 @@ export namespace util { * @param {...*} args Arguments * @returns {util.EventEmitter} `this` */ - emit(evt: string, ...args: any[]): util.EventEmitter; + public emit(evt: string, ...args: any[]): util.EventEmitter; } /** @@ -2600,39 +2601,39 @@ export class Writer { * Current length. * @type {number} */ - len: number; + public len: number; /** * Operations head. * @type {Object} */ - head: Object; + public head: Object; /** * Operations tail * @type {Object} */ - tail: Object; + public tail: Object; /** * Linked forked states. * @type {?Object} */ - states: Object; + public states: Object; /** * Creates a new writer. * @function * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer} */ - static create(): (BufferWriter|Writer); + public static create(): (BufferWriter|Writer); /** * Allocates a buffer of the specified size. * @param {number} size Buffer size * @returns {Uint8Array} Buffer */ - static alloc(size: number): Uint8Array; + public static alloc(size: number): Uint8Array; /** * Pushes a new operation to the queue. @@ -2641,14 +2642,14 @@ export class Writer { * @param {number} val Value to write * @returns {Writer} `this` */ - push(fn: () => any, len: number, val: number): Writer; + public push(fn: () => any, len: number, val: number): Writer; /** * Writes an unsigned 32 bit value as a varint. * @param {number} value Value to write * @returns {Writer} `this` */ - uint32(value: number): Writer; + public uint32(value: number): Writer; /** * Writes a signed 32 bit value as a varint. @@ -2656,14 +2657,14 @@ export class Writer { * @param {number} value Value to write * @returns {Writer} `this` */ - int32(value: number): Writer; + public int32(value: number): Writer; /** * Writes a 32 bit value as a varint, zig-zag encoded. * @param {number} value Value to write * @returns {Writer} `this` */ - sint32(value: number): Writer; + public sint32(value: number): Writer; /** * Writes an unsigned 64 bit value as a varint. @@ -2671,7 +2672,7 @@ export class Writer { * @returns {Writer} `this` * @throws {TypeError} If `value` is a string and no long library is present. */ - uint64(value: (Long|number|string)): Writer; + public uint64(value: (Long|number|string)): Writer; /** * Writes a signed 64 bit value as a varint. @@ -2680,7 +2681,7 @@ export class Writer { * @returns {Writer} `this` * @throws {TypeError} If `value` is a string and no long library is present. */ - int64(value: (Long|number|string)): Writer; + public int64(value: (Long|number|string)): Writer; /** * Writes a signed 64 bit value as a varint, zig-zag encoded. @@ -2688,21 +2689,21 @@ export class Writer { * @returns {Writer} `this` * @throws {TypeError} If `value` is a string and no long library is present. */ - sint64(value: (Long|number|string)): Writer; + public sint64(value: (Long|number|string)): Writer; /** * Writes a boolish value as a varint. * @param {boolean} value Value to write * @returns {Writer} `this` */ - bool(value: boolean): Writer; + public bool(value: boolean): Writer; /** * Writes an unsigned 32 bit value as fixed 32 bits. * @param {number} value Value to write * @returns {Writer} `this` */ - fixed32(value: number): Writer; + public fixed32(value: number): Writer; /** * Writes a signed 32 bit value as fixed 32 bits. @@ -2710,7 +2711,7 @@ export class Writer { * @param {number} value Value to write * @returns {Writer} `this` */ - sfixed32(value: number): Writer; + public sfixed32(value: number): Writer; /** * Writes an unsigned 64 bit value as fixed 64 bits. @@ -2718,7 +2719,7 @@ export class Writer { * @returns {Writer} `this` * @throws {TypeError} If `value` is a string and no long library is present. */ - fixed64(value: (Long|number|string)): Writer; + public fixed64(value: (Long|number|string)): Writer; /** * Writes a signed 64 bit value as fixed 64 bits. @@ -2727,7 +2728,7 @@ export class Writer { * @returns {Writer} `this` * @throws {TypeError} If `value` is a string and no long library is present. */ - sfixed64(value: (Long|number|string)): Writer; + public sfixed64(value: (Long|number|string)): Writer; /** * Writes a float (32 bit). @@ -2735,7 +2736,7 @@ export class Writer { * @param {number} value Value to write * @returns {Writer} `this` */ - float(value: number): Writer; + public float(value: number): Writer; /** * Writes a double (64 bit float). @@ -2743,46 +2744,46 @@ export class Writer { * @param {number} value Value to write * @returns {Writer} `this` */ - double(value: number): Writer; + public double(value: number): Writer; /** * Writes a sequence of bytes. * @param {Uint8Array|string} value Buffer or base64 encoded string to write * @returns {Writer} `this` */ - bytes(value: (Uint8Array|string)): Writer; + public bytes(value: (Uint8Array|string)): Writer; /** * Writes a string. * @param {string} value Value to write * @returns {Writer} `this` */ - string(value: string): Writer; + public string(value: string): Writer; /** * Forks this writer's state by pushing it to a stack. * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state. * @returns {Writer} `this` */ - fork(): Writer; + public fork(): Writer; /** * Resets this instance to the last state. * @returns {Writer} `this` */ - reset(): Writer; + public reset(): Writer; /** * Resets to the last state and appends the fork state's current write length as a varint followed by its operations. * @returns {Writer} `this` */ - ldelim(): Writer; + public ldelim(): Writer; /** * Finishes the write operation. * @returns {Uint8Array} Finished buffer */ - finish(): Uint8Array; + public finish(): Uint8Array; } /** @@ -2806,7 +2807,7 @@ export class BufferWriter extends Writer { * @param {number} size Buffer size * @returns {Buffer} Buffer */ - static alloc(size: number): Buffer; + public static alloc(size: number): Buffer; /** * Finishes the write operation. @@ -2814,7 +2815,7 @@ export class BufferWriter extends Writer { * @function * @returns {Buffer} Finished buffer */ - finish(): Buffer; + public finish(): Buffer; } /** diff --git a/lib/codegen/test.ts b/lib/codegen/test.ts index e573524c6..12cc6a2d9 100644 --- a/lib/codegen/test.ts +++ b/lib/codegen/test.ts @@ -1,4 +1,4 @@ import codegen from "."; -var cg = codegen("f", "a") - ("s", "a"); \ No newline at end of file +let cg = codegen("f", "a") + ("s", "a"); diff --git a/lib/eventemitter/index.d.ts b/lib/eventemitter/index.d.ts index f17782385..6aee91edd 100644 --- a/lib/eventemitter/index.d.ts +++ b/lib/eventemitter/index.d.ts @@ -23,7 +23,7 @@ declare class EventEmitter { * @param {*} [ctx] Listener context * @returns {util.EventEmitter} `this` */ - on(evt: string, fn: () => any, ctx?: any): EventEmitter; + public on(evt: string, fn: () => any, ctx?: any): EventEmitter; /** * Removes an event listener or any matching listeners if arguments are omitted. @@ -31,7 +31,7 @@ declare class EventEmitter { * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted. * @returns {util.EventEmitter} `this` */ - off(evt?: string, fn?: () => any): EventEmitter; + public off(evt?: string, fn?: () => any): EventEmitter; /** * Emits an event by calling its listeners with the specified arguments. @@ -39,5 +39,5 @@ declare class EventEmitter { * @param {...*} args Arguments * @returns {util.EventEmitter} `this` */ - emit(evt: string, ...args: any[]): EventEmitter; + public emit(evt: string, ...args: any[]): EventEmitter; } diff --git a/lib/fetch/index.d.ts b/lib/fetch/index.d.ts index ab0820cdf..5655fc4a7 100644 --- a/lib/fetch/index.d.ts +++ b/lib/fetch/index.d.ts @@ -20,7 +20,7 @@ type FetchCallback = (error: Error, contents?: string) => void; interface FetchOptions { binary?: boolean; - xhr?: boolean + xhr?: boolean; } /** diff --git a/lib/tsd-jsdoc/publish.js b/lib/tsd-jsdoc/publish.js index 22c124420..0d3cc5a0e 100644 --- a/lib/tsd-jsdoc/publish.js +++ b/lib/tsd-jsdoc/publish.js @@ -463,14 +463,13 @@ function handleMember(element, parent) { } else { if (isClassLike(parent)) { - if (element.access) - write(element.access, " "); + write(element.access || "public", " "); if (element.scope === "static") write("static "); if (element.readonly) write("readonly "); } else - write(element.kind === "constant" ? "const " : "var "); + write(element.kind === "constant" ? "const " : "let "); write(element.name); if (element.optional) @@ -498,8 +497,7 @@ function handleFunction(element, parent, isConstructor) { } else { begin(element); if (isClassLike(parent)) { - if (element.access) - write(element.access, " "); + write(element.access || "public", " "); if (element.scope === "static") write("static "); } else diff --git a/package.json b/package.json index ed4996401..d098c7942 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "coverage": "istanbul cover node_modules/tape/bin/tape tests/*.js tests/node/*.js", "coverage-ci": "npm run coverage && codeclimate-test-reporter < coverage/lcov.info", "docs": "jsdoc -c jsdoc.docs.json -R README.md --verbose --pedantic", - "lint": "eslint **/*.js", + "lint": "eslint **/*.js && tslint **/*.d.ts -e **/node_modules/** -t stylish", "pages": "node scripts/pages", "prepublish": "node scripts/prepublish", "postinstall": "node scripts/postinstall", @@ -86,6 +86,7 @@ "tap-spec": "^4.1.1", "tape": "^4.6.3", "tmp": "0.0.31", + "tslint": "^4.5.1", "typescript": "^2.2.1", "uglify-js": "^2.8.5", "vinyl-buffer": "^1.0.0", diff --git a/src/index-minimal.js b/src/index-minimal.js index 750d286b1..136211841 100644 --- a/src/index-minimal.js +++ b/src/index-minimal.js @@ -5,6 +5,7 @@ var protobuf = exports; * Build type, one of `"full"`, `"light"` or `"minimal"`. * @name build * @type {string} + * @const */ protobuf.build = "minimal"; diff --git a/tests/comp_typescript.ts b/tests/comp_typescript.ts index 649638799..9ad41b10d 100644 --- a/tests/comp_typescript.ts +++ b/tests/comp_typescript.ts @@ -7,7 +7,7 @@ export const proto = { value: { rule: "required", type: "string", - id:1 + id: 1 } } } @@ -21,18 +21,18 @@ export class Hello extends protobuf.Message { super(properties); } - foo() { + public foo() { this["value"] = "hi"; return this; } } protobuf.Class.create(root.lookupType("Hello"), Hello); -var hello = new Hello(); +let hello = new Hello(); -var buf = Hello.encode(hello.foo()).finish(); +let buf = Hello.encode(hello.foo()).finish(); -var hello2 = Hello.decode(buf) as Hello; -console.log(hello2.foo().toObject()); +let hello2 = Hello.decode(buf) as Hello; +process.stdout.write(JSON.stringify(hello2.foo().toObject(), null, 2)); -export var utf8 = protobuf.util.utf8; +export const utf8 = protobuf.util.utf8; diff --git a/tests/data/rpc.d.ts b/tests/data/rpc.d.ts index f494ed123..a7686be1d 100644 --- a/tests/data/rpc.d.ts +++ b/tests/data/rpc.d.ts @@ -2,41 +2,41 @@ import * as $protobuf from "../.."; export class MyService extends $protobuf.rpc.Service { constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): MyService; - myMethod(request: (MyRequest|Object), callback: MyService_myMethod_Callback): void; - myMethod(request: (MyRequest|Object)): Promise; + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): MyService; + public myMethod(request: (MyRequest|Object), callback: MyService_myMethod_Callback): void; + public myMethod(request: (MyRequest|Object)): Promise; } type MyService_myMethod_Callback = (error: Error, response?: MyResponse) => void; export class MyRequest { constructor(properties?: Object); - path?: string; - static create(properties?: Object): MyRequest; - static encode(message: (MyRequest|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (MyRequest|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): MyRequest; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): MyRequest; - static verify(message: (MyRequest|Object)): string; - static fromObject(object: { [k: string]: any }): MyRequest; - static from(object: { [k: string]: any }): MyRequest; - static toObject(message: MyRequest, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public path?: string; + public static create(properties?: Object): MyRequest; + public static encode(message: (MyRequest|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (MyRequest|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): MyRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): MyRequest; + public static verify(message: (MyRequest|Object)): string; + public static fromObject(object: { [k: string]: any }): MyRequest; + public static from(object: { [k: string]: any }): MyRequest; + public static toObject(message: MyRequest, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } export class MyResponse { constructor(properties?: Object); - status?: number; - static create(properties?: Object): MyResponse; - static encode(message: (MyResponse|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (MyResponse|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): MyResponse; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): MyResponse; - static verify(message: (MyResponse|Object)): string; - static fromObject(object: { [k: string]: any }): MyResponse; - static from(object: { [k: string]: any }): MyResponse; - static toObject(message: MyResponse, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public status?: number; + public static create(properties?: Object): MyResponse; + public static encode(message: (MyResponse|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (MyResponse|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): MyResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): MyResponse; + public static verify(message: (MyResponse|Object)): string; + public static fromObject(object: { [k: string]: any }): MyResponse; + public static from(object: { [k: string]: any }): MyResponse; + public static toObject(message: MyResponse, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } diff --git a/tests/data/rpc.ts b/tests/data/rpc.ts index fb3913f66..ac755d1b1 100644 --- a/tests/data/rpc.ts +++ b/tests/data/rpc.ts @@ -1,2 +1 @@ -/// import * as test from "./rpc.js"; diff --git a/tests/data/test.d.ts b/tests/data/test.d.ts index dd399f187..d0db4d57a 100644 --- a/tests/data/test.d.ts +++ b/tests/data/test.d.ts @@ -6,17 +6,17 @@ export namespace jspb { class Empty { constructor(properties?: Object); - static create(properties?: Object): jspb.test.Empty; - static encode(message: (jspb.test.Empty|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (jspb.test.Empty|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.Empty; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.Empty; - static verify(message: (jspb.test.Empty|Object)): string; - static fromObject(object: { [k: string]: any }): jspb.test.Empty; - static from(object: { [k: string]: any }): jspb.test.Empty; - static toObject(message: jspb.test.Empty, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public static create(properties?: Object): jspb.test.Empty; + public static encode(message: (jspb.test.Empty|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (jspb.test.Empty|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.Empty; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.Empty; + public static verify(message: (jspb.test.Empty|Object)): string; + public static fromObject(object: { [k: string]: any }): jspb.test.Empty; + public static from(object: { [k: string]: any }): jspb.test.Empty; + public static toObject(message: jspb.test.Empty, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } enum OuterEnum { @@ -26,254 +26,254 @@ export namespace jspb { class EnumContainer { constructor(properties?: Object); - outerEnum?: number; - static create(properties?: Object): jspb.test.EnumContainer; - static encode(message: (jspb.test.EnumContainer|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (jspb.test.EnumContainer|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.EnumContainer; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.EnumContainer; - static verify(message: (jspb.test.EnumContainer|Object)): string; - static fromObject(object: { [k: string]: any }): jspb.test.EnumContainer; - static from(object: { [k: string]: any }): jspb.test.EnumContainer; - static toObject(message: jspb.test.EnumContainer, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public outerEnum?: number; + public static create(properties?: Object): jspb.test.EnumContainer; + public static encode(message: (jspb.test.EnumContainer|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (jspb.test.EnumContainer|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.EnumContainer; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.EnumContainer; + public static verify(message: (jspb.test.EnumContainer|Object)): string; + public static fromObject(object: { [k: string]: any }): jspb.test.EnumContainer; + public static from(object: { [k: string]: any }): jspb.test.EnumContainer; + public static toObject(message: jspb.test.EnumContainer, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } class Simple1 { constructor(properties?: Object); - aString: string; - aRepeatedString?: string[]; - aBoolean?: boolean; - static create(properties?: Object): jspb.test.Simple1; - static encode(message: (jspb.test.Simple1|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (jspb.test.Simple1|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.Simple1; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.Simple1; - static verify(message: (jspb.test.Simple1|Object)): string; - static fromObject(object: { [k: string]: any }): jspb.test.Simple1; - static from(object: { [k: string]: any }): jspb.test.Simple1; - static toObject(message: jspb.test.Simple1, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public aString: string; + public aRepeatedString?: string[]; + public aBoolean?: boolean; + public static create(properties?: Object): jspb.test.Simple1; + public static encode(message: (jspb.test.Simple1|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (jspb.test.Simple1|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.Simple1; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.Simple1; + public static verify(message: (jspb.test.Simple1|Object)): string; + public static fromObject(object: { [k: string]: any }): jspb.test.Simple1; + public static from(object: { [k: string]: any }): jspb.test.Simple1; + public static toObject(message: jspb.test.Simple1, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } class Simple2 { constructor(properties?: Object); - aString: string; - aRepeatedString?: string[]; - static create(properties?: Object): jspb.test.Simple2; - static encode(message: (jspb.test.Simple2|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (jspb.test.Simple2|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.Simple2; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.Simple2; - static verify(message: (jspb.test.Simple2|Object)): string; - static fromObject(object: { [k: string]: any }): jspb.test.Simple2; - static from(object: { [k: string]: any }): jspb.test.Simple2; - static toObject(message: jspb.test.Simple2, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public aString: string; + public aRepeatedString?: string[]; + public static create(properties?: Object): jspb.test.Simple2; + public static encode(message: (jspb.test.Simple2|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (jspb.test.Simple2|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.Simple2; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.Simple2; + public static verify(message: (jspb.test.Simple2|Object)): string; + public static fromObject(object: { [k: string]: any }): jspb.test.Simple2; + public static from(object: { [k: string]: any }): jspb.test.Simple2; + public static toObject(message: jspb.test.Simple2, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } class SpecialCases { constructor(properties?: Object); - normal: string; - default: string; - function: string; - var: string; - static create(properties?: Object): jspb.test.SpecialCases; - static encode(message: (jspb.test.SpecialCases|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (jspb.test.SpecialCases|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.SpecialCases; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.SpecialCases; - static verify(message: (jspb.test.SpecialCases|Object)): string; - static fromObject(object: { [k: string]: any }): jspb.test.SpecialCases; - static from(object: { [k: string]: any }): jspb.test.SpecialCases; - static toObject(message: jspb.test.SpecialCases, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public normal: string; + public default: string; + public function: string; + public var: string; + public static create(properties?: Object): jspb.test.SpecialCases; + public static encode(message: (jspb.test.SpecialCases|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (jspb.test.SpecialCases|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.SpecialCases; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.SpecialCases; + public static verify(message: (jspb.test.SpecialCases|Object)): string; + public static fromObject(object: { [k: string]: any }): jspb.test.SpecialCases; + public static from(object: { [k: string]: any }): jspb.test.SpecialCases; + public static toObject(message: jspb.test.SpecialCases, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } class OptionalFields { constructor(properties?: Object); - aString?: string; - aBool: boolean; - aNestedMessage?: jspb.test.OptionalFields.Nested; - aRepeatedMessage?: jspb.test.OptionalFields.Nested[]; - aRepeatedString?: string[]; - static create(properties?: Object): jspb.test.OptionalFields; - static encode(message: (jspb.test.OptionalFields|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (jspb.test.OptionalFields|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.OptionalFields; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.OptionalFields; - static verify(message: (jspb.test.OptionalFields|Object)): string; - static fromObject(object: { [k: string]: any }): jspb.test.OptionalFields; - static from(object: { [k: string]: any }): jspb.test.OptionalFields; - static toObject(message: jspb.test.OptionalFields, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public aString?: string; + public aBool: boolean; + public aNestedMessage?: jspb.test.OptionalFields.Nested; + public aRepeatedMessage?: jspb.test.OptionalFields.Nested[]; + public aRepeatedString?: string[]; + public static create(properties?: Object): jspb.test.OptionalFields; + public static encode(message: (jspb.test.OptionalFields|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (jspb.test.OptionalFields|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.OptionalFields; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.OptionalFields; + public static verify(message: (jspb.test.OptionalFields|Object)): string; + public static fromObject(object: { [k: string]: any }): jspb.test.OptionalFields; + public static from(object: { [k: string]: any }): jspb.test.OptionalFields; + public static toObject(message: jspb.test.OptionalFields, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } namespace OptionalFields { class Nested { constructor(properties?: Object); - anInt?: number; - static create(properties?: Object): jspb.test.OptionalFields.Nested; - static encode(message: (jspb.test.OptionalFields.Nested|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (jspb.test.OptionalFields.Nested|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.OptionalFields.Nested; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.OptionalFields.Nested; - static verify(message: (jspb.test.OptionalFields.Nested|Object)): string; - static fromObject(object: { [k: string]: any }): jspb.test.OptionalFields.Nested; - static from(object: { [k: string]: any }): jspb.test.OptionalFields.Nested; - static toObject(message: jspb.test.OptionalFields.Nested, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public anInt?: number; + public static create(properties?: Object): jspb.test.OptionalFields.Nested; + public static encode(message: (jspb.test.OptionalFields.Nested|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (jspb.test.OptionalFields.Nested|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.OptionalFields.Nested; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.OptionalFields.Nested; + public static verify(message: (jspb.test.OptionalFields.Nested|Object)): string; + public static fromObject(object: { [k: string]: any }): jspb.test.OptionalFields.Nested; + public static from(object: { [k: string]: any }): jspb.test.OptionalFields.Nested; + public static toObject(message: jspb.test.OptionalFields.Nested, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } } class HasExtensions { constructor(properties?: Object); - str1?: string; - str2?: string; - str3?: string; - static create(properties?: Object): jspb.test.HasExtensions; - static encode(message: (jspb.test.HasExtensions|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (jspb.test.HasExtensions|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.HasExtensions; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.HasExtensions; - static verify(message: (jspb.test.HasExtensions|Object)): string; - static fromObject(object: { [k: string]: any }): jspb.test.HasExtensions; - static from(object: { [k: string]: any }): jspb.test.HasExtensions; - static toObject(message: jspb.test.HasExtensions, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public str1?: string; + public str2?: string; + public str3?: string; + public static create(properties?: Object): jspb.test.HasExtensions; + public static encode(message: (jspb.test.HasExtensions|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (jspb.test.HasExtensions|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.HasExtensions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.HasExtensions; + public static verify(message: (jspb.test.HasExtensions|Object)): string; + public static fromObject(object: { [k: string]: any }): jspb.test.HasExtensions; + public static from(object: { [k: string]: any }): jspb.test.HasExtensions; + public static toObject(message: jspb.test.HasExtensions, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } class Complex { constructor(properties?: Object); - aString: string; - anOutOfOrderBool: boolean; - aNestedMessage?: jspb.test.Complex.Nested; - aRepeatedMessage?: jspb.test.Complex.Nested[]; - aRepeatedString?: string[]; - static create(properties?: Object): jspb.test.Complex; - static encode(message: (jspb.test.Complex|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (jspb.test.Complex|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.Complex; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.Complex; - static verify(message: (jspb.test.Complex|Object)): string; - static fromObject(object: { [k: string]: any }): jspb.test.Complex; - static from(object: { [k: string]: any }): jspb.test.Complex; - static toObject(message: jspb.test.Complex, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public aString: string; + public anOutOfOrderBool: boolean; + public aNestedMessage?: jspb.test.Complex.Nested; + public aRepeatedMessage?: jspb.test.Complex.Nested[]; + public aRepeatedString?: string[]; + public static create(properties?: Object): jspb.test.Complex; + public static encode(message: (jspb.test.Complex|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (jspb.test.Complex|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.Complex; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.Complex; + public static verify(message: (jspb.test.Complex|Object)): string; + public static fromObject(object: { [k: string]: any }): jspb.test.Complex; + public static from(object: { [k: string]: any }): jspb.test.Complex; + public static toObject(message: jspb.test.Complex, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } namespace Complex { class Nested { constructor(properties?: Object); - anInt: number; - static create(properties?: Object): jspb.test.Complex.Nested; - static encode(message: (jspb.test.Complex.Nested|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (jspb.test.Complex.Nested|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.Complex.Nested; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.Complex.Nested; - static verify(message: (jspb.test.Complex.Nested|Object)): string; - static fromObject(object: { [k: string]: any }): jspb.test.Complex.Nested; - static from(object: { [k: string]: any }): jspb.test.Complex.Nested; - static toObject(message: jspb.test.Complex.Nested, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public anInt: number; + public static create(properties?: Object): jspb.test.Complex.Nested; + public static encode(message: (jspb.test.Complex.Nested|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (jspb.test.Complex.Nested|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.Complex.Nested; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.Complex.Nested; + public static verify(message: (jspb.test.Complex.Nested|Object)): string; + public static fromObject(object: { [k: string]: any }): jspb.test.Complex.Nested; + public static from(object: { [k: string]: any }): jspb.test.Complex.Nested; + public static toObject(message: jspb.test.Complex.Nested, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } } class OuterMessage { constructor(properties?: Object); - static create(properties?: Object): jspb.test.OuterMessage; - static encode(message: (jspb.test.OuterMessage|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (jspb.test.OuterMessage|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.OuterMessage; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.OuterMessage; - static verify(message: (jspb.test.OuterMessage|Object)): string; - static fromObject(object: { [k: string]: any }): jspb.test.OuterMessage; - static from(object: { [k: string]: any }): jspb.test.OuterMessage; - static toObject(message: jspb.test.OuterMessage, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public static create(properties?: Object): jspb.test.OuterMessage; + public static encode(message: (jspb.test.OuterMessage|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (jspb.test.OuterMessage|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.OuterMessage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.OuterMessage; + public static verify(message: (jspb.test.OuterMessage|Object)): string; + public static fromObject(object: { [k: string]: any }): jspb.test.OuterMessage; + public static from(object: { [k: string]: any }): jspb.test.OuterMessage; + public static toObject(message: jspb.test.OuterMessage, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } namespace OuterMessage { class Complex { constructor(properties?: Object); - innerComplexField?: number; - static create(properties?: Object): jspb.test.OuterMessage.Complex; - static encode(message: (jspb.test.OuterMessage.Complex|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (jspb.test.OuterMessage.Complex|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.OuterMessage.Complex; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.OuterMessage.Complex; - static verify(message: (jspb.test.OuterMessage.Complex|Object)): string; - static fromObject(object: { [k: string]: any }): jspb.test.OuterMessage.Complex; - static from(object: { [k: string]: any }): jspb.test.OuterMessage.Complex; - static toObject(message: jspb.test.OuterMessage.Complex, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public innerComplexField?: number; + public static create(properties?: Object): jspb.test.OuterMessage.Complex; + public static encode(message: (jspb.test.OuterMessage.Complex|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (jspb.test.OuterMessage.Complex|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.OuterMessage.Complex; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.OuterMessage.Complex; + public static verify(message: (jspb.test.OuterMessage.Complex|Object)): string; + public static fromObject(object: { [k: string]: any }): jspb.test.OuterMessage.Complex; + public static from(object: { [k: string]: any }): jspb.test.OuterMessage.Complex; + public static toObject(message: jspb.test.OuterMessage.Complex, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } } class IsExtension { constructor(properties?: Object); - ext1?: string; - static create(properties?: Object): jspb.test.IsExtension; - static encode(message: (jspb.test.IsExtension|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (jspb.test.IsExtension|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.IsExtension; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.IsExtension; - static verify(message: (jspb.test.IsExtension|Object)): string; - static fromObject(object: { [k: string]: any }): jspb.test.IsExtension; - static from(object: { [k: string]: any }): jspb.test.IsExtension; - static toObject(message: jspb.test.IsExtension, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public ext1?: string; + public static create(properties?: Object): jspb.test.IsExtension; + public static encode(message: (jspb.test.IsExtension|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (jspb.test.IsExtension|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.IsExtension; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.IsExtension; + public static verify(message: (jspb.test.IsExtension|Object)): string; + public static fromObject(object: { [k: string]: any }): jspb.test.IsExtension; + public static from(object: { [k: string]: any }): jspb.test.IsExtension; + public static toObject(message: jspb.test.IsExtension, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } class IndirectExtension { constructor(properties?: Object); - static create(properties?: Object): jspb.test.IndirectExtension; - static encode(message: (jspb.test.IndirectExtension|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (jspb.test.IndirectExtension|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.IndirectExtension; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.IndirectExtension; - static verify(message: (jspb.test.IndirectExtension|Object)): string; - static fromObject(object: { [k: string]: any }): jspb.test.IndirectExtension; - static from(object: { [k: string]: any }): jspb.test.IndirectExtension; - static toObject(message: jspb.test.IndirectExtension, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public static create(properties?: Object): jspb.test.IndirectExtension; + public static encode(message: (jspb.test.IndirectExtension|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (jspb.test.IndirectExtension|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.IndirectExtension; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.IndirectExtension; + public static verify(message: (jspb.test.IndirectExtension|Object)): string; + public static fromObject(object: { [k: string]: any }): jspb.test.IndirectExtension; + public static from(object: { [k: string]: any }): jspb.test.IndirectExtension; + public static toObject(message: jspb.test.IndirectExtension, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } class DefaultValues { constructor(properties?: Object); - stringField?: string; - boolField?: boolean; - intField?: (number|$protobuf.Long); - enumField?: number; - emptyField?: string; - bytesField?: Uint8Array; - static create(properties?: Object): jspb.test.DefaultValues; - static encode(message: (jspb.test.DefaultValues|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (jspb.test.DefaultValues|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.DefaultValues; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.DefaultValues; - static verify(message: (jspb.test.DefaultValues|Object)): string; - static fromObject(object: { [k: string]: any }): jspb.test.DefaultValues; - static from(object: { [k: string]: any }): jspb.test.DefaultValues; - static toObject(message: jspb.test.DefaultValues, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public stringField?: string; + public boolField?: boolean; + public intField?: (number|$protobuf.Long); + public enumField?: number; + public emptyField?: string; + public bytesField?: Uint8Array; + public static create(properties?: Object): jspb.test.DefaultValues; + public static encode(message: (jspb.test.DefaultValues|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (jspb.test.DefaultValues|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.DefaultValues; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.DefaultValues; + public static verify(message: (jspb.test.DefaultValues|Object)): string; + public static fromObject(object: { [k: string]: any }): jspb.test.DefaultValues; + public static from(object: { [k: string]: any }): jspb.test.DefaultValues; + public static toObject(message: jspb.test.DefaultValues, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } namespace DefaultValues { @@ -286,254 +286,254 @@ export namespace jspb { class FloatingPointFields { constructor(properties?: Object); - optionalFloatField?: number; - requiredFloatField: number; - repeatedFloatField?: number[]; - defaultFloatField?: number; - optionalDoubleField?: number; - requiredDoubleField: number; - repeatedDoubleField?: number[]; - defaultDoubleField?: number; - static create(properties?: Object): jspb.test.FloatingPointFields; - static encode(message: (jspb.test.FloatingPointFields|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (jspb.test.FloatingPointFields|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.FloatingPointFields; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.FloatingPointFields; - static verify(message: (jspb.test.FloatingPointFields|Object)): string; - static fromObject(object: { [k: string]: any }): jspb.test.FloatingPointFields; - static from(object: { [k: string]: any }): jspb.test.FloatingPointFields; - static toObject(message: jspb.test.FloatingPointFields, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public optionalFloatField?: number; + public requiredFloatField: number; + public repeatedFloatField?: number[]; + public defaultFloatField?: number; + public optionalDoubleField?: number; + public requiredDoubleField: number; + public repeatedDoubleField?: number[]; + public defaultDoubleField?: number; + public static create(properties?: Object): jspb.test.FloatingPointFields; + public static encode(message: (jspb.test.FloatingPointFields|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (jspb.test.FloatingPointFields|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.FloatingPointFields; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.FloatingPointFields; + public static verify(message: (jspb.test.FloatingPointFields|Object)): string; + public static fromObject(object: { [k: string]: any }): jspb.test.FloatingPointFields; + public static from(object: { [k: string]: any }): jspb.test.FloatingPointFields; + public static toObject(message: jspb.test.FloatingPointFields, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } class TestClone { constructor(properties?: Object); - str?: string; - simple1?: jspb.test.Simple1; - simple2?: jspb.test.Simple1[]; - bytesField?: Uint8Array; - unused?: string; - static create(properties?: Object): jspb.test.TestClone; - static encode(message: (jspb.test.TestClone|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (jspb.test.TestClone|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestClone; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestClone; - static verify(message: (jspb.test.TestClone|Object)): string; - static fromObject(object: { [k: string]: any }): jspb.test.TestClone; - static from(object: { [k: string]: any }): jspb.test.TestClone; - static toObject(message: jspb.test.TestClone, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public str?: string; + public simple1?: jspb.test.Simple1; + public simple2?: jspb.test.Simple1[]; + public bytesField?: Uint8Array; + public unused?: string; + public static create(properties?: Object): jspb.test.TestClone; + public static encode(message: (jspb.test.TestClone|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (jspb.test.TestClone|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestClone; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestClone; + public static verify(message: (jspb.test.TestClone|Object)): string; + public static fromObject(object: { [k: string]: any }): jspb.test.TestClone; + public static from(object: { [k: string]: any }): jspb.test.TestClone; + public static toObject(message: jspb.test.TestClone, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } class CloneExtension { constructor(properties?: Object); - ext?: string; - static create(properties?: Object): jspb.test.CloneExtension; - static encode(message: (jspb.test.CloneExtension|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (jspb.test.CloneExtension|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.CloneExtension; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.CloneExtension; - static verify(message: (jspb.test.CloneExtension|Object)): string; - static fromObject(object: { [k: string]: any }): jspb.test.CloneExtension; - static from(object: { [k: string]: any }): jspb.test.CloneExtension; - static toObject(message: jspb.test.CloneExtension, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public ext?: string; + public static create(properties?: Object): jspb.test.CloneExtension; + public static encode(message: (jspb.test.CloneExtension|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (jspb.test.CloneExtension|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.CloneExtension; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.CloneExtension; + public static verify(message: (jspb.test.CloneExtension|Object)): string; + public static fromObject(object: { [k: string]: any }): jspb.test.CloneExtension; + public static from(object: { [k: string]: any }): jspb.test.CloneExtension; + public static toObject(message: jspb.test.CloneExtension, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } class TestGroup { constructor(properties?: Object); - repeatedGroup?: jspb.test.TestGroup.RepeatedGroup[]; - requiredGroup: jspb.test.TestGroup.RequiredGroup; - optionalGroup?: jspb.test.TestGroup.OptionalGroup; - id?: string; - requiredSimple: jspb.test.Simple2; - optionalSimple?: jspb.test.Simple2; - static create(properties?: Object): jspb.test.TestGroup; - static encode(message: (jspb.test.TestGroup|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (jspb.test.TestGroup|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestGroup; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestGroup; - static verify(message: (jspb.test.TestGroup|Object)): string; - static fromObject(object: { [k: string]: any }): jspb.test.TestGroup; - static from(object: { [k: string]: any }): jspb.test.TestGroup; - static toObject(message: jspb.test.TestGroup, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public repeatedGroup?: jspb.test.TestGroup.RepeatedGroup[]; + public requiredGroup: jspb.test.TestGroup.RequiredGroup; + public optionalGroup?: jspb.test.TestGroup.OptionalGroup; + public id?: string; + public requiredSimple: jspb.test.Simple2; + public optionalSimple?: jspb.test.Simple2; + public static create(properties?: Object): jspb.test.TestGroup; + public static encode(message: (jspb.test.TestGroup|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (jspb.test.TestGroup|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestGroup; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestGroup; + public static verify(message: (jspb.test.TestGroup|Object)): string; + public static fromObject(object: { [k: string]: any }): jspb.test.TestGroup; + public static from(object: { [k: string]: any }): jspb.test.TestGroup; + public static toObject(message: jspb.test.TestGroup, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } namespace TestGroup { class RepeatedGroup { constructor(properties?: Object); - id: string; - someBool?: boolean[]; - static create(properties?: Object): jspb.test.TestGroup.RepeatedGroup; - static encode(message: (jspb.test.TestGroup.RepeatedGroup|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (jspb.test.TestGroup.RepeatedGroup|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestGroup.RepeatedGroup; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestGroup.RepeatedGroup; - static verify(message: (jspb.test.TestGroup.RepeatedGroup|Object)): string; - static fromObject(object: { [k: string]: any }): jspb.test.TestGroup.RepeatedGroup; - static from(object: { [k: string]: any }): jspb.test.TestGroup.RepeatedGroup; - static toObject(message: jspb.test.TestGroup.RepeatedGroup, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public id: string; + public someBool?: boolean[]; + public static create(properties?: Object): jspb.test.TestGroup.RepeatedGroup; + public static encode(message: (jspb.test.TestGroup.RepeatedGroup|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (jspb.test.TestGroup.RepeatedGroup|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestGroup.RepeatedGroup; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestGroup.RepeatedGroup; + public static verify(message: (jspb.test.TestGroup.RepeatedGroup|Object)): string; + public static fromObject(object: { [k: string]: any }): jspb.test.TestGroup.RepeatedGroup; + public static from(object: { [k: string]: any }): jspb.test.TestGroup.RepeatedGroup; + public static toObject(message: jspb.test.TestGroup.RepeatedGroup, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } class RequiredGroup { constructor(properties?: Object); - id: string; - static create(properties?: Object): jspb.test.TestGroup.RequiredGroup; - static encode(message: (jspb.test.TestGroup.RequiredGroup|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (jspb.test.TestGroup.RequiredGroup|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestGroup.RequiredGroup; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestGroup.RequiredGroup; - static verify(message: (jspb.test.TestGroup.RequiredGroup|Object)): string; - static fromObject(object: { [k: string]: any }): jspb.test.TestGroup.RequiredGroup; - static from(object: { [k: string]: any }): jspb.test.TestGroup.RequiredGroup; - static toObject(message: jspb.test.TestGroup.RequiredGroup, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public id: string; + public static create(properties?: Object): jspb.test.TestGroup.RequiredGroup; + public static encode(message: (jspb.test.TestGroup.RequiredGroup|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (jspb.test.TestGroup.RequiredGroup|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestGroup.RequiredGroup; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestGroup.RequiredGroup; + public static verify(message: (jspb.test.TestGroup.RequiredGroup|Object)): string; + public static fromObject(object: { [k: string]: any }): jspb.test.TestGroup.RequiredGroup; + public static from(object: { [k: string]: any }): jspb.test.TestGroup.RequiredGroup; + public static toObject(message: jspb.test.TestGroup.RequiredGroup, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } class OptionalGroup { constructor(properties?: Object); - id: string; - static create(properties?: Object): jspb.test.TestGroup.OptionalGroup; - static encode(message: (jspb.test.TestGroup.OptionalGroup|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (jspb.test.TestGroup.OptionalGroup|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestGroup.OptionalGroup; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestGroup.OptionalGroup; - static verify(message: (jspb.test.TestGroup.OptionalGroup|Object)): string; - static fromObject(object: { [k: string]: any }): jspb.test.TestGroup.OptionalGroup; - static from(object: { [k: string]: any }): jspb.test.TestGroup.OptionalGroup; - static toObject(message: jspb.test.TestGroup.OptionalGroup, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public id: string; + public static create(properties?: Object): jspb.test.TestGroup.OptionalGroup; + public static encode(message: (jspb.test.TestGroup.OptionalGroup|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (jspb.test.TestGroup.OptionalGroup|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestGroup.OptionalGroup; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestGroup.OptionalGroup; + public static verify(message: (jspb.test.TestGroup.OptionalGroup|Object)): string; + public static fromObject(object: { [k: string]: any }): jspb.test.TestGroup.OptionalGroup; + public static from(object: { [k: string]: any }): jspb.test.TestGroup.OptionalGroup; + public static toObject(message: jspb.test.TestGroup.OptionalGroup, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } } class TestGroup1 { constructor(properties?: Object); - group?: jspb.test.TestGroup.RepeatedGroup; - static create(properties?: Object): jspb.test.TestGroup1; - static encode(message: (jspb.test.TestGroup1|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (jspb.test.TestGroup1|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestGroup1; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestGroup1; - static verify(message: (jspb.test.TestGroup1|Object)): string; - static fromObject(object: { [k: string]: any }): jspb.test.TestGroup1; - static from(object: { [k: string]: any }): jspb.test.TestGroup1; - static toObject(message: jspb.test.TestGroup1, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public group?: jspb.test.TestGroup.RepeatedGroup; + public static create(properties?: Object): jspb.test.TestGroup1; + public static encode(message: (jspb.test.TestGroup1|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (jspb.test.TestGroup1|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestGroup1; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestGroup1; + public static verify(message: (jspb.test.TestGroup1|Object)): string; + public static fromObject(object: { [k: string]: any }): jspb.test.TestGroup1; + public static from(object: { [k: string]: any }): jspb.test.TestGroup1; + public static toObject(message: jspb.test.TestGroup1, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } class TestReservedNames { constructor(properties?: Object); - extension?: number; - static create(properties?: Object): jspb.test.TestReservedNames; - static encode(message: (jspb.test.TestReservedNames|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (jspb.test.TestReservedNames|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestReservedNames; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestReservedNames; - static verify(message: (jspb.test.TestReservedNames|Object)): string; - static fromObject(object: { [k: string]: any }): jspb.test.TestReservedNames; - static from(object: { [k: string]: any }): jspb.test.TestReservedNames; - static toObject(message: jspb.test.TestReservedNames, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public extension?: number; + public static create(properties?: Object): jspb.test.TestReservedNames; + public static encode(message: (jspb.test.TestReservedNames|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (jspb.test.TestReservedNames|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestReservedNames; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestReservedNames; + public static verify(message: (jspb.test.TestReservedNames|Object)): string; + public static fromObject(object: { [k: string]: any }): jspb.test.TestReservedNames; + public static from(object: { [k: string]: any }): jspb.test.TestReservedNames; + public static toObject(message: jspb.test.TestReservedNames, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } class TestReservedNamesExtension { constructor(properties?: Object); - static create(properties?: Object): jspb.test.TestReservedNamesExtension; - static encode(message: (jspb.test.TestReservedNamesExtension|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (jspb.test.TestReservedNamesExtension|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestReservedNamesExtension; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestReservedNamesExtension; - static verify(message: (jspb.test.TestReservedNamesExtension|Object)): string; - static fromObject(object: { [k: string]: any }): jspb.test.TestReservedNamesExtension; - static from(object: { [k: string]: any }): jspb.test.TestReservedNamesExtension; - static toObject(message: jspb.test.TestReservedNamesExtension, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public static create(properties?: Object): jspb.test.TestReservedNamesExtension; + public static encode(message: (jspb.test.TestReservedNamesExtension|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (jspb.test.TestReservedNamesExtension|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestReservedNamesExtension; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestReservedNamesExtension; + public static verify(message: (jspb.test.TestReservedNamesExtension|Object)): string; + public static fromObject(object: { [k: string]: any }): jspb.test.TestReservedNamesExtension; + public static from(object: { [k: string]: any }): jspb.test.TestReservedNamesExtension; + public static toObject(message: jspb.test.TestReservedNamesExtension, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } class TestMessageWithOneof { constructor(properties?: Object); - pone?: string; - pthree?: string; - rone?: jspb.test.TestMessageWithOneof; - rtwo?: string; - normalField?: boolean; - repeatedField?: string[]; - aone?: number; - atwo?: number; - bone?: number; - btwo?: number; - partialOneof?: string; - recursiveOneof?: string; - defaultOneofA?: string; - defaultOneofB?: string; - static create(properties?: Object): jspb.test.TestMessageWithOneof; - static encode(message: (jspb.test.TestMessageWithOneof|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (jspb.test.TestMessageWithOneof|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestMessageWithOneof; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestMessageWithOneof; - static verify(message: (jspb.test.TestMessageWithOneof|Object)): string; - static fromObject(object: { [k: string]: any }): jspb.test.TestMessageWithOneof; - static from(object: { [k: string]: any }): jspb.test.TestMessageWithOneof; - static toObject(message: jspb.test.TestMessageWithOneof, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public pone?: string; + public pthree?: string; + public rone?: jspb.test.TestMessageWithOneof; + public rtwo?: string; + public normalField?: boolean; + public repeatedField?: string[]; + public aone?: number; + public atwo?: number; + public bone?: number; + public btwo?: number; + public partialOneof?: string; + public recursiveOneof?: string; + public defaultOneofA?: string; + public defaultOneofB?: string; + public static create(properties?: Object): jspb.test.TestMessageWithOneof; + public static encode(message: (jspb.test.TestMessageWithOneof|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (jspb.test.TestMessageWithOneof|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestMessageWithOneof; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestMessageWithOneof; + public static verify(message: (jspb.test.TestMessageWithOneof|Object)): string; + public static fromObject(object: { [k: string]: any }): jspb.test.TestMessageWithOneof; + public static from(object: { [k: string]: any }): jspb.test.TestMessageWithOneof; + public static toObject(message: jspb.test.TestMessageWithOneof, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } class TestEndsWithBytes { constructor(properties?: Object); - value?: number; - data?: Uint8Array; - static create(properties?: Object): jspb.test.TestEndsWithBytes; - static encode(message: (jspb.test.TestEndsWithBytes|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (jspb.test.TestEndsWithBytes|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestEndsWithBytes; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestEndsWithBytes; - static verify(message: (jspb.test.TestEndsWithBytes|Object)): string; - static fromObject(object: { [k: string]: any }): jspb.test.TestEndsWithBytes; - static from(object: { [k: string]: any }): jspb.test.TestEndsWithBytes; - static toObject(message: jspb.test.TestEndsWithBytes, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public value?: number; + public data?: Uint8Array; + public static create(properties?: Object): jspb.test.TestEndsWithBytes; + public static encode(message: (jspb.test.TestEndsWithBytes|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (jspb.test.TestEndsWithBytes|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestEndsWithBytes; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestEndsWithBytes; + public static verify(message: (jspb.test.TestEndsWithBytes|Object)): string; + public static fromObject(object: { [k: string]: any }): jspb.test.TestEndsWithBytes; + public static from(object: { [k: string]: any }): jspb.test.TestEndsWithBytes; + public static toObject(message: jspb.test.TestEndsWithBytes, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } class TestMapFieldsNoBinary { constructor(properties?: Object); - mapStringString?: { [k: string]: string }; - mapStringInt32?: { [k: string]: number }; - mapStringInt64?: { [k: string]: (number|$protobuf.Long) }; - mapStringBool?: { [k: string]: boolean }; - mapStringDouble?: { [k: string]: number }; - mapStringEnum?: { [k: string]: number }; - mapStringMsg?: { [k: string]: jspb.test.MapValueMessageNoBinary }; - mapInt32String?: { [k: string]: string }; - mapInt64String?: { [k: string]: string }; - mapBoolString?: { [k: string]: string }; - testMapFields?: jspb.test.TestMapFieldsNoBinary; - mapStringTestmapfields?: { [k: string]: jspb.test.TestMapFieldsNoBinary }; - static create(properties?: Object): jspb.test.TestMapFieldsNoBinary; - static encode(message: (jspb.test.TestMapFieldsNoBinary|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (jspb.test.TestMapFieldsNoBinary|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestMapFieldsNoBinary; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestMapFieldsNoBinary; - static verify(message: (jspb.test.TestMapFieldsNoBinary|Object)): string; - static fromObject(object: { [k: string]: any }): jspb.test.TestMapFieldsNoBinary; - static from(object: { [k: string]: any }): jspb.test.TestMapFieldsNoBinary; - static toObject(message: jspb.test.TestMapFieldsNoBinary, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public mapStringString?: { [k: string]: string }; + public mapStringInt32?: { [k: string]: number }; + public mapStringInt64?: { [k: string]: (number|$protobuf.Long) }; + public mapStringBool?: { [k: string]: boolean }; + public mapStringDouble?: { [k: string]: number }; + public mapStringEnum?: { [k: string]: number }; + public mapStringMsg?: { [k: string]: jspb.test.MapValueMessageNoBinary }; + public mapInt32String?: { [k: string]: string }; + public mapInt64String?: { [k: string]: string }; + public mapBoolString?: { [k: string]: string }; + public testMapFields?: jspb.test.TestMapFieldsNoBinary; + public mapStringTestmapfields?: { [k: string]: jspb.test.TestMapFieldsNoBinary }; + public static create(properties?: Object): jspb.test.TestMapFieldsNoBinary; + public static encode(message: (jspb.test.TestMapFieldsNoBinary|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (jspb.test.TestMapFieldsNoBinary|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.TestMapFieldsNoBinary; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.TestMapFieldsNoBinary; + public static verify(message: (jspb.test.TestMapFieldsNoBinary|Object)): string; + public static fromObject(object: { [k: string]: any }): jspb.test.TestMapFieldsNoBinary; + public static from(object: { [k: string]: any }): jspb.test.TestMapFieldsNoBinary; + public static toObject(message: jspb.test.TestMapFieldsNoBinary, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } enum MapValueEnumNoBinary { @@ -544,68 +544,68 @@ export namespace jspb { class MapValueMessageNoBinary { constructor(properties?: Object); - foo?: number; - static create(properties?: Object): jspb.test.MapValueMessageNoBinary; - static encode(message: (jspb.test.MapValueMessageNoBinary|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (jspb.test.MapValueMessageNoBinary|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.MapValueMessageNoBinary; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.MapValueMessageNoBinary; - static verify(message: (jspb.test.MapValueMessageNoBinary|Object)): string; - static fromObject(object: { [k: string]: any }): jspb.test.MapValueMessageNoBinary; - static from(object: { [k: string]: any }): jspb.test.MapValueMessageNoBinary; - static toObject(message: jspb.test.MapValueMessageNoBinary, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public foo?: number; + public static create(properties?: Object): jspb.test.MapValueMessageNoBinary; + public static encode(message: (jspb.test.MapValueMessageNoBinary|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (jspb.test.MapValueMessageNoBinary|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.MapValueMessageNoBinary; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.MapValueMessageNoBinary; + public static verify(message: (jspb.test.MapValueMessageNoBinary|Object)): string; + public static fromObject(object: { [k: string]: any }): jspb.test.MapValueMessageNoBinary; + public static from(object: { [k: string]: any }): jspb.test.MapValueMessageNoBinary; + public static toObject(message: jspb.test.MapValueMessageNoBinary, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } class Deeply { constructor(properties?: Object); - static create(properties?: Object): jspb.test.Deeply; - static encode(message: (jspb.test.Deeply|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (jspb.test.Deeply|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.Deeply; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.Deeply; - static verify(message: (jspb.test.Deeply|Object)): string; - static fromObject(object: { [k: string]: any }): jspb.test.Deeply; - static from(object: { [k: string]: any }): jspb.test.Deeply; - static toObject(message: jspb.test.Deeply, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public static create(properties?: Object): jspb.test.Deeply; + public static encode(message: (jspb.test.Deeply|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (jspb.test.Deeply|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.Deeply; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.Deeply; + public static verify(message: (jspb.test.Deeply|Object)): string; + public static fromObject(object: { [k: string]: any }): jspb.test.Deeply; + public static from(object: { [k: string]: any }): jspb.test.Deeply; + public static toObject(message: jspb.test.Deeply, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } namespace Deeply { class Nested { constructor(properties?: Object); - static create(properties?: Object): jspb.test.Deeply.Nested; - static encode(message: (jspb.test.Deeply.Nested|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (jspb.test.Deeply.Nested|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.Deeply.Nested; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.Deeply.Nested; - static verify(message: (jspb.test.Deeply.Nested|Object)): string; - static fromObject(object: { [k: string]: any }): jspb.test.Deeply.Nested; - static from(object: { [k: string]: any }): jspb.test.Deeply.Nested; - static toObject(message: jspb.test.Deeply.Nested, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public static create(properties?: Object): jspb.test.Deeply.Nested; + public static encode(message: (jspb.test.Deeply.Nested|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (jspb.test.Deeply.Nested|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.Deeply.Nested; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.Deeply.Nested; + public static verify(message: (jspb.test.Deeply.Nested|Object)): string; + public static fromObject(object: { [k: string]: any }): jspb.test.Deeply.Nested; + public static from(object: { [k: string]: any }): jspb.test.Deeply.Nested; + public static toObject(message: jspb.test.Deeply.Nested, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } namespace Nested { class Message { constructor(properties?: Object); - count?: number; - static create(properties?: Object): jspb.test.Deeply.Nested.Message; - static encode(message: (jspb.test.Deeply.Nested.Message|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (jspb.test.Deeply.Nested.Message|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.Deeply.Nested.Message; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.Deeply.Nested.Message; - static verify(message: (jspb.test.Deeply.Nested.Message|Object)): string; - static fromObject(object: { [k: string]: any }): jspb.test.Deeply.Nested.Message; - static from(object: { [k: string]: any }): jspb.test.Deeply.Nested.Message; - static toObject(message: jspb.test.Deeply.Nested.Message, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public count?: number; + public static create(properties?: Object): jspb.test.Deeply.Nested.Message; + public static encode(message: (jspb.test.Deeply.Nested.Message|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (jspb.test.Deeply.Nested.Message|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): jspb.test.Deeply.Nested.Message; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): jspb.test.Deeply.Nested.Message; + public static verify(message: (jspb.test.Deeply.Nested.Message|Object)): string; + public static fromObject(object: { [k: string]: any }): jspb.test.Deeply.Nested.Message; + public static from(object: { [k: string]: any }): jspb.test.Deeply.Nested.Message; + public static toObject(message: jspb.test.Deeply.Nested.Message, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } } } @@ -618,132 +618,132 @@ export namespace google { class FileDescriptorSet { constructor(properties?: Object); - file?: google.protobuf.FileDescriptorProto[]; - static create(properties?: Object): google.protobuf.FileDescriptorSet; - static encode(message: (google.protobuf.FileDescriptorSet|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (google.protobuf.FileDescriptorSet|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; - static verify(message: (google.protobuf.FileDescriptorSet|Object)): string; - static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; - static from(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; - static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public file?: google.protobuf.FileDescriptorProto[]; + public static create(properties?: Object): google.protobuf.FileDescriptorSet; + public static encode(message: (google.protobuf.FileDescriptorSet|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (google.protobuf.FileDescriptorSet|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + public static verify(message: (google.protobuf.FileDescriptorSet|Object)): string; + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + public static from(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } class FileDescriptorProto { constructor(properties?: Object); - name?: string; - package?: string; - dependency?: string[]; - publicDependency?: number[]; - weakDependency?: number[]; - messageType?: google.protobuf.DescriptorProto[]; - enumType?: google.protobuf.EnumDescriptorProto[]; - service?: google.protobuf.ServiceDescriptorProto[]; - extension?: google.protobuf.FieldDescriptorProto[]; - options?: google.protobuf.FileOptions; - sourceCodeInfo?: google.protobuf.SourceCodeInfo; - syntax?: string; - static create(properties?: Object): google.protobuf.FileDescriptorProto; - static encode(message: (google.protobuf.FileDescriptorProto|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (google.protobuf.FileDescriptorProto|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; - static verify(message: (google.protobuf.FileDescriptorProto|Object)): string; - static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; - static from(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; - static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public name?: string; + public package?: string; + public dependency?: string[]; + public publicDependency?: number[]; + public weakDependency?: number[]; + public messageType?: google.protobuf.DescriptorProto[]; + public enumType?: google.protobuf.EnumDescriptorProto[]; + public service?: google.protobuf.ServiceDescriptorProto[]; + public extension?: google.protobuf.FieldDescriptorProto[]; + public options?: google.protobuf.FileOptions; + public sourceCodeInfo?: google.protobuf.SourceCodeInfo; + public syntax?: string; + public static create(properties?: Object): google.protobuf.FileDescriptorProto; + public static encode(message: (google.protobuf.FileDescriptorProto|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (google.protobuf.FileDescriptorProto|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + public static verify(message: (google.protobuf.FileDescriptorProto|Object)): string; + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + public static from(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } class DescriptorProto { constructor(properties?: Object); - name?: string; - field?: google.protobuf.FieldDescriptorProto[]; - extension?: google.protobuf.FieldDescriptorProto[]; - nestedType?: google.protobuf.DescriptorProto[]; - enumType?: google.protobuf.EnumDescriptorProto[]; - extensionRange?: google.protobuf.DescriptorProto.ExtensionRange[]; - oneofDecl?: google.protobuf.OneofDescriptorProto[]; - options?: google.protobuf.MessageOptions; - reservedRange?: google.protobuf.DescriptorProto.ReservedRange[]; - reservedName?: string[]; - static create(properties?: Object): google.protobuf.DescriptorProto; - static encode(message: (google.protobuf.DescriptorProto|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (google.protobuf.DescriptorProto|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; - static verify(message: (google.protobuf.DescriptorProto|Object)): string; - static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; - static from(object: { [k: string]: any }): google.protobuf.DescriptorProto; - static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public name?: string; + public field?: google.protobuf.FieldDescriptorProto[]; + public extension?: google.protobuf.FieldDescriptorProto[]; + public nestedType?: google.protobuf.DescriptorProto[]; + public enumType?: google.protobuf.EnumDescriptorProto[]; + public extensionRange?: google.protobuf.DescriptorProto.ExtensionRange[]; + public oneofDecl?: google.protobuf.OneofDescriptorProto[]; + public options?: google.protobuf.MessageOptions; + public reservedRange?: google.protobuf.DescriptorProto.ReservedRange[]; + public reservedName?: string[]; + public static create(properties?: Object): google.protobuf.DescriptorProto; + public static encode(message: (google.protobuf.DescriptorProto|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (google.protobuf.DescriptorProto|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + public static verify(message: (google.protobuf.DescriptorProto|Object)): string; + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + public static from(object: { [k: string]: any }): google.protobuf.DescriptorProto; + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } namespace DescriptorProto { class ExtensionRange { constructor(properties?: Object); - start?: number; - end?: number; - static create(properties?: Object): google.protobuf.DescriptorProto.ExtensionRange; - static encode(message: (google.protobuf.DescriptorProto.ExtensionRange|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (google.protobuf.DescriptorProto.ExtensionRange|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; - static verify(message: (google.protobuf.DescriptorProto.ExtensionRange|Object)): string; - static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; - static from(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; - static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public start?: number; + public end?: number; + public static create(properties?: Object): google.protobuf.DescriptorProto.ExtensionRange; + public static encode(message: (google.protobuf.DescriptorProto.ExtensionRange|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (google.protobuf.DescriptorProto.ExtensionRange|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + public static verify(message: (google.protobuf.DescriptorProto.ExtensionRange|Object)): string; + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + public static from(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } class ReservedRange { constructor(properties?: Object); - start?: number; - end?: number; - static create(properties?: Object): google.protobuf.DescriptorProto.ReservedRange; - static encode(message: (google.protobuf.DescriptorProto.ReservedRange|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (google.protobuf.DescriptorProto.ReservedRange|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; - static verify(message: (google.protobuf.DescriptorProto.ReservedRange|Object)): string; - static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; - static from(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; - static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public start?: number; + public end?: number; + public static create(properties?: Object): google.protobuf.DescriptorProto.ReservedRange; + public static encode(message: (google.protobuf.DescriptorProto.ReservedRange|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (google.protobuf.DescriptorProto.ReservedRange|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + public static verify(message: (google.protobuf.DescriptorProto.ReservedRange|Object)): string; + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + public static from(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } } class FieldDescriptorProto { constructor(properties?: Object); - name?: string; - number?: number; - label?: number; - type?: number; - typeName?: string; - extendee?: string; - defaultValue?: string; - oneofIndex?: number; - jsonName?: string; - options?: google.protobuf.FieldOptions; - static create(properties?: Object): google.protobuf.FieldDescriptorProto; - static encode(message: (google.protobuf.FieldDescriptorProto|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (google.protobuf.FieldDescriptorProto|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; - static verify(message: (google.protobuf.FieldDescriptorProto|Object)): string; - static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; - static from(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; - static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public name?: string; + public number?: number; + public label?: number; + public type?: number; + public typeName?: string; + public extendee?: string; + public defaultValue?: string; + public oneofIndex?: number; + public jsonName?: string; + public options?: google.protobuf.FieldOptions; + public static create(properties?: Object): google.protobuf.FieldDescriptorProto; + public static encode(message: (google.protobuf.FieldDescriptorProto|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (google.protobuf.FieldDescriptorProto|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + public static verify(message: (google.protobuf.FieldDescriptorProto|Object)): string; + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + public static from(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } namespace FieldDescriptorProto { @@ -778,124 +778,124 @@ export namespace google { class OneofDescriptorProto { constructor(properties?: Object); - name?: string; - options?: google.protobuf.OneofOptions; - static create(properties?: Object): google.protobuf.OneofDescriptorProto; - static encode(message: (google.protobuf.OneofDescriptorProto|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (google.protobuf.OneofDescriptorProto|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; - static verify(message: (google.protobuf.OneofDescriptorProto|Object)): string; - static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; - static from(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; - static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public name?: string; + public options?: google.protobuf.OneofOptions; + public static create(properties?: Object): google.protobuf.OneofDescriptorProto; + public static encode(message: (google.protobuf.OneofDescriptorProto|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (google.protobuf.OneofDescriptorProto|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + public static verify(message: (google.protobuf.OneofDescriptorProto|Object)): string; + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + public static from(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } class EnumDescriptorProto { constructor(properties?: Object); - name?: string; - value?: google.protobuf.EnumValueDescriptorProto[]; - options?: google.protobuf.EnumOptions; - static create(properties?: Object): google.protobuf.EnumDescriptorProto; - static encode(message: (google.protobuf.EnumDescriptorProto|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (google.protobuf.EnumDescriptorProto|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; - static verify(message: (google.protobuf.EnumDescriptorProto|Object)): string; - static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; - static from(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; - static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public name?: string; + public value?: google.protobuf.EnumValueDescriptorProto[]; + public options?: google.protobuf.EnumOptions; + public static create(properties?: Object): google.protobuf.EnumDescriptorProto; + public static encode(message: (google.protobuf.EnumDescriptorProto|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (google.protobuf.EnumDescriptorProto|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + public static verify(message: (google.protobuf.EnumDescriptorProto|Object)): string; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + public static from(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } class EnumValueDescriptorProto { constructor(properties?: Object); - name?: string; - number?: number; - options?: google.protobuf.EnumValueOptions; - static create(properties?: Object): google.protobuf.EnumValueDescriptorProto; - static encode(message: (google.protobuf.EnumValueDescriptorProto|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (google.protobuf.EnumValueDescriptorProto|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; - static verify(message: (google.protobuf.EnumValueDescriptorProto|Object)): string; - static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; - static from(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; - static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public name?: string; + public number?: number; + public options?: google.protobuf.EnumValueOptions; + public static create(properties?: Object): google.protobuf.EnumValueDescriptorProto; + public static encode(message: (google.protobuf.EnumValueDescriptorProto|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (google.protobuf.EnumValueDescriptorProto|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + public static verify(message: (google.protobuf.EnumValueDescriptorProto|Object)): string; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + public static from(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } class ServiceDescriptorProto { constructor(properties?: Object); - name?: string; - method?: google.protobuf.MethodDescriptorProto[]; - options?: google.protobuf.ServiceOptions; - static create(properties?: Object): google.protobuf.ServiceDescriptorProto; - static encode(message: (google.protobuf.ServiceDescriptorProto|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (google.protobuf.ServiceDescriptorProto|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; - static verify(message: (google.protobuf.ServiceDescriptorProto|Object)): string; - static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; - static from(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; - static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public name?: string; + public method?: google.protobuf.MethodDescriptorProto[]; + public options?: google.protobuf.ServiceOptions; + public static create(properties?: Object): google.protobuf.ServiceDescriptorProto; + public static encode(message: (google.protobuf.ServiceDescriptorProto|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (google.protobuf.ServiceDescriptorProto|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + public static verify(message: (google.protobuf.ServiceDescriptorProto|Object)): string; + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + public static from(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } class MethodDescriptorProto { constructor(properties?: Object); - name?: string; - inputType?: string; - outputType?: string; - options?: google.protobuf.MethodOptions; - clientStreaming?: boolean; - serverStreaming?: boolean; - static create(properties?: Object): google.protobuf.MethodDescriptorProto; - static encode(message: (google.protobuf.MethodDescriptorProto|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (google.protobuf.MethodDescriptorProto|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; - static verify(message: (google.protobuf.MethodDescriptorProto|Object)): string; - static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; - static from(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; - static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public name?: string; + public inputType?: string; + public outputType?: string; + public options?: google.protobuf.MethodOptions; + public clientStreaming?: boolean; + public serverStreaming?: boolean; + public static create(properties?: Object): google.protobuf.MethodDescriptorProto; + public static encode(message: (google.protobuf.MethodDescriptorProto|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (google.protobuf.MethodDescriptorProto|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + public static verify(message: (google.protobuf.MethodDescriptorProto|Object)): string; + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + public static from(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } class FileOptions { constructor(properties?: Object); - javaPackage?: string; - javaOuterClassname?: string; - javaMultipleFiles?: boolean; - javaGenerateEqualsAndHash?: boolean; - javaStringCheckUtf8?: boolean; - optimizeFor?: number; - goPackage?: string; - ccGenericServices?: boolean; - javaGenericServices?: boolean; - pyGenericServices?: boolean; - deprecated?: boolean; - ccEnableArenas?: boolean; - objcClassPrefix?: string; - csharpNamespace?: string; - uninterpretedOption?: google.protobuf.UninterpretedOption[]; - static create(properties?: Object): google.protobuf.FileOptions; - static encode(message: (google.protobuf.FileOptions|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (google.protobuf.FileOptions|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; - static verify(message: (google.protobuf.FileOptions|Object)): string; - static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; - static from(object: { [k: string]: any }): google.protobuf.FileOptions; - static toObject(message: google.protobuf.FileOptions, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public javaPackage?: string; + public javaOuterClassname?: string; + public javaMultipleFiles?: boolean; + public javaGenerateEqualsAndHash?: boolean; + public javaStringCheckUtf8?: boolean; + public optimizeFor?: number; + public goPackage?: string; + public ccGenericServices?: boolean; + public javaGenericServices?: boolean; + public pyGenericServices?: boolean; + public deprecated?: boolean; + public ccEnableArenas?: boolean; + public objcClassPrefix?: string; + public csharpNamespace?: string; + public uninterpretedOption?: google.protobuf.UninterpretedOption[]; + public static create(properties?: Object): google.protobuf.FileOptions; + public static encode(message: (google.protobuf.FileOptions|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (google.protobuf.FileOptions|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + public static verify(message: (google.protobuf.FileOptions|Object)): string; + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + public static from(object: { [k: string]: any }): google.protobuf.FileOptions; + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } namespace FileOptions { @@ -909,44 +909,44 @@ export namespace google { class MessageOptions { constructor(properties?: Object); - messageSetWireFormat?: boolean; - noStandardDescriptorAccessor?: boolean; - deprecated?: boolean; - mapEntry?: boolean; - uninterpretedOption?: google.protobuf.UninterpretedOption[]; - static create(properties?: Object): google.protobuf.MessageOptions; - static encode(message: (google.protobuf.MessageOptions|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (google.protobuf.MessageOptions|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; - static verify(message: (google.protobuf.MessageOptions|Object)): string; - static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; - static from(object: { [k: string]: any }): google.protobuf.MessageOptions; - static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public messageSetWireFormat?: boolean; + public noStandardDescriptorAccessor?: boolean; + public deprecated?: boolean; + public mapEntry?: boolean; + public uninterpretedOption?: google.protobuf.UninterpretedOption[]; + public static create(properties?: Object): google.protobuf.MessageOptions; + public static encode(message: (google.protobuf.MessageOptions|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (google.protobuf.MessageOptions|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + public static verify(message: (google.protobuf.MessageOptions|Object)): string; + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + public static from(object: { [k: string]: any }): google.protobuf.MessageOptions; + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } class FieldOptions { constructor(properties?: Object); - ctype?: number; - packed?: boolean; - jstype?: number; - lazy?: boolean; - deprecated?: boolean; - weak?: boolean; - uninterpretedOption?: google.protobuf.UninterpretedOption[]; - static create(properties?: Object): google.protobuf.FieldOptions; - static encode(message: (google.protobuf.FieldOptions|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (google.protobuf.FieldOptions|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; - static verify(message: (google.protobuf.FieldOptions|Object)): string; - static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; - static from(object: { [k: string]: any }): google.protobuf.FieldOptions; - static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public ctype?: number; + public packed?: boolean; + public jstype?: number; + public lazy?: boolean; + public deprecated?: boolean; + public weak?: boolean; + public uninterpretedOption?: google.protobuf.UninterpretedOption[]; + public static create(properties?: Object): google.protobuf.FieldOptions; + public static encode(message: (google.protobuf.FieldOptions|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (google.protobuf.FieldOptions|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + public static verify(message: (google.protobuf.FieldOptions|Object)): string; + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + public static from(object: { [k: string]: any }): google.protobuf.FieldOptions; + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } namespace FieldOptions { @@ -966,88 +966,88 @@ export namespace google { class OneofOptions { constructor(properties?: Object); - uninterpretedOption?: google.protobuf.UninterpretedOption[]; - static create(properties?: Object): google.protobuf.OneofOptions; - static encode(message: (google.protobuf.OneofOptions|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (google.protobuf.OneofOptions|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; - static verify(message: (google.protobuf.OneofOptions|Object)): string; - static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; - static from(object: { [k: string]: any }): google.protobuf.OneofOptions; - static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public uninterpretedOption?: google.protobuf.UninterpretedOption[]; + public static create(properties?: Object): google.protobuf.OneofOptions; + public static encode(message: (google.protobuf.OneofOptions|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (google.protobuf.OneofOptions|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + public static verify(message: (google.protobuf.OneofOptions|Object)): string; + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + public static from(object: { [k: string]: any }): google.protobuf.OneofOptions; + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } class EnumOptions { constructor(properties?: Object); - allowAlias?: boolean; - deprecated?: boolean; - uninterpretedOption?: google.protobuf.UninterpretedOption[]; - static create(properties?: Object): google.protobuf.EnumOptions; - static encode(message: (google.protobuf.EnumOptions|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (google.protobuf.EnumOptions|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; - static verify(message: (google.protobuf.EnumOptions|Object)): string; - static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; - static from(object: { [k: string]: any }): google.protobuf.EnumOptions; - static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public allowAlias?: boolean; + public deprecated?: boolean; + public uninterpretedOption?: google.protobuf.UninterpretedOption[]; + public static create(properties?: Object): google.protobuf.EnumOptions; + public static encode(message: (google.protobuf.EnumOptions|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (google.protobuf.EnumOptions|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + public static verify(message: (google.protobuf.EnumOptions|Object)): string; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + public static from(object: { [k: string]: any }): google.protobuf.EnumOptions; + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } class EnumValueOptions { constructor(properties?: Object); - deprecated?: boolean; - uninterpretedOption?: google.protobuf.UninterpretedOption[]; - static create(properties?: Object): google.protobuf.EnumValueOptions; - static encode(message: (google.protobuf.EnumValueOptions|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (google.protobuf.EnumValueOptions|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; - static verify(message: (google.protobuf.EnumValueOptions|Object)): string; - static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; - static from(object: { [k: string]: any }): google.protobuf.EnumValueOptions; - static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public deprecated?: boolean; + public uninterpretedOption?: google.protobuf.UninterpretedOption[]; + public static create(properties?: Object): google.protobuf.EnumValueOptions; + public static encode(message: (google.protobuf.EnumValueOptions|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (google.protobuf.EnumValueOptions|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + public static verify(message: (google.protobuf.EnumValueOptions|Object)): string; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + public static from(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } class ServiceOptions { constructor(properties?: Object); - deprecated?: boolean; - uninterpretedOption?: google.protobuf.UninterpretedOption[]; - static create(properties?: Object): google.protobuf.ServiceOptions; - static encode(message: (google.protobuf.ServiceOptions|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (google.protobuf.ServiceOptions|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; - static verify(message: (google.protobuf.ServiceOptions|Object)): string; - static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; - static from(object: { [k: string]: any }): google.protobuf.ServiceOptions; - static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public deprecated?: boolean; + public uninterpretedOption?: google.protobuf.UninterpretedOption[]; + public static create(properties?: Object): google.protobuf.ServiceOptions; + public static encode(message: (google.protobuf.ServiceOptions|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (google.protobuf.ServiceOptions|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + public static verify(message: (google.protobuf.ServiceOptions|Object)): string; + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + public static from(object: { [k: string]: any }): google.protobuf.ServiceOptions; + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } class MethodOptions { constructor(properties?: Object); - deprecated?: boolean; - idempotencyLevel?: number; - uninterpretedOption?: google.protobuf.UninterpretedOption[]; - static create(properties?: Object): google.protobuf.MethodOptions; - static encode(message: (google.protobuf.MethodOptions|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (google.protobuf.MethodOptions|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; - static verify(message: (google.protobuf.MethodOptions|Object)): string; - static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; - static from(object: { [k: string]: any }): google.protobuf.MethodOptions; - static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public deprecated?: boolean; + public idempotencyLevel?: number; + public uninterpretedOption?: google.protobuf.UninterpretedOption[]; + public static create(properties?: Object): google.protobuf.MethodOptions; + public static encode(message: (google.protobuf.MethodOptions|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (google.protobuf.MethodOptions|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + public static verify(message: (google.protobuf.MethodOptions|Object)): string; + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + public static from(object: { [k: string]: any }): google.protobuf.MethodOptions; + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } namespace MethodOptions { @@ -1061,120 +1061,120 @@ export namespace google { class UninterpretedOption { constructor(properties?: Object); - name?: google.protobuf.UninterpretedOption.NamePart[]; - identifierValue?: string; - positiveIntValue?: (number|$protobuf.Long); - negativeIntValue?: (number|$protobuf.Long); - doubleValue?: number; - stringValue?: Uint8Array; - aggregateValue?: string; - static create(properties?: Object): google.protobuf.UninterpretedOption; - static encode(message: (google.protobuf.UninterpretedOption|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (google.protobuf.UninterpretedOption|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; - static verify(message: (google.protobuf.UninterpretedOption|Object)): string; - static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; - static from(object: { [k: string]: any }): google.protobuf.UninterpretedOption; - static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public name?: google.protobuf.UninterpretedOption.NamePart[]; + public identifierValue?: string; + public positiveIntValue?: (number|$protobuf.Long); + public negativeIntValue?: (number|$protobuf.Long); + public doubleValue?: number; + public stringValue?: Uint8Array; + public aggregateValue?: string; + public static create(properties?: Object): google.protobuf.UninterpretedOption; + public static encode(message: (google.protobuf.UninterpretedOption|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (google.protobuf.UninterpretedOption|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + public static verify(message: (google.protobuf.UninterpretedOption|Object)): string; + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + public static from(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } namespace UninterpretedOption { class NamePart { constructor(properties?: Object); - namePart: string; - isExtension: boolean; - static create(properties?: Object): google.protobuf.UninterpretedOption.NamePart; - static encode(message: (google.protobuf.UninterpretedOption.NamePart|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (google.protobuf.UninterpretedOption.NamePart|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; - static verify(message: (google.protobuf.UninterpretedOption.NamePart|Object)): string; - static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; - static from(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; - static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public namePart: string; + public isExtension: boolean; + public static create(properties?: Object): google.protobuf.UninterpretedOption.NamePart; + public static encode(message: (google.protobuf.UninterpretedOption.NamePart|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (google.protobuf.UninterpretedOption.NamePart|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + public static verify(message: (google.protobuf.UninterpretedOption.NamePart|Object)): string; + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + public static from(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } } class SourceCodeInfo { constructor(properties?: Object); - location?: google.protobuf.SourceCodeInfo.Location[]; - static create(properties?: Object): google.protobuf.SourceCodeInfo; - static encode(message: (google.protobuf.SourceCodeInfo|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (google.protobuf.SourceCodeInfo|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; - static verify(message: (google.protobuf.SourceCodeInfo|Object)): string; - static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; - static from(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; - static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public location?: google.protobuf.SourceCodeInfo.Location[]; + public static create(properties?: Object): google.protobuf.SourceCodeInfo; + public static encode(message: (google.protobuf.SourceCodeInfo|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (google.protobuf.SourceCodeInfo|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + public static verify(message: (google.protobuf.SourceCodeInfo|Object)): string; + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + public static from(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } namespace SourceCodeInfo { class Location { constructor(properties?: Object); - path?: number[]; - span?: number[]; - leadingComments?: string; - trailingComments?: string; - leadingDetachedComments?: string[]; - static create(properties?: Object): google.protobuf.SourceCodeInfo.Location; - static encode(message: (google.protobuf.SourceCodeInfo.Location|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (google.protobuf.SourceCodeInfo.Location|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; - static verify(message: (google.protobuf.SourceCodeInfo.Location|Object)): string; - static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; - static from(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; - static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public path?: number[]; + public span?: number[]; + public leadingComments?: string; + public trailingComments?: string; + public leadingDetachedComments?: string[]; + public static create(properties?: Object): google.protobuf.SourceCodeInfo.Location; + public static encode(message: (google.protobuf.SourceCodeInfo.Location|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (google.protobuf.SourceCodeInfo.Location|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + public static verify(message: (google.protobuf.SourceCodeInfo.Location|Object)): string; + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + public static from(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } } class GeneratedCodeInfo { constructor(properties?: Object); - annotation?: google.protobuf.GeneratedCodeInfo.Annotation[]; - static create(properties?: Object): google.protobuf.GeneratedCodeInfo; - static encode(message: (google.protobuf.GeneratedCodeInfo|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (google.protobuf.GeneratedCodeInfo|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; - static verify(message: (google.protobuf.GeneratedCodeInfo|Object)): string; - static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; - static from(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; - static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public annotation?: google.protobuf.GeneratedCodeInfo.Annotation[]; + public static create(properties?: Object): google.protobuf.GeneratedCodeInfo; + public static encode(message: (google.protobuf.GeneratedCodeInfo|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (google.protobuf.GeneratedCodeInfo|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + public static verify(message: (google.protobuf.GeneratedCodeInfo|Object)): string; + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + public static from(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } namespace GeneratedCodeInfo { class Annotation { constructor(properties?: Object); - path?: number[]; - sourceFile?: string; - begin?: number; - end?: number; - static create(properties?: Object): google.protobuf.GeneratedCodeInfo.Annotation; - static encode(message: (google.protobuf.GeneratedCodeInfo.Annotation|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static encodeDelimited(message: (google.protobuf.GeneratedCodeInfo.Annotation|Object), writer?: $protobuf.Writer): $protobuf.Writer; - static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; - static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; - static verify(message: (google.protobuf.GeneratedCodeInfo.Annotation|Object)): string; - static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; - static from(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; - static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.ConversionOptions): { [k: string]: any }; - toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; - toJSON(): { [k: string]: any }; + public path?: number[]; + public sourceFile?: string; + public begin?: number; + public end?: number; + public static create(properties?: Object): google.protobuf.GeneratedCodeInfo.Annotation; + public static encode(message: (google.protobuf.GeneratedCodeInfo.Annotation|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: (google.protobuf.GeneratedCodeInfo.Annotation|Object), writer?: $protobuf.Writer): $protobuf.Writer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + public static verify(message: (google.protobuf.GeneratedCodeInfo.Annotation|Object)): string; + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + public static from(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; + public toJSON(): { [k: string]: any }; } } } diff --git a/tests/data/test.ts b/tests/data/test.ts index 0aed72653..d3652a54e 100644 --- a/tests/data/test.ts +++ b/tests/data/test.ts @@ -1,2 +1 @@ -/// import * as test from "./test.js"; diff --git a/tslint.json b/tslint.json new file mode 100644 index 000000000..9b09c6637 --- /dev/null +++ b/tslint.json @@ -0,0 +1,15 @@ +{ + "extends": "tslint:recommended", + "rules": { + "array-type": [ true, "array" ], + "no-namespace": false, + "interface-name": [ true, "never-prefix" ], + "max-line-length": [ false ], + "trailing-comma": [ true, "never" ], + "variable-name": [ false ], + "max-classes-per-file": [ false ], + "member-ordering": [ false ], + "object-literal-sort-keys": false, + "no-string-literal": false + } +} \ No newline at end of file