@types/flatbuffers
Advanced tools
Comparing version 1.6.4 to 1.6.5
@@ -10,13 +10,4 @@ // Type definitions for flatbuffers 1.6 | ||
namespace flatbuffers { | ||
/** | ||
* @typedef {number} | ||
*/ | ||
type Offset = number; | ||
/** | ||
* @typedef {{ | ||
* bb: flatbuffers.ByteBuffer, | ||
* bb_pos: number | ||
* }} | ||
*/ | ||
interface Table { | ||
@@ -27,47 +18,11 @@ bb: ByteBuffer; | ||
/** | ||
* @type {number} | ||
* @const | ||
*/ | ||
const SIZEOF_SHORT: number; | ||
/** | ||
* @type {number} | ||
* @const | ||
*/ | ||
const SIZEOF_INT: number; | ||
/** | ||
* @type {number} | ||
* @const | ||
*/ | ||
const FILE_IDENTIFIER_LENGTH: number; | ||
/** | ||
* @enum {number} | ||
*/ | ||
enum Encoding { UTF8_BYTES, UTF16_STRING } | ||
/** | ||
* @type {Int32Array} | ||
* @const | ||
*/ | ||
const int32: Int32Array; | ||
/** | ||
* @type {Float32Array} | ||
* @const | ||
*/ | ||
const float32: Float32Array; | ||
/** | ||
* @type {Float64Array} | ||
* @const | ||
*/ | ||
const float64: Float64Array; | ||
/** | ||
* @type {boolean} | ||
* @const | ||
*/ | ||
const isLittleEndian: boolean; | ||
@@ -78,42 +33,8 @@ | ||
class Long { | ||
/** | ||
* @type {number} | ||
* @const | ||
*/ | ||
low: number; | ||
/** | ||
* @type {number} | ||
* @const | ||
*/ | ||
high: number; | ||
/** | ||
* @type {flatbuffers.Long} | ||
* @const | ||
*/ | ||
static ZERO: Long; | ||
/** | ||
* @constructor | ||
* @param {number} high | ||
* @param {number} low | ||
*/ | ||
constructor(low: number, high: number); | ||
/** | ||
* @returns {number} | ||
*/ | ||
toFloat64(): number; | ||
/** | ||
* @param {flatbuffers.Long} other | ||
* @returns {boolean} | ||
*/ | ||
equals(other: any): boolean; | ||
/** | ||
* @param {number} low | ||
* @param {number} high | ||
*/ | ||
static create(low: number, high: number): Long; | ||
@@ -125,6 +46,2 @@ } | ||
class Builder { | ||
/** | ||
* @constructor | ||
* @param {number=} initial_size | ||
*/ | ||
constructor(initial_size?: number); | ||
@@ -137,3 +54,3 @@ | ||
* | ||
* @param {boolean} forceDefaults true always serializes default values | ||
* @param forceDefaults true always serializes default values | ||
*/ | ||
@@ -146,4 +63,2 @@ forceDefaults(forceDefaults: boolean): void; | ||
* not necessarily at 0. | ||
* | ||
* @returns {flatbuffers.ByteBuffer} | ||
*/ | ||
@@ -156,4 +71,2 @@ dataBuffer(): ByteBuffer; | ||
* not necessarily at 0. | ||
* | ||
* @returns {Uint8Array} | ||
*/ | ||
@@ -168,119 +81,29 @@ asUint8Array(): Uint8Array; | ||
* | ||
* @param {number} size This is the of the new element to write | ||
* @param {number} additional_bytes The padding size | ||
* @param size This is the of the new element to write | ||
* @param additional_bytes The padding size | ||
*/ | ||
prep(size: number, additional_bytes: number): void; | ||
/** | ||
* @param {number} byte_size | ||
*/ | ||
pad(byte_size: number): void; | ||
/** | ||
* @param {number} value | ||
*/ | ||
writeInt8(value: number): void; | ||
/** | ||
* @param {number} value | ||
*/ | ||
writeInt16(value: number): void; | ||
/** | ||
* @param {number} value | ||
*/ | ||
writeInt32(value: number): void; | ||
/** | ||
* @param {flatbuffers.Long} value | ||
*/ | ||
writeInt64(value: Long): void; | ||
/** | ||
* @param {number} value | ||
*/ | ||
writeFloat32(value: number): void; | ||
/** | ||
* @param {number} value | ||
*/ | ||
writeFloat64(value: number): void; | ||
/** | ||
* @param {number} value | ||
*/ | ||
addInt8(value: number): void; | ||
/** | ||
* @param {number} value | ||
*/ | ||
addInt16(value: number): void; | ||
/** | ||
* @param {number} value | ||
*/ | ||
addInt32(value: number): void; | ||
/** | ||
* @param {flatbuffers.Long} value | ||
*/ | ||
addInt64(value: Long): void; | ||
/** | ||
* @param {number} value | ||
*/ | ||
addFloat32(value: number): void; | ||
/** | ||
* @param {number} value | ||
*/ | ||
addFloat64(value: number): void; | ||
/** | ||
* @param {number} voffset | ||
* @param {number} value | ||
* @param {number} defaultValue | ||
*/ | ||
addFieldInt8(voffset: number, value: number, defaultValue: number): void; | ||
/** | ||
* @param {number} voffset | ||
* @param {number} value | ||
* @param {number} defaultValue | ||
*/ | ||
addFieldInt16(voffset: number, value: number, defaultValue: number): void; | ||
/** | ||
* @param {number} voffset | ||
* @param {number} value | ||
* @param {number} defaultValue | ||
*/ | ||
addFieldInt32(voffset: number, value: number, defaultValue: number): void; | ||
/** | ||
* @param {number} voffset | ||
* @param {flatbuffers.Long} value | ||
* @param {flatbuffers.Long} defaultValue | ||
*/ | ||
addFieldInt64(voffset: number, value: Long, defaultValue: Long): void; | ||
/** | ||
* @param {number} voffset | ||
* @param {number} value | ||
* @param {number} defaultValue | ||
*/ | ||
addFieldFloat32(voffset: number, value: number, defaultValue: number): void; | ||
/** | ||
* @param {number} voffset | ||
* @param {number} value | ||
* @param {number} defaultValue | ||
*/ | ||
addFieldFloat64(voffset: number, value: number, defaultValue: number): void; | ||
/** | ||
* @param {number} voffset | ||
* @param {flatbuffers.Offset} value | ||
* @param {flatbuffers.Offset} defaultValue | ||
*/ | ||
addFieldOffset(voffset: number, value: Offset, defaultValue: Offset): void; | ||
@@ -290,6 +113,2 @@ | ||
* Structs are stored inline, so nothing additional is being added. `d` is always 0. | ||
* | ||
* @param {number} voffset | ||
* @param {flatbuffers.Offset} value | ||
* @param {flatbuffers.Offset} defaultValue | ||
*/ | ||
@@ -303,3 +122,3 @@ addFieldStruct(voffset: number, value: Offset, defaultValue: Offset): void; | ||
* | ||
* @param {flatbuffers.Offset} obj The offset of the created object | ||
* @param obj The offset of the created object | ||
*/ | ||
@@ -316,4 +135,2 @@ nested(obj: Offset): void; | ||
* Set the current vtable at `voffset` to the current location in the buffer. | ||
* | ||
* @param {number} voffset | ||
*/ | ||
@@ -323,3 +140,3 @@ slot(voffset: number): void; | ||
/** | ||
* @returns {flatbuffers.Offset} Offset relative to the end of the buffer. | ||
* @returns Offset relative to the end of the buffer. | ||
*/ | ||
@@ -332,4 +149,4 @@ offset(): Offset; | ||
* | ||
* @param {flatbuffers.ByteBuffer} bb The current buffer with the existing data | ||
* @returns {flatbuffers.ByteBuffer} A new byte buffer with the old data copied | ||
* @param bb The current buffer with the existing data | ||
* @returns A new byte buffer with the old data copied | ||
* to it. The data is located at the end of the buffer. | ||
@@ -342,3 +159,3 @@ */ | ||
* | ||
* @param {flatbuffers.Offset} offset The offset to add | ||
* @param offset The offset to add | ||
*/ | ||
@@ -351,4 +168,2 @@ addOffset(offset: Offset): void; | ||
* that call this method internally. | ||
* | ||
* @param {number} numfields | ||
*/ | ||
@@ -360,10 +175,6 @@ startObject(numfields: number): void; | ||
* | ||
* @returns {flatbuffers.Offset} The offset to the object inside `dataBuffer` | ||
* @returns The offset to the object inside `dataBuffer` | ||
*/ | ||
endObject(): Offset; | ||
/** | ||
* @param {flatbuffers.Offset} root_table | ||
* @param {string=} file_identifier | ||
*/ | ||
finish(root_table: Offset, file_identifier?: string): void; | ||
@@ -374,5 +185,2 @@ | ||
* just been constructed. | ||
* | ||
* @param {flatbuffers.Offset} table | ||
* @param {number} field | ||
*/ | ||
@@ -386,5 +194,5 @@ requiredField(table: Offset, field: number): void; | ||
* | ||
* @param {number} elem_size The size of each element in the array | ||
* @param {number} num_elems The number of elements in the array | ||
* @param {number} alignment The alignment of the array | ||
* @param elem_size The size of each element in the array | ||
* @param num_elems The number of elements in the array | ||
* @param alignment The alignment of the array | ||
*/ | ||
@@ -397,3 +205,3 @@ startVector(elem_size: number, num_elems: number, alignment: number): void; | ||
* | ||
* @returns {flatbuffers.Offset} The offset at which the newly created array | ||
* @returns The offset at which the newly created array | ||
* starts. | ||
@@ -407,4 +215,4 @@ */ | ||
* | ||
* @param {string|Uint8Array} s The string to encode | ||
* @return {flatbuffers.Offset} The offset in the buffer where the encoded string starts | ||
* @param s The string to encode | ||
* @return The offset in the buffer where the encoded string starts | ||
*/ | ||
@@ -415,6 +223,2 @@ createString(s: string|Uint8Array): Offset; | ||
* Conveniance function for creating Long objects. | ||
* | ||
* @param {number} low | ||
* @param {number} high | ||
* @returns {Long} | ||
*/ | ||
@@ -427,152 +231,34 @@ createLong(low: number, high: number): Long; | ||
class ByteBuffer { | ||
/** | ||
* @constructor | ||
* @param {Uint8Array} bytes | ||
*/ | ||
constructor(bytes: Uint8Array); | ||
/** | ||
* @param {number} byte_size | ||
* @returns {flatbuffers.ByteBuffer} | ||
*/ | ||
static allocate(byte_size: number): ByteBuffer; | ||
/** | ||
* @returns {Uint8Array} | ||
*/ | ||
bytes(): Uint8Array; | ||
/** | ||
* @returns {number} | ||
*/ | ||
position(): number; | ||
/** | ||
* @param {number} position | ||
*/ | ||
setPosition(position: number): void; | ||
/** | ||
* @returns {number} | ||
*/ | ||
capacity(): number; | ||
/** | ||
* @param {number} offset | ||
* @returns {number} | ||
*/ | ||
readInt8(offset: number): number; | ||
/** | ||
* @param {number} offset | ||
* @returns {number} | ||
*/ | ||
readUint8(offset: number): number; | ||
/** | ||
* @param {number} offset | ||
* @returns {number} | ||
*/ | ||
readInt16(offset: number): number; | ||
/** | ||
* @param {number} offset | ||
* @returns {number} | ||
*/ | ||
readUint16(offset: number): number; | ||
/** | ||
* @param {number} offset | ||
* @returns {number} | ||
*/ | ||
readInt32(offset: number): number; | ||
/** | ||
* @param {number} offset | ||
* @returns {number} | ||
*/ | ||
readUint32(offset: number): number; | ||
/** | ||
* @param {number} offset | ||
* @returns {flatbuffers.Long} | ||
*/ | ||
readInt64(offset: number): Long; | ||
/** | ||
* @param {number} offset | ||
* @returns {flatbuffers.Long} | ||
*/ | ||
readUint64(offset: number): Long; | ||
/** | ||
* @param {number} offset | ||
* @returns {number} | ||
*/ | ||
readFloat32(offset: number): number; | ||
/** | ||
* @param {number} offset | ||
* @returns {number} | ||
*/ | ||
readFloat64(offset: number): number; | ||
/** | ||
* @param {number} offset | ||
* @param {number} value | ||
*/ | ||
writeInt8(offset: number, value: number): void; | ||
/** | ||
* @param {number} offset | ||
* @param {number} value | ||
*/ | ||
writeUint8(offset: number, value: number): void; | ||
/** | ||
* @param {number} offset | ||
* @param {number} value | ||
*/ | ||
writeInt16(offset: number, value: number): void; | ||
/** | ||
* @param {number} offset | ||
* @param {number} value | ||
*/ | ||
writeUint16(offset: number, value: number): void; | ||
/** | ||
* @param {number} offset | ||
* @param {number} value | ||
*/ | ||
writeInt32(offset: number, value: number): void; | ||
/** | ||
* @param {number} offset | ||
* @param {number} value | ||
*/ | ||
writeUint32(offset: number, value: number): void; | ||
/** | ||
* @param {number} offset | ||
* @param {flatbuffers.Long} value | ||
*/ | ||
writeInt64(offset: number, value: Long): void; | ||
/** | ||
* @param {number} offset | ||
* @param {flatbuffers.Long} value | ||
*/ | ||
writeUint64(offset: number, value: Long): void; | ||
/** | ||
* @param {number} offset | ||
* @param {number} value | ||
*/ | ||
writeFloat32(offset: number, value: number): void; | ||
/** | ||
* @param {number} offset | ||
* @param {number} value | ||
*/ | ||
writeFloat64(offset: number, value: number): void; | ||
@@ -583,6 +269,2 @@ | ||
* field is not present. | ||
* | ||
* @param {number} bb_pos | ||
* @param {number} vtable_offset | ||
* @returns {number} | ||
*/ | ||
@@ -593,6 +275,2 @@ __offset(bb_pos: number, vtable_offset: number): number; | ||
* Initialize any Table-derived type to point to the union at the given offset. | ||
* | ||
* @param {flatbuffers.Table} t | ||
* @param {number} offset | ||
* @returns {flatbuffers.Table} | ||
*/ | ||
@@ -610,5 +288,3 @@ __union<T extends Table>(t: T, offset: number): T; | ||
* | ||
* @param {number} offset | ||
* @param {flatbuffers.Encoding=} optionalEncoding Defaults to UTF16_STRING | ||
* @returns {string|Uint8Array} | ||
* @param optionalEncoding Defaults to UTF16_STRING | ||
*/ | ||
@@ -619,4 +295,2 @@ __string(offset: number, optionalEncoding?: Encoding): string|Uint8Array; | ||
* Retrieve the relative offset stored at "offset" | ||
* @param {number} offset | ||
* @returns {number} | ||
*/ | ||
@@ -627,5 +301,2 @@ __indirect(offset: number): number; | ||
* Get the start of data of a vector whose offset is stored at "offset" in this object. | ||
* | ||
* @param {number} offset | ||
* @returns {number} | ||
*/ | ||
@@ -636,12 +307,5 @@ __vector(offset: number): number; | ||
* Get the length of a vector whose offset is stored at "offset" in this object. | ||
* | ||
* @param {number} offset | ||
* @returns {number} | ||
*/ | ||
__vector_len(offset: number): number; | ||
/** | ||
* @param {string} ident | ||
* @returns {boolean} | ||
*/ | ||
__has_identifier(ident: string): boolean; | ||
@@ -651,6 +315,2 @@ | ||
* Conveniance function for creating Long objects. | ||
* | ||
* @param {number} low | ||
* @param {number} high | ||
* @returns {Long} | ||
*/ | ||
@@ -657,0 +317,0 @@ createLong(low: number, high: number): Long; |
{ | ||
"name": "@types/flatbuffers", | ||
"version": "1.6.4", | ||
"version": "1.6.5", | ||
"description": "TypeScript definitions for flatbuffers", | ||
@@ -19,4 +19,4 @@ "license": "MIT", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "f017d8a5750ed31cb0aa921a600e48e77e5d605849ab7c14724dd759ee30e3c2", | ||
"typesPublisherContentHash": "067177f6b53d2ef8c2fd106af296e91be71fc72ed2ee8eaa043d71e6fa795302", | ||
"typeScriptVersion": "2.0" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
Additional Details | ||
* Last updated: Mon, 21 Aug 2017 21:49:18 GMT | ||
* Last updated: Wed, 25 Oct 2017 00:19:45 GMT | ||
* Dependencies: none | ||
@@ -14,0 +14,0 @@ * Global values: none |
12228
241