Defined in ref-array/ref-array.d.ts:11
Defined in ref-array/ref-array.d.ts:44
The array type meta-constructor.
The returned constructor's API is highly influenced by the WebGL
TypedArray API.
( length?: number ) : { length: number; toArray(): T[]; toJSON(): T[]; inspect(): string; buffer: Buffer; ref(): Buffer; [i: number]: T; }
Defined in ref-array/ref-array.d.ts:31
Parameters
Returns
{ length: number; toArray(): T[]; toJSON(): T[]; inspect(): string; buffer: Buffer; ref(): Buffer; [i: number]: T; }
( data: Array<number> , length?: number ) : { length: number; toArray(): T[]; toJSON(): T[]; inspect(): string; buffer: Buffer; ref(): Buffer; [i: number]: T; }
Defined in ref-array/ref-array.d.ts:33
Parameters
data: Array<number>
length?: number optional
Returns
{ length: number; toArray(): T[]; toJSON(): T[]; inspect(): string; buffer: Buffer; ref(): Buffer; [i: number]: T; }
( data: Buffer , length?: number ) : { length: number; toArray(): T[]; toJSON(): T[]; inspect(): string; buffer: Buffer; ref(): Buffer; [i: number]: T; }
Defined in ref-array/ref-array.d.ts:35
Parameters
Returns
{ length: number; toArray(): T[]; toJSON(): T[]; inspect(): string; buffer: Buffer; ref(): Buffer; [i: number]: T; }
constructor( length?: number ) : { length: number; toArray(): T[]; toJSON(): T[]; inspect(): string; buffer: Buffer; ref(): Buffer; [i: number]: T; }
Defined in ref-array/ref-array.d.ts:25
Parameters
Returns
{ length: number; toArray(): T[]; toJSON(): T[]; inspect(): string; buffer: Buffer; ref(): Buffer; [i: number]: T; }
constructor( data: Array<number> , length?: number ) : { length: number; toArray(): T[]; toJSON(): T[]; inspect(): string; buffer: Buffer; ref(): Buffer; [i: number]: T; }
Defined in ref-array/ref-array.d.ts:27
Parameters
data: Array<number>
length?: number optional
Returns
{ length: number; toArray(): T[]; toJSON(): T[]; inspect(): string; buffer: Buffer; ref(): Buffer; [i: number]: T; }
constructor( data: Buffer , length?: number ) : { length: number; toArray(): T[]; toJSON(): T[]; inspect(): string; buffer: Buffer; ref(): Buffer; [i: number]: T; }
Defined in ref-array/ref-array.d.ts:29
Parameters
Returns
{ length: number; toArray(): T[]; toJSON(): T[]; inspect(): string; buffer: Buffer; ref(): Buffer; [i: number]: T; }
public BYTES_PER_ELEMENT: number
Defined in ref-array/ref-array.d.ts:12
optional public alignment?: number
The alignment of this datatype when placed inside a struct.
public fixedLength: number
Defined in ref-array/ref-array.d.ts:13
public indirection: number
The current level of indirection of the buffer.
optional public name?: string
Inherited from
Type .name
Defined in ref/ref.d.ts:18
The name to use during debugging for this datatype.
public size: number
Inherited from
Type .size
Defined in ref/ref.d.ts:10
The size in bytes required to hold this datatype.
public type: Type
Defined in ref-array/ref-array.d.ts:15
The reference to the base type.
public get( buffer: Buffer , offset: number ) : any
Inherited from
Type .get
Defined in ref/ref.d.ts:14
To invoke when ref.get
is invoked on a buffer of this type.
Parameters
Returns
any
public set( buffer: Buffer , offset: number , value: any )
Inherited from
Type .set
Defined in ref/ref.d.ts:16
To invoke when ref.set
is invoked on a buffer of this type.
Parameters
offset: number
value: any
public untilZeros( buffer: Buffer ) : { length: number; toArray(): T[]; toJSON(): T[]; inspect(): string; buffer: Buffer; ref(): Buffer; [i: number]: T; }
Defined in ref-array/ref-array.d.ts:22
Accepts a Buffer instance that should be an already-populated with data
for the ArrayType. The "length" of the Array is determined by searching
through the buffer's contents until an aligned NULL pointer is encountered.
Parameters
Returns
{ length: number; toArray(): T[]; toJSON(): T[]; inspect(): string; buffer: Buffer; ref(): Buffer; [i: number]: T; }