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

    Function asDictionary

    • Narrows an unknown value to a Dictionary<T> if it is type-compatible, or returns undefined otherwise.

      Type Parameters

      • T = unknown

      Parameters

      • value: unknown

        The value to test.

      Returns Optional<Dictionary<T>>

    • Narrows an unknown value to an object if it is type-compatible, or returns the provided default otherwise.

      Type Parameters

      • T = unknown

      Parameters

      • value: unknown

        The value to test.

      • defaultValue: Dictionary<T>

        The default to return if value was undefined or of the incorrect type.

      Returns Dictionary<T>