Skip to content

PrimitiveType

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

Represents an IDL type.

T = any

new PrimitiveType<T>(): PrimitiveType<T>

PrimitiveType<T>

Type.constructor

abstract readonly name: string

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

Type.name

_buildTypeTableImpl(_typeTable): void

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

TypeTable

void

Type._buildTypeTableImpl


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

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

D

R

Visitor<D, R>

D

R

Type.accept


buildTypeTable(typeTable): void

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

TypeTable

void

Type.buildTypeTable


checkType(t): Type

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

Type

Type

Type.checkType


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

Type.covariant


abstract decodeValue(x, t): T

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

PipeArrayBuffer

Type

T

Type.decodeValue


display(): string

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

string

Type.display


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

Type.encodeType


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

Type.encodeValue


valueToString(x): string

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

T

string

Type.valueToString