js-util

Home > rc-js-util > mapDeleteGet

mapDeleteGet() function

Get the stored value if present, then delete the key.

Signature:

export declare function mapDeleteGet<TKey extends object, TValue>(map: WeakMap<TKey, TValue>, key: TKey): TValue | undefined;

Parameters

Parameter Type Description
map WeakMap<TKey, TValue>  
key TKey  

Returns:

TValue | undefined

Remarks

See mapDeleteGet().