Skip to content

VecClass

Defined in: packages/candid/src/idl.ts:748

Represents an IDL Array

Arrays of fixed-sized nat/int type (e.g. nat8), are encoded from and decoded to TypedArrays (e.g. Uint8Array). Arrays of float or other non-primitive types are encoded/decoded as untyped array in Javascript.

T

new VecClass<T>(_type): VecClass<T>

Defined in: packages/candid/src/idl.ts:757

Type<T>

VecClass<T>

ConstructType.constructor

_type: Type<T>

Defined in: packages/candid/src/idl.ts:757

get name(): string

Defined in: packages/candid/src/idl.ts:926

string

ConstructType.name

_buildTypeTableImpl(typeTable): void

Defined in: packages/candid/src/idl.ts:845

TypeTable

void

ConstructType._buildTypeTableImpl


accept<D, R>(v, d): R

Defined in: packages/candid/src/idl.ts:764

D

R

Visitor<D, R>

D

R

ConstructType.accept


buildTypeTable(typeTable): void

Defined in: packages/candid/src/idl.ts:192

TypeTable

void

ConstructType.buildTypeTable


checkType(t): ConstructType<T[]>

Defined in: packages/candid/src/idl.ts:239

Type

ConstructType<T[]>

ConstructType.checkType


covariant(x): x is T[]

Defined in: packages/candid/src/idl.ts:768

Assert that JavaScript’s x is the proper type represented by this Type.

any

x is T[]

ConstructType.covariant


decodeValue(b, t): T[]

Defined in: packages/candid/src/idl.ts:853

PipeArrayBuffer

Type

T[]

ConstructType.decodeValue


display(): string

Defined in: packages/candid/src/idl.ts:930

string

ConstructType.display


encodeType(typeTable): Uint8Array<ArrayBufferLike>

Defined in: packages/candid/src/idl.ts:249

Implement I in the IDL spec. Encode this type for the type table.

TypeTable

Uint8Array<ArrayBufferLike>

ConstructType.encodeType


encodeValue(x): Uint8Array

Defined in: packages/candid/src/idl.ts:793

Internal

Encode the value. This needs to be public because it is used by encodeValue() from different types.

T[]

Uint8Array

ConstructType.encodeValue


valueToString(x): string

Defined in: packages/candid/src/idl.ts:934

T[]

string

ConstructType.valueToString