1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
//// [tests/cases/conformance/externalModules/typeOnly/enums.ts] ////
//// [a.ts]
enum SyntaxKind {
ImportClause,
ExportDeclaration
}
const enum SymbolFlags {
Type = "Type",
Value = "Value"
}
export type { SyntaxKind };
export { SymbolFlags };
//// [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 };
//// [c.ts]
import { SymbolFlags } from './a';
import type { TypeFlag } from './b';
const flags: TypeFlag = SymbolFlags.Type;
//// [a.js]
"use strict";
exports.__esModule = true;
var SyntaxKind;
(function (SyntaxKind) {
SyntaxKind[SyntaxKind["ImportClause"] = 0] = "ImportClause";
SyntaxKind[SyntaxKind["ExportDeclaration"] = 1] = "ExportDeclaration";
})(SyntaxKind || (SyntaxKind = {}));
//// [b.js]
"use strict";
exports.__esModule = true;
SyntaxKind.ImportClause;
"Type" /* SymbolFlags.Type */;
var kind;
var flags;
//// [c.js]
"use strict";
exports.__esModule = true;
var flags = "Type" /* SymbolFlags.Type */;
|