• A shortcut for testing the suitability of a value to be used as a Dictionary<T> type. Shorthand for writing isPlainObject<Dictionary<T>>(value). While some non-plain-object types are compatible with index signatures, they were less typically used as such, so this function focuses on the 80% case.

    Use of the type parameter T to further narrow the type signature of the value being tested is strongly discouraged unless you are completely confident that the value is of the necessary shape to conform with T. This function does nothing at either compile time or runtime to prove the value is of shape T, so doing so amounts to nothing more than performing a type assertion, which is generally a bad practice unless you have performed some other due diligence in proving that the value must be of shape T. Use of the functions in the has co-library are useful for performing such full or partial proofs.

    Type Parameters

    • T = unknown

    Parameters

    • value: unknown

      The value to test.

    Returns value is Dictionary<T>