Skip to content

UnknownClass

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

Represents an IDL Unknown, a placeholder type for deserialization only. When decoding a value as Unknown, all fields will be retained but the names are only available in hashed form. A deserialized unknown will offer it’s actual type by calling the type() function. Unknown cannot be serialized and attempting to do so will throw an error.

new UnknownClass(): UnknownClass

UnknownClass

Type.constructor

get name(): string

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

string

Type.name


get typeName(): IdlTypeName

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

IdlTypeName

Type.typeName

protected _buildTypeTableImpl(): void

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

void

Type._buildTypeTableImpl


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

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

D

R

Visitor<D, R>

D

R

Type.accept


buildTypeTable(typeTable): void

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

TypeTable

void

Type.buildTypeTable


checkType(_t): Type

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

Type

Type

Type.checkType


covariant(x): x is any

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

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

any

x is any

Type.covariant


decodeValue(b, t): any

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

PipeArrayBuffer

Type

any

Type.decodeValue


display(): string

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

string

Type.display


encodeType(): never

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

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

never

Type.encodeType


encodeValue(): never

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

Internal

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

never

Type.encodeValue


valueToString(): never

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

never

Type.valueToString


static [hasInstance](instance): instance is UnknownClass

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

any

instance is UnknownClass