Skip to content

BaseMap

BaseMap is a generic immutable map implementation.

new BaseMap(adapter, mapValue, keys, valueFor): BaseMap

TypeAdapter

unknown

unknown[]

(key) => unknown

BaseMap

aggregateSize(sizer): number

aggregateSize implements AggregateSizeVisitor.

The result is memoized because immutable maps cannot change; mutating subclasses clear the cache when an entry is inserted.

AggregateSizer

number

AggregateSizeVisitor.aggregateSize


contains(index): Val

Contains returns true if the value exists within the object.

Val

Val

Mapper.contains


convertToNative(typeDesc?): unknown

ConvertToNative converts the Value to a native TypeScript value according to the provided type description, or throws if the conversion is not feasible.

unknown

unknown

Mapper.convertToNative


convertToType(typeVal): Val

ConvertToType supports type conversions between CEL value types supported by the expression language.

RefType

Val

Mapper.convertToType


equal(other): Val

Equal returns true if the other value has the same type and content as the implementing value.

Val

Val

Mapper.equal


find(key): Val | undefined

Find returns a value, if one exists, for the input key.

Val

Val | undefined

Mapper.find


fold(folder): void

Folder

void


format(sb): void

string[]

void


get(key): Val

Get the value at the specified index or error.

Val

Val

Mapper.get


isZeroValue(): boolean

boolean


iterator(): Iterator

Iterator returns a new iterator view of the struct.

Iterator

Mapper.iterator


size(): Val

Size returns the number of elements or length of the value.

Val

Mapper.size


toString(): string

Returns a string representation of an object.

string


type(): RefType

Type returns the TypeValue of the value.

RefType

Mapper.type


value(): unknown

Value returns the raw value of the instance which may not be directly compatible with the expression language types.

unknown

Mapper.value