ts-api-utils - v3.0.0-rc.1
    Preparing search index...

    Function isLiteralType

    • Test if a type is a LiteralType.

      Parameters

      • type: Type

      Returns type is LiteralType

      declare const type: ts.Type;

      if (isLiteralType(type)) {
      // ...
      }