Class: ObservableProcedureMap
Defined in: packages/blockly/core/observable_procedure_map.ts:11
Extends
Map<string,IProcedureModel>
Implements
Properties index
| Property | Description |
|---|---|
| size | Returns the number of elements in the Map. |
| [toStringTag] | - |
| [species] | - |
Methods index
| Method | Description |
|---|---|
| set | Adds the given procedure model to the procedure map. |
| delete | Deletes the ProcedureModel with the given ID from the procedure map (if it exists). |
| clear | Removes all ProcedureModels from the procedure map. |
| add | Adds the given ProcedureModel to the map of procedure models, so that blocks can find it. |
| getProcedures | Returns all of the procedures stored in this map. |
| forEach | Executes a provided function once per each key/value pair in the Map, in insertion order. |
| get | 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. |
| has | Returns boolean indicating whether an element with the specified key exists or not. |
| [iterator] | Returns an iterable of entries in the map. |
| entries | Returns an iterable of key, value pairs for every entry in the map. |
| keys | Returns an iterable of keys in the map |
| values | Returns 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
Inherited from
Map.size
[toStringTag]
readonly [toStringTag]: string;
Defined in: node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:135
Implementation of
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
| Parameter | Type |
|---|---|
id | string |
proc | IProcedureModel |
Returns
this
Implementation of
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
| Parameter | Type |
|---|---|
id | string |
Returns
boolean
Implementation of
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
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
| Parameter | Type |
|---|---|
proc | IProcedureModel |
Returns
this
Implementation of
getProcedures()
getProcedures(): IProcedureModel[];
Defined in: packages/blockly/core/observable_procedure_map.ts:63
Returns all of the procedures stored in this map.
Returns
Implementation of
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
| Parameter | Type |
|---|---|
callbackfn | (value, key, map) => void |
thisArg? | any |
Returns
void
Implementation of
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
| Parameter | Type |
|---|---|
key | string |
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
Inherited from
Map.get
has()
has(key): boolean;
Defined in: node_modules/typescript/lib/lib.es2015.collection.d.ts:38
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
boolean
boolean indicating whether an element with the specified key exists or not.
Implementation of
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
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
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
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
Inherited from
Map.values