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" />
33
44/*
55 * 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
77 */
88declare module protobuf {
99
@@ -1619,6 +1619,29 @@ declare module protobuf {
16191619 */
16201620 var Long : ( ( ) => any ) ;
16211621
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+
16221645 /**
16231646 * Tests if the specified value is a string.
16241647 * @memberof util
@@ -1693,29 +1716,6 @@ declare module protobuf {
16931716 */
16941717 function resolvePath ( originPath : string , importPath : string , alreadyNormalized ?: boolean ) : string ;
16951718
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-
17191719 /**
17201720 * Merges the properties of the source object into the destination object.
17211721 * @param {Object } dst Destination object
@@ -1742,54 +1742,24 @@ declare module protobuf {
17421742 }
17431743
17441744 /**
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
17491747 */
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 {
17811749 /**
1782- * Verifies a runtime message of this verifier's message type.
1750+ * Verifies a runtime message of ` this` message type.
17831751 * @param {Prototype|Object } message Runtime message or plain object to verify
17841752 * @returns {?string } `null` if valid, otherwise the reason why it is not
1753+ * @this {Type}
17851754 */
1786- verify ( message : ( Prototype | Object ) ) : string ;
1755+ function fallback ( message : ( Prototype | Object ) ) : string ;
17871756
17881757 /**
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
17911761 */
1792- generate ( ) : ( ( ) => any ) ;
1762+ function generate ( mtype : Type ) : util . CodegenAppender ;
17931763
17941764 }
17951765
0 commit comments