Skip to main content

FluidReadonlyMap Interface

Like TypeScript's built in ReadonlyMap type. Unlike the built in ReadonlyMap, this interface includes Symbol.toStringTag.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature​

/** @sealed */
export interface FluidReadonlyMap<K, V>

Type Parameters​

ParameterDescription
K
V

Properties​

PropertyModifiersTypeDescription
[Symbol.toStringTag]readonlystringSymbol.toStringTag
sizereadonlynumberThe number of entries in the map.

Methods​

MethodReturn TypeDescription
[Symbol.iterator]()FluidIterableIterator<[K, V]>Returns an iterable of entries in the map.
entries()FluidIterableIterator<[K, V]>Returns an iterable of key, value pairs for every entry in the map.
forEach(callbackfn, thisArg)voidExecutes the provided function once per each key/value pair in the map.
get(key)V | undefinedReturns the value associated to the specified key, or undefined if there is none.
has(key)booleanReturns a boolean indicating whether an element with the specified key exists or not.
keys()FluidIterableIterator<K>Returns an iterable of keys in the map.
values()FluidIterableIterator<V>Returns an iterable of values in the map.

Property Details​

[Symbol.toStringTag]​

Symbol.toStringTag

Signature​

readonly [Symbol.toStringTag]: string;

Type: string

size​

The number of entries in the map.

Signature​

readonly size: number;

Type: number

Method Details​

[Symbol.iterator]​

Returns an iterable of entries in the map.

Signature​

[Symbol.iterator](): FluidIterableIterator<[K, V]>;

Returns​

Return type: FluidIterableIterator<[K, V]>

entries​

Returns an iterable of key, value pairs for every entry in the map.

Signature​

entries(): FluidIterableIterator<[K, V]>;

Returns​

Return type: FluidIterableIterator<[K, V]>

forEach​

Executes the provided function once per each key/value pair in the map.

Signature​

forEach(callbackfn: (value: V, key: K, map: FluidReadonlyMap<K, V>) => void, thisArg?: any): void;

Parameters​

ParameterModifiersTypeDescription
callbackfn(value: V, key: K, map: FluidReadonlyMap<K, V>) => void
thisArgoptionalany

get​

Returns the value associated to the specified key, or undefined if there is none.

Signature​

get(key: K): V | undefined;

Parameters​

ParameterTypeDescription
keyK

Returns​

Return type: V | undefined

has​

Returns a boolean indicating whether an element with the specified key exists or not.

Signature​

has(key: K): boolean;

Parameters​

ParameterTypeDescription
keyK

Returns​

Return type: boolean

keys​

Returns an iterable of keys in the map.

Signature​

keys(): FluidIterableIterator<K>;

Returns​

Return type: FluidIterableIterator<K>

values​

Returns an iterable of values in the map.

Signature​

values(): FluidIterableIterator<V>;

Returns​

Return type: FluidIterableIterator<V>