assertDictionaryItem()function

assertDictionaryItem(dict: ImmutableDictionary<T>, key: string, caller: AnyCaller = assertDictionaryItem): asserts key is string
ParamType
dictImmutableDictionary<T>
The dictionary to assert against. required
keystring
The key to assert is an own prop. required
callerAnyCaller
Function to attribute a thrown error to (defaults to assertDictionaryItem itself). Defaults to assertDictionaryItem
Return
asserts key is string
Throws
RequiredError
If key is not an own prop of dict.

Assert that an unknown value is the key for an own prop of a dictionary.