Library API
    Preparing search index...

    Function isType

    • Asserts if a value matches one of the provided types from the Type system.

      Type Parameters

      • T

      Parameters

      • obj: unknown

        The value to check

      • ...types: Type[]

        The list of valid Types

      Returns obj is T

      True if the value matches one of the specified types

      if (isType`<string>`(value, 'String', 'Number')) { ... }