8000 add various externs declarations · ExodusMovement/bytebuffer.js@6384cb4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6384cb4

Browse files
committed
add various externs declarations
1 parent a7a250d commit 6384cb4

File tree

2 files changed

+142
-0
lines changed

2 files changed

+142
-0
lines changed

externs/ByteBuffer.js

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,47 @@ ByteBuffer.prototype.LE = function(littleEndian) {};
113113
*/
114114
ByteBuffer.prototype.BE = function(bigEndian) {};
115115

116+
/**
117+
* @param {string} str
118+
* @param {boolean} littleEndian
119+
* @param {boolean} noAssert
120+
* @returns {!ByteBuffer}
121+
*/
122+
ByteBuffer.prototype.fromBase64 = function(str, littleEndian, noAssert) {};
123+
124+
/**
125+
* @param {string} str
126+
* @param {boolean} littleEndian
127+
* @param {boolean} noAssert
128+
* @returns {!ByteBuffer}
129+
*/
130+
ByteBuffer.prototype.fromBinary = function(str, littleEndian, noAssert) {};
131+
132+
/**
133+
* @param {string} str
134+
* @param {boolean} littleEndian
135+
* @param {boolean} noAssert
136+
* @returns {!ByteBuffer}
137+
*/
138+
ByteBuffer.prototype.fromDebug = function(str, littleEndian, noAssert) {};
139+
140+
/**
141+
* @param {string} str
142+
* @param {boolean} littleEndian
143+
* @param {boolean} noAssert
144+
* @returns {!ByteBuffer}
145+
*/
146+
ByteBuffer.prototype.fromHex = function(str, littleEndian, noAssert) {};
147+
148+
/**
149+
* @param {string} str
150+
* @param {boolean} littleEndian
151+
* @param {boolean} noAssert
152+
* @returns {!ByteBuffer}
153+
*/
154+
ByteBuffer.prototype.fromUTF8 = function(str, littleEndian, noAssert) {};
155+
156+
116157
/**
117158
* @param {number} capacity
118159
* @returns {boolean}
@@ -212,6 +253,15 @@ ByteBuffer.prototype.append = function(src, offset) {};
212253
*/
213254
ByteBuffer.prototype.prepend = function(src, offset) {};
214255

256+
/**
257+
* @param {number|string} value
258+
* @param {number} begin
259+
* @param {number} end
260+
* @returns {!ByteBuffer}
261+
*/
262+
ByteBuffer.prototype.fill = function(value, begin, end) {};
263+
264+
215265
/**
216266
* @param {number} value
217267
* @param {number=} offset
@@ -494,6 +544,21 @@ ByteBuffer.prototype.writeZigZagVarint64 = function(value, offset) {};
494544
*/
495545
ByteBuffer.prototype.readZigZagVarint64 = function(offset) {};
496546

547+
/**
548+
* @param {number|Long} value
549+
* @param {number=} offset
550+
* @returns {!ByteBuffer|number}
551+
* @throws {Error}
552+
*/
553+
ByteBuffer.prototype.writeVarint64ZigZag = function(value, offset) {};
554+
555+
/**
556+
* @param {number=} offset
557+
* @returns {!Long|{value: !Long, length: number}}
558+
* @throws {Error}
559+
*/
560+
ByteBuffer.prototype.readVarint64ZigZag = function(offset) {};
561+
497562
/**
498563
* @param {number} value
499564
* @param {number=} offset
@@ -545,6 +610,12 @@ ByteBuffer.calculateVarint64 = function(value) {};
545610
*/
546611
ByteBuffer.calculateUTF8String = function(str) {};
547612

613+
/**
614+
* @param {string} str
615+
* @returns {number}
616+
*/
617+
ByteBuffer.prototype.calculateUTF8Bytes = function(str) {};
618+
548619
/**
549620
* @param {string} str
550621
* @param {number=} offset

externs/bytebuffer.js

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,47 @@ ByteBuffer.prototype.LE = function(littleEndian) {};
113113
*/
114114
ByteBuffer.prototype.BE = function(bigEndian) {};
115115

116+
/**
117+
* @param {string} str
118+
* @param {boolean} littleEndian
119+
* @param {boolean} noAssert
120+
* @returns {!ByteBuffer}
121+
*/
122+
ByteBuffer.prototype.fromBase64 = function(str, littleEndian, noAssert) {};
123+
124+
/**
125+
* @param {string} str
126+
* @param {boolean} littleEndian
127+
* @param {boolean} noAssert
128+
* @returns {!ByteBuffer}
129+
*/
130+
ByteBuffer.prototype.fromBinary = function(str, littleEndian, noAssert) {};
131+
132+
/**
133+
* @param {string} str
134+
* @param {boolean} littleEndian
135+
* @param {boolean} noAssert
136+
* @returns {!ByteBuffer}
137+
*/
138+
ByteBuffer.prototype.fromDebug = function(str, littleEndian, noAssert) {};
139+
140+
/**
141+
* @param {string} str
142+
* @param {boolean} littleEndian
143+
* @param {boolean} noAssert
144+
* @returns {!ByteBuffer}
145+
*/
146+
ByteBuffer.prototype.fromHex = function(str, littleEndian, noAssert) {};
147+
148+
/**
149+
* @param {string} str
150+
* @param {boolean} littleEndian
151+
* @param {boolean} noAssert
152+
* @returns {!ByteBuffer}
153+
*/
154+
ByteBuffer.prototype.fromUTF8 = function(str, littleEndian, noAssert) {};
155+
156+
116157
/**
117158
* @param {number} capacity
118159
* @returns {boolean}
@@ -212,6 +253,15 @@ ByteBuffer.prototype.append = function(src, offset) {};
212253
*/
213254
ByteBuffer.prototype.prepend = function(src, offset) {};
214255

256+
/**
257+
* @param {number|string} value
258+
* @param {number} begin
259+
* @param {number} end
260+
* @returns {!ByteBuffer}
261+
*/
262+
ByteBuffer.prototype.fill = function(value, begin, end) {};
263+
264+
215265
/**
216266
* @param {number} value
217267
* @param {number=} offset
@@ -494,6 +544,21 @@ ByteBuffer.prototype.writeZigZagVarint64 = function(value, offset) {};
494544
*/
495545
ByteBuffer.prototype.readZigZagVarint64 = function(offset) {};
496546

547+
/**
548+
* @param {number|Long} value
549+
* @param {number=} offset
550+
* @returns {!ByteBuffer|number}
551+
* @throws {Error}
552+
*/
553+
ByteBuffer.prototype.writeVarint64ZigZag = function(value, offset) {};
554+
555+
/**
556+
* @param {number=} offset
557+
* @returns {!Long|{value: !Long, length: number}}
558+
* @throws {Error}
559+
*/
560+
ByteBuffer.prototype.readVarint64ZigZag = function(offset) {};
561+
497562
/**
498563
* @param {number} value
499564
* @param {number=} offset
@@ -545,6 +610,12 @@ ByteBuffer.calculateVarint64 = function(value) {};
545610
*/
546611
ByteBuffer.calculateUTF8String = function(str) {};
547612

613+
/**
614+
* @param {string} str
615+
* @returns {number}
616+
*/
617+
ByteBuffer.prototype.calculateUTF8Bytes = function(str) {};
618+
548619
/**
549620
* @param {string} str
550621
* @param {number=} offset

0 commit comments

Comments
 (0)
0