| hide_title | true |
|---|---|
| custom_edit_url | |
| pagination_prev | |
| pagination_next |
Home > @rushstack/node-core-library > IProtectableMapParameters > onSet
An optional hook that will be invoked before Map.set() is performed.
Signature:
onSet?: (source: ProtectableMap<K, V>, key: K, value: V) => V;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.