Skip to content

EmptyClass

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

Represents an IDL Empty, a type which has no inhabitants. Since no values exist for this type, it cannot be serialised or deserialised. Result types like Result<Text, Empty> should always succeed.

new EmptyClass(): EmptyClass

EmptyClass

PrimitiveType.constructor

get name(): string

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

string

PrimitiveType.name


get typeName(): IdlTypeName

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

IdlTypeName

PrimitiveType.typeName

_buildTypeTableImpl(_typeTable): void

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

TypeTable

void

PrimitiveType._buildTypeTableImpl


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

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

D

R

Visitor<D, R>

D

R

PrimitiveType.accept


buildTypeTable(typeTable): void

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

TypeTable

void

PrimitiveType.buildTypeTable


checkType(t): Type

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

Type

Type

PrimitiveType.checkType


covariant(x): x is never

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

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

any

x is never

PrimitiveType.covariant


decodeValue(): never

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

never

PrimitiveType.decodeValue


display(): string

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

string

PrimitiveType.display


encodeType(): Uint8Array<ArrayBufferLike>

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

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

Uint8Array<ArrayBufferLike>

PrimitiveType.encodeType


encodeValue(): never

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

Internal

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

never

PrimitiveType.encodeValue


valueToString(): never

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

never

PrimitiveType.valueToString


static [hasInstance](instance): instance is EmptyClass

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

any

instance is EmptyClass