Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 810 Bytes

File metadata and controls

24 lines (16 loc) · 810 Bytes
hide_title true
custom_edit_url
pagination_prev
pagination_next

Home > @rushstack/node-core-library > IProtectableMapParameters > onSet

IProtectableMapParameters.onSet property

An optional hook that will be invoked before Map.set() is performed.

Signature:

onSet?: (source: ProtectableMap<K, V>, key: K, value: V) => V;

Remarks

If this hook is provided, the function MUST return the value parameter. This provides the opportunity to modify the value before it is added to the map.