@salesforce/ts-types
    Preparing search index...

    Function ensureDictionary

    • Narrows an unknown value to a Dictionary<T> if it is type-compatible and tests positively with isDictionary, or raises an error otherwise.

      Type Parameters

      • T = unknown

      Parameters

      • value: unknown

        The value to test.

      • Optionalmessage: string

        The error message to use if value is not type-compatible.

      Returns Dictionary<T>

      UnexpectedValueTypeError If the value was undefined.