swc/crates/swc_ecma_parser/tests/tsc/enums.ts

30 lines
564 B
TypeScript
Raw Normal View History

// @Filename: /a.ts
enum SyntaxKind {
ImportClause,
ExportDeclaration
}
const enum SymbolFlags {
Type = "Type",
Value = "Value"
}
export type { SyntaxKind };
export { SymbolFlags };
// @Filename: /b.ts
import type { SyntaxKind, SymbolFlags } from './a';
SyntaxKind.ImportClause;
SymbolFlags.Type;
let kind: SyntaxKind.ImportClause;
let flags: SymbolFlags;
type TypeFlag = SymbolFlags.Type;
export type { TypeFlag };
// @Filename: /c.ts
import { SymbolFlags } from './a';
import type { TypeFlag } from './b';
const flags: TypeFlag = SymbolFlags.Type;