3
3
4
4
/*
5
5
* protobuf.js v6.0.1 TypeScript definitions
6
- * Generated Fri, 02 Dec 2016 12:20:52 UTC
6
+ * Generated Fri, 02 Dec 2016 15:01:02 UTC
7
7
*/
8
- declare module protobuf {
8
+ declare module "protobufjs" {
9
9
10
10
/**
11
11
* Provides common type definitions.
@@ -306,7 +306,7 @@ declare module protobuf {
306
306
* @returns {Promise<Root>|Object } A promise if callback has been omitted, otherwise the protobuf namespace
307
307
* @throws {TypeError } If arguments are invalid
308
308
*/
309
- function load ( filename : ( string | string [ ] ) , root ?: Root , callback ?: ( ( ) => any ) ) : ( Promise < Root > | Object ) ;
309
+ function load ( filename : ( string | string [ ] ) , root ?: Root , callback ?: any ) : ( Promise < Root > | Object ) ;
310
310
311
311
/**
312
312
* Options passed to {@link inherits}, modifying its behavior.
@@ -324,11 +324,11 @@ declare module protobuf {
324
324
/**
325
325
* Inherits a custom class from the message prototype of the specified message type.
326
326
* @param {Function } clazz Inheriting class
327
- * @param {Type } type Inherited message type
327
+ * @param {Type|ReflectionObject } type Inherited message type
328
328
* @param {InheritanceOptions } [options] Inheritance options
329
329
* @returns {Prototype } Created prototype
330
330
*/
331
- function inherits ( clazz : ( ( ) => any ) , type : Type , options ?: InheritanceOptions ) : Prototype ;
331
+ function inherits ( clazz : any , type : ( Type | ReflectionObject ) , options ?: InheritanceOptions ) : Prototype ;
332
332
333
333
/**
334
334
* This is not an actual type but stands as a reference for any constructor of a custom message class that you pass to the library.
@@ -719,7 +719,7 @@ declare module protobuf {
719
719
* @returns {Object } Prototype
720
720
* @this ReflectionObject
721
721
*/
722
- static extend ( constructor : ( ( ) => any ) ) : Object ;
722
+ static extend ( constructor : any ) : Object ;
723
723
724
724
/**
725
725
* Converts this reflection object to its JSON representation.
@@ -1153,7 +1153,7 @@ declare module protobuf {
1153
1153
* @returns {Promise<Root>|undefined } A promise if `callback` has been omitted
1154
1154
* @throws {TypeError } If arguments are invalid
1155
1155
*/
1156
- load ( filename : ( string | string [ ] ) , callback ?: ( ( ) => any ) ) : ( Promise < Root > | undefined ) ;
1156
+ load ( filename : ( string | string [ ] ) , callback ?: any ) : ( Promise < Root > | undefined ) ;
1157
1157
1158
1158
}
1159
1159
@@ -1215,7 +1215,7 @@ declare module protobuf {
1215
1215
* @param {boolean } [responseDelimited=false] Whether response data is length delimited
1216
1216
* @returns {Object } Runtime service
1217
1217
*/
1218
- create ( rpc : ( ( ) => any ) , requestDelimited ?: boolean , responseDelimited ?: boolean ) : Object ;
1218
+ create ( rpc : any , requestDelimited ?: boolean , responseDelimited ?: boolean ) : Object ;
1219
1219
1220
1220
}
1221
1221
@@ -1228,7 +1228,7 @@ declare module protobuf {
1228
1228
* @param {function(?Error, Uint8Array=) } callback Node-style callback called with the error, if any, and the response data
1229
1229
* @returns {undefined }
1230
1230
*/
1231
- function RPCImpl ( method : Method , requestData : Uint8Array , callback : ( ( ) => any ) ) : undefined ;
1231
+ function RPCImpl ( method : Method , requestData : Uint8Array , callback : any ) : undefined ;
1232
1232
1233
1233
/**
1234
1234
* Handle object returned from {@link tokenize}.
@@ -1240,11 +1240,11 @@ declare module protobuf {
1240
1240
* @property {function(string, boolean=):boolean } skip Skips a token, returns its presence and advances or, if non-optional and not present, throws
1241
1241
*/
1242
1242
interface TokenizerHandle {
1243
- line : ( ( ) => any ) ;
1244
- next : ( ( ) => any ) ;
1245
- peek : ( ( ) => any ) ;
1246
- push : ( ( ) => any ) ;
1247
- skip : ( ( ) => any ) ;
1243
+ line : any ;
1244
+ next : any ;
1245
+ peek : any ;
1246
+ push : any ;
1247
+ skip : any ;
1248
1248
}
1249
1249
1250
1250
@@ -1369,7 +1369,7 @@ declare module protobuf {
1369
1369
* Defaults to use the internal constuctor.
1370
1370
* @returns {Prototype } Message instance
1371
1371
*/
1372
- create ( properties ?: Object , ctor ?: ( ( ) => any ) ) : Prototype ;
1372
+ create ( properties ?: Object , ctor ?: any ) : Prototype ;
1373
1373
1374
1374
/**
1375
1375
* Encodes a message of this type.
@@ -1496,7 +1496,7 @@ declare module protobuf {
1496
1496
* @param {Object|string[] } [scope] Function scope
1497
1497
* @returns {function } A function to apply the scope manually when `scope` is an array, otherwise the generated function with scope applied
1498
1498
*/
1499
- type CodegenEnder = ( name ?: string , scope ?: ( Object | string [ ] ) ) => ( ( ) => any ) ;
1499
+ type CodegenEnder = ( name ?: string , scope ?: ( Object | string [ ] ) ) => any ;
1500
1500
1501
1501
/**
1502
1502
* Constructs new long bits.
@@ -1610,14 +1610,14 @@ declare module protobuf {
1610
1610
* If you assign any compatible buffer implementation to this property, the library will use it.
1611
1611
* @type {?Function }
1612
1612
*/
1613
- var Buffer : ( ( ) => any ) ;
1613
+ var Buffer : any ;
1614
1614
1615
1615
/**
1616
1616
* Optional Long class to use.
1617
1617
* If you assign any compatible long implementation to this property, the library will use it.
1618
1618
* @type {?Function }
1619
1619
*/
1620
- var Long : ( ( ) => any ) ;
1620
+ var Long : any ;
1621
1621
1622
1622
/**
1623
1623
* Converts a number or long to an 8 characters long hash string.
@@ -1680,7 +1680,7 @@ declare module protobuf {
1680
1680
* @param {...* } params Function arguments
1681
1681
* @returns {Promise<*> } Promisified function
1682
1682
*/
1683
- function asPromise ( fn : ( ( ) => any ) , ctx : Object , params : any ) : Promise < any > ;
1683
+ function asPromise ( fn : any , ctx : Object , params : any ) : Promise < any > ;
1684
1684
1685
1685
/**
1686
1686
* Fetches the contents of a file.
@@ -1689,7 +1689,7 @@ declare module protobuf {
1689
1689
* @param {function(?Error, string=) } [callback] Node-style callback
1690
1690
* @returns {Promise<string>|undefined } Promise if callback has been omitted
1691
1691
*/
1692
- function fetch ( path : string , callback ?: ( ( ) => any ) ) : ( Promise < string > | undefined ) ;
1692
+ function fetch ( path : string , callback ?: any ) : ( Promise < string > | undefined ) ;
1693
1693
1694
1694
/**
1695
1695
* Tests if the specified path is absolute.
@@ -1811,7 +1811,7 @@ declare module protobuf {
1811
1811
* @param {number } val Value to write
1812
1812
* @returns {Writer } `this`
1813
1813
*/
1814
- push ( fn : ( ( ) => any ) , len : number , val : number ) : Writer ;
1814
+ push ( fn : any , len : number , val : number ) : Writer ;
1815
1815
1816
1816
/**
1817
1817
* Writes a tag.
0 commit comments