PrimitiveType
Defined in: packages/candid/src/idl.ts:278
Represents an IDL type.
Extends
Section titled “Extends”Type<T>
Extended by
Section titled “Extended by”EmptyClassBoolClassNullClassReservedClassTextClassIntClassNatClassFloatClassFixedIntClassFixedNatClassPrincipalClass
Type Parameters
Section titled “Type Parameters”T = any
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new PrimitiveType<
T>():PrimitiveType<T>
Returns
Section titled “Returns”PrimitiveType<T>
Inherited from
Section titled “Inherited from”Properties
Section titled “Properties”
abstractreadonlyname:string
Defined in: packages/candid/src/idl.ts:233
Inherited from
Section titled “Inherited from”typeName
Section titled “typeName”
abstractreadonlytypeName:IdlTypeName
Defined in: packages/candid/src/idl.ts:232
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”_buildTypeTableImpl()
Section titled “_buildTypeTableImpl()”_buildTypeTableImpl(
_typeTable):void
Defined in: packages/candid/src/idl.ts:286
Parameters
Section titled “Parameters”_typeTable
Section titled “_typeTable”TypeTable
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”accept()
Section titled “accept()”
abstractaccept<D,R>(v,d):R
Defined in: packages/candid/src/idl.ts:234
Type Parameters
Section titled “Type Parameters”D
R
Parameters
Section titled “Parameters”Visitor<D, R>
D
Returns
Section titled “Returns”R
Inherited from
Section titled “Inherited from”buildTypeTable()
Section titled “buildTypeTable()”buildTypeTable(
typeTable):void
Defined in: packages/candid/src/idl.ts:246
Parameters
Section titled “Parameters”typeTable
Section titled “typeTable”TypeTable
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”checkType()
Section titled “checkType()”checkType(
t):Type
Defined in: packages/candid/src/idl.ts:279
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Overrides
Section titled “Overrides”covariant()
Section titled “covariant()”
abstractcovariant(x):x is T
Defined in: packages/candid/src/idl.ts:256
Assert that JavaScript’s x is the proper type represented by this
Type.
Parameters
Section titled “Parameters”any
Returns
Section titled “Returns”x is T
Inherited from
Section titled “Inherited from”decodeValue()
Section titled “decodeValue()”
abstractdecodeValue(x,t):T
Defined in: packages/candid/src/idl.ts:273
Parameters
Section titled “Parameters”Returns
Section titled “Returns”T
Inherited from
Section titled “Inherited from”display()
Section titled “display()”display():
string
Defined in: packages/candid/src/idl.ts:237
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”encodeType()
Section titled “encodeType()”
abstractencodeType(typeTable):Uint8Array
Defined in: packages/candid/src/idl.ts:269
Implement I in the IDL spec.
Encode this type for the type table.
Parameters
Section titled “Parameters”typeTable
Section titled “typeTable”TypeTable
Returns
Section titled “Returns”Uint8Array
Inherited from
Section titled “Inherited from”encodeValue()
Section titled “encodeValue()”
abstractencodeValue(x):Uint8Array
Defined in: packages/candid/src/idl.ts:263
Internal
Encode the value. This needs to be public because it is used by encodeValue() from different types.
Parameters
Section titled “Parameters”T
Returns
Section titled “Returns”Uint8Array
Inherited from
Section titled “Inherited from”valueToString()
Section titled “valueToString()”valueToString(
x):string
Defined in: packages/candid/src/idl.ts:241
Parameters
Section titled “Parameters”T
Returns
Section titled “Returns”string