Skip to main content

Class: ObservableProcedureMap

Defined in: packages/blockly/core/observable_procedure_map.ts:11

Extends

Implements

Properties index

PropertyDescription
sizeReturns the number of elements in the Map.
[toStringTag]-
[species]-

Methods index

MethodDescription
setAdds the given procedure model to the procedure map.
deleteDeletes the ProcedureModel with the given ID from the procedure map (if it exists).
clearRemoves all ProcedureModels from the procedure map.
addAdds the given ProcedureModel to the map of procedure models, so that blocks can find it.
getProceduresReturns all of the procedures stored in this map.
forEachExecutes a provided function once per each key/value pair in the Map, in insertion order.
getReturns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map.
hasReturns boolean indicating whether an element with the specified key exists or not.
[iterator]Returns an iterable of entries in the map.
entriesReturns an iterable of key, value pairs for every entry in the map.
keysReturns an iterable of keys in the map
valuesReturns an iterable of values in the map

Properties

size

readonly size: number;

Defined in: node_modules/typescript/lib/lib.es2015.collection.d.ts:46

Returns

the number of elements in the Map.

Implementation of

IProcedureMap.size

Inherited from

Map.size

[toStringTag]

readonly [toStringTag]: string;

Defined in: node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:135

Implementation of

IProcedureMap.[toStringTag]

Inherited from

Map.[toStringTag]

[species]

readonly static [species]: MapConstructor;

Defined in: node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:317

Inherited from

Map.[species]

Methods

set()

set(id, proc): this;

Defined in: packages/blockly/core/observable_procedure_map.ts:23

Adds the given procedure model to the procedure map.

Parameters

ParameterType
idstring
procIProcedureModel

Returns

this

Implementation of

IProcedureMap.set

Overrides

Map.set

delete()

delete(id): boolean;

Defined in: packages/blockly/core/observable_procedure_map.ts:34

Deletes the ProcedureModel with the given ID from the procedure map (if it exists).

Parameters

ParameterType
idstring

Returns

boolean

Implementation of

IProcedureMap.delete

Overrides

Map.delete

clear()

clear(): void;

Defined in: packages/blockly/core/observable_procedure_map.ts:45

Removes all ProcedureModels from the procedure map.

Returns

void

Implementation of

IProcedureMap.clear

Overrides

Map.clear

add()

add(proc): this;

Defined in: packages/blockly/core/observable_procedure_map.ts:56

Adds the given ProcedureModel to the map of procedure models, so that blocks can find it.

Parameters

ParameterType
procIProcedureModel

Returns

this

Implementation of

IProcedureMap.add


getProcedures()

getProcedures(): IProcedureModel[];

Defined in: packages/blockly/core/observable_procedure_map.ts:63

Returns all of the procedures stored in this map.

Returns

IProcedureModel[]

Implementation of

IProcedureMap.getProcedures


forEach()

forEach(callbackfn, thisArg?): void;

Defined in: node_modules/typescript/lib/lib.es2015.collection.d.ts:29

Executes a provided function once per each key/value pair in the Map, in insertion order.

Parameters

ParameterType
callbackfn(value, key, map) => void
thisArg?any

Returns

void

Implementation of

IProcedureMap.forEach

Inherited from

Map.forEach

get()

get(key): IProcedureModel | undefined;

Defined in: node_modules/typescript/lib/lib.es2015.collection.d.ts:34

Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map.

Parameters

ParameterType
keystring

Returns

IProcedureModel | undefined

Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned.

Implementation of

IProcedureMap.get

Inherited from

Map.get

has()

has(key): boolean;

Defined in: node_modules/typescript/lib/lib.es2015.collection.d.ts:38

Parameters

ParameterType
keystring

Returns

boolean

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

Implementation of

IProcedureMap.has

Inherited from

Map.has

[iterator]()

iterator: MapIterator<[string, IProcedureModel]>;

Defined in: node_modules/typescript/lib/lib.es2015.iterable.d.ts:141

Returns an iterable of entries in the map.

Returns

MapIterator<[string, IProcedureModel]>

Implementation of

IProcedureMap.[iterator]

Inherited from

Map.[iterator]

entries()

entries(): MapIterator<[string, IProcedureModel]>;

Defined in: node_modules/typescript/lib/lib.es2015.iterable.d.ts:146

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

Returns

MapIterator<[string, IProcedureModel]>

Implementation of

IProcedureMap.entries

Inherited from

Map.entries

keys()

keys(): MapIterator<string>;

Defined in: node_modules/typescript/lib/lib.es2015.iterable.d.ts:151

Returns an iterable of keys in the map

Returns

MapIterator<string>

Implementation of

IProcedureMap.keys

Inherited from

Map.keys

values()

values(): MapIterator<IProcedureModel>;

Defined in: node_modules/typescript/lib/lib.es2015.iterable.d.ts:156

Returns an iterable of values in the map

Returns

MapIterator<IProcedureModel>

Implementation of

IProcedureMap.values

Inherited from

Map.values