Skip to content
Still using @dfinity/agent? Migrate to @icp-sdk/core!

PrimitiveType

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

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:204

Type.name


abstract readonly typeName: IdlTypeName

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

Type.typeName

_buildTypeTableImpl(_typeTable): void

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

TypeTable

void

Type._buildTypeTableImpl


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

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

D

R

Visitor<D, R>

D

R

Type.accept


buildTypeTable(typeTable): void

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

TypeTable

void

Type.buildTypeTable


checkType(t): Type

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

Type

Type

Type.checkType


abstract covariant(x): x is T

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

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:244

PipeArrayBuffer

Type

T

Type.decodeValue


display(): string

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

string

Type.display


abstract encodeType(typeTable): Uint8Array

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

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:234

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:212

T

string

Type.valueToString