Skip to content

Type

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

Represents an IDL type.

T = any

new Type<T>(): Type<T>

Type<T>

abstract readonly name: string

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

abstract protected _buildTypeTableImpl(typeTable): void

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

TypeTable

void


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

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

D

R

Visitor<D, R>

D

R


buildTypeTable(typeTable): void

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

TypeTable

void


abstract checkType(t): Type

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

Type

Type


abstract covariant(x): x is T

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

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

any

x is T


abstract decodeValue(x, t): T

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

PipeArrayBuffer

Type

T


display(): string

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

string


abstract encodeType(typeTable): Uint8Array

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

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

TypeTable

Uint8Array


abstract encodeValue(x): Uint8Array

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

Internal

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

T

Uint8Array


valueToString(x): string

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

T

string