1
- /// <reference path="../node_modules/@types/ node/index.d.ts " />
2
- /// <reference path="../node_modules/@types/ long/index.d.ts " />
1
+ /// <reference types=" node" />
2
+ /// <reference types=" long" />
3
3
4
4
/*
5
5
* protobuf.js v6.0.1 TypeScript definitions
6
- * Generated Thu, 01 Dec 2016 15:54:46 UTC
6
+ * Generated Fri, 02 Dec 2016 12:20:52 UTC
7
7
*/
8
8
declare module protobuf {
9
9
@@ -1619,6 +1619,29 @@ declare module protobuf {
1619
1619
*/
1620
1620
var Long : ( ( ) => any ) ;
1621
1621
1622
+ /**
1623
+ * Converts a number or long to an 8 characters long hash string.
1624
+ * @param {Long|number } value Value to convert
1625
+ * @returns {string } Hash
1626
+ */
1627
+ function longToHash ( value : ( Long | number ) ) : string ;
1628
+
1629
+ /**
1630
+ * Converts an 8 characters long hash string to a long or number.
1631
+ * @param {string } hash Hash
1632
+ * @param {boolean } [unsigned=false] Whether unsigned or not
1633
+ * @returns {Long|number } Original value
1634
+ */
1635
+ function longFromHash ( hash : string , unsigned ?: boolean ) : ( Long | number ) ;
1636
+
1637
+ /**
1638
+ * Tests if two possibly long values are not equal.
1639
+ * @param {number|Long } a First value
1640
+ * @param {number|Long } b Second value
1641
+ * @returns {boolean } `true` if not equal
1642
+ */
1643
+ function longNeq ( a : ( number | Long ) , b : ( number | Long ) ) : boolean ;
1644
+
1622
1645
/**
1623
1646
* Tests if the specified value is a string.
1624
1647
* @memberof util
@@ -1693,29 +1716,6 @@ declare module protobuf {
1693
1716
*/
1694
1717
function resolvePath ( originPath : string , importPath : string , alreadyNormalized ?: boolean ) : string ;
1695
1718
1696
- /**
1697
- * Converts a number or long to an 8 characters long hash string.
1698
- * @param {Long|number } value Value to convert
1699
- * @returns {string } Hash
1700
- */
1701
- function longToHash ( value : ( Long | number ) ) : string ;
1702
-
1703
- /**
1704
- * Converts an 8 characters long hash string to a long or number.
1705
- * @param {string } hash Hash
1706
- * @param {boolean } [unsigned=false] Whether unsigned or not
1707
- * @returns {Long|number } Original value
1708
- */
1709
- function longFromHash ( hash : string , unsigned ?: boolean ) : ( Long | number ) ;
1710
-
1711
- /**
1712
- * Tests if two possibly long values are not equal.
1713
- * @param {number|Long } a First value
1714
- * @param {number|Long } b Second value
1715
- * @returns {boolean } `true` if not equal
1716
- */
1717
- function longNeq ( a : ( number | Long ) , b : ( number | Long ) ) : boolean ;
1718
-
1719
1719
/**
1720
1720
* Merges the properties of the source object into the destination object.
1721
1721
* @param {Object } dst Destination object
@@ -1742,54 +1742,24 @@ declare module protobuf {
1742
1742
}
1743
1743
1744
1744
/**
1745
- * Constructs a new verifier for the specified message type.
1746
- * @classdesc Runtime message verifier using code generation on top of reflection.
1747
- * @constructor
1748
- * @param {Type } type Message type
1745
+ * Runtime message verifier using code generation on top of reflection.
1746
+ * @namespace
1749
1747
*/
1750
- class Verifier {
1751
- /**
1752
- * Constructs a new verifier for the specified message type.
1753
- * @classdesc Runtime message verifier using code generation on top of reflection.
1754
- * @constructor
1755
- * @param {Type } type Message type
1756
- */
1757
- constructor ( type : Type ) ;
1758
-
1759
- /**
1760
- * Message type.
1761
- * @type {Type }
1762
- */
1763
- type : Type ;
1764
-
1765
- /**
1766
- * Fields of this verifier's message type as an array for iteration.
1767
- * @name Verifier#fieldsArray
1768
- * @type {Field[] }
1769
- * @readonly
1770
- */
1771
- fieldsArray : Field [ ] ;
1772
-
1773
- /**
1774
- * Full name of this verifier's message type.
1775
- * @name Verifier#fullName
1776
- * @type {string }
1777
- * @readonly
1778
- */
1779
- fullName : string ;
1780
-
1748
+ module verifier {
1781
1749
/**
1782
- * Verifies a runtime message of this verifier's message type.
1750
+ * Verifies a runtime message of ` this` message type.
1783
1751
* @param {Prototype|Object } message Runtime message or plain object to verify
1784
1752
* @returns {?string } `null` if valid, otherwise the reason why it is not
1753
+ * @this {Type}
1785
1754
*/
1786
- verify ( message : ( Prototype | Object ) ) : string ;
1755
+ function fallback ( message : ( Prototype | Object ) ) : string ;
1787
1756
1788
1757
/**
1789
- * Generates a verifier specific to this verifier's message type.
1790
- * @returns {function } Verifier function with an identical signature to {@link Verifier#verify}
1758
+ * Generates a verifier specific to the specified message type.
1759
+ * @param {Type } mtype Message type
1760
+ * @returns {util.CodegenAppender } Unscoped codegen instance
1791
1761
*/
1792
- generate ( ) : ( ( ) => any ) ;
1762
+ function generate ( mtype : Type ) : util . CodegenAppender ;
1793
1763
1794
1764
}
1795
1765
0 commit comments