Skip to content

PrimitiveType

Defined in: packages/core/src/candid/idl.ts:279

Represents an IDL type.

T = any

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

PrimitiveType<T>

Type.constructor

abstract readonly name: string

Defined in: packages/core/src/candid/idl.ts:234

Type.name


abstract readonly typeName: IdlTypeName

Defined in: packages/core/src/candid/idl.ts:233

Type.typeName

_buildTypeTableImpl(_typeTable): void

Defined in: packages/core/src/candid/idl.ts:287

TypeTable

void

Type._buildTypeTableImpl


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

Defined in: packages/core/src/candid/idl.ts:235

D

R

Visitor<D, R>

D

R

Type.accept


buildTypeTable(typeTable): void

Defined in: packages/core/src/candid/idl.ts:247

TypeTable

void

Type.buildTypeTable


checkType(t): Type

Defined in: packages/core/src/candid/idl.ts:280

Type

Type

Type.checkType


abstract covariant(x): x is T

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

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/core/src/candid/idl.ts:274

PipeArrayBuffer

Type

T

Type.decodeValue


display(): string

Defined in: packages/core/src/candid/idl.ts:238

string

Type.display


abstract encodeType(typeTable): Uint8Array

Defined in: packages/core/src/candid/idl.ts:270

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

TypeTable

Uint8Array

Type.encodeType


abstract encodeValue(x): Uint8Array

Defined in: packages/core/src/candid/idl.ts:264

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/core/src/candid/idl.ts:242

T

string

Type.valueToString