TreeMapNode Interface
A map of string keys to tree objects.
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 TreeMapNode<T extends ImplicitAllowedTypes = ImplicitAllowedTypes> extends ReadonlyMap<string, TreeNodeFromImplicitAllowedTypes<T>>, TreeNode
Extends: ReadonlyMap<string, TreeNodeFromImplicitAllowedTypes<T>>, TreeNode
Type Parameters
| Parameter | Constraint | Default | Description |
|---|---|---|---|
| T | ImplicitAllowedTypes | ImplicitAllowedTypes |
Methods
| Method | Return Type | Description |
|---|---|---|
| delete(key) | void | Removes the specified element from this map by its key. |
| entries() | IterableIterator<[string, TreeNodeFromImplicitAllowedTypes<T>]> | Returns an iterable of key, value pairs for every entry in the map. |
| forEach(callbackfn, thisArg) | void | Executes the provided function once per each key/value pair in this map. |
| keys() | IterableIterator<string> | Returns an iterable of keys in the map. |
| set(key, value) | void | Adds or updates an entry in the map with a specified key and a value. |
| values() | IterableIterator<TreeNodeFromImplicitAllowedTypes<T>> | Returns an iterable of values in the map. |
Method Details
delete
Removes the specified element from this map by its key.
Signature
delete(key: string): void;
Remarks
Note: unlike JavaScript's Map API, this method does not return a flag indicating whether or not the value was deleted.
Parameters
| Parameter | Type | Description |
|---|---|---|
| key | string | The key of the element to remove from the map. |
entries
Returns an iterable of key, value pairs for every entry in the map.
Signature
entries(): IterableIterator<[string, TreeNodeFromImplicitAllowedTypes<T>]>;
Remarks
Note: no guarantees are made regarding the order of the entries returned. If your usage scenario depends on consistent ordering, you will need to sort these yourself.