Skip to main content
Version: v2

TreeMapNodeUnsafe Interface

Unenforced version of TreeMapNode.

This API is reserved for internal system use and should not be imported directly. It may change at any time without notice.

For more information about our API support guarantees, see here.

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 */
interface TreeMapNodeUnsafe<T extends ImplicitAllowedTypesUnsafe> extends ReadonlyMapInlined<string, T>, TreeNode

Extends: ReadonlyMapInlined<string, T>, TreeNode

Type Parameters​

ParameterConstraintDescription
TImplicitAllowedTypesUnsafe

Remarks​

Do not use this type directly: it's only needed in the implementation of generic logic which define recursive schema, not when using recursive schema.

Methods​

MethodReturn TypeDescription
delete(key)voidRemoves the specified element from this map by its key.
set(key, value)voidAdds or updates an entry in the map with a specified key and a value.

Method Details​

delete​

Removes the specified element from this map by its key.

This API is reserved for internal system use and should not be imported directly. It may change at any time without notice.

For more information about our API support guarantees, see here.

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​

ParameterTypeDescription
keystringThe key of the element to remove from the map.

set​

Adds or updates an entry in the map with a specified key and a value.

This API is reserved for internal system use and should not be imported directly. It may change at any time without notice.

For more information about our API support guarantees, see here.

Signature​

set(key: string, value: InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T> | undefined): void;

Remarks​

Setting the value at a key to undefined is equivalent to calling delete(key) with that key.

Parameters​

ParameterTypeDescription
keystringThe key of the element to add to the map.
valueInsertableTreeNodeFromImplicitAllowedTypesUnsafe<T> | undefinedThe value of the element to add to the map.