@tsdotnet/type - v1.2.7
    Preparing search index...

    Function isPrimitive

    Returns true if the value is a boolean, string, number, null, or undefined.

    if set to true will return true if the value is undefined.

    • Returns true if the value is a boolean, string, number, or null.

      Parameters

      • value: unknown

      Returns value is NullablePrimitive

    • Returns true if the value is a boolean, string, number, null, or undefined.

      Parameters

      • value: unknown
      • allowUndefined: false

      Returns value is NullablePrimitive

    • Returns true if the value is a boolean, string, number, null, or undefined.

      Parameters

      • value: unknown
      • allowUndefined: boolean

        if set to true will return true if the value is undefined.

      Returns value is undefined | NullablePrimitive