@jiway/firestorm-core - v1.1.1
    Preparing search index...

    Function hasFieldOfType

    • Checks if the given host object has a property or field with a given name containing an value of a given type

      /!\ It doesn't support non object types.

      Type Parameters

      • T

        Expected type of the value in the property/field

      • const K extends string

        Litteral of the field/property name

      Parameters

      • host: unknown

        Host object to test

      • fieldName: K

        Name of the property or field to test

      • type: Type<T>

        Expected type of the value in the property/field

      Returns host is Record<K, T>