setDictionaryItemconstant

setDictionaryItem: <T>(dict: MutableDictionary<T>, key: string, value: T) => T
Return
unknown
The value that was set.

Set a single named item on a dictionary object (by reference) and return its value.

  • The key is trusted by contract: a runtime-untrusted key like "__proto__" would mutate the target's prototype, so validate or filter untrusted keys before calling (or use a null-prototype target).