assertMap()function

assertMap(value: unknown, caller: AnyCaller = assertMap): asserts value is ImmutableMap
ParamType
valueunknown
The value to assert. required
callerAnyCaller
Function used to attribute a thrown error to the calling site. Defaults to assertMap
Return
asserts value is ImmutableMap
Nothing; narrows value to ImmutableMap.
Throws
RequiredError
If value is not a Map instance.

Assert that a value is a Map instance.

Examples

assertMap(new Map()); // passes