REJECTED

tcmts.core.canonicalize.REJECTED · #cllbsmwt · term · runs anywhere

import { SyntaxKind as ts_SyntaxKind } from "typescript/ast";

export const REJECTED: Partial<Record<ts_SyntaxKind, string>> = {
  [ts_SyntaxKind.EnumDeclaration]: "enums are not erasable; use an `as const` object",
  [ts_SyntaxKind.ModuleDeclaration]: "namespaces are not erasable",
  [ts_SyntaxKind.Decorator]: "decorators are not supported by Node's type stripping",
  [ts_SyntaxKind.ImportEqualsDeclaration]: "`import x = require()` is not supported",
  [ts_SyntaxKind.ImportType]: "`import(\"...\")` types are not content-addressable; use `import type` at the top of the file",
}

used by