mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
53 lines
1.2 KiB
TypeScript
53 lines
1.2 KiB
TypeScript
//// [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";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
var SyntaxKind;
|
|
(function (SyntaxKind) {
|
|
SyntaxKind[SyntaxKind["ImportClause"] = 0] = "ImportClause";
|
|
SyntaxKind[SyntaxKind["ExportDeclaration"] = 1] = "ExportDeclaration";
|
|
})(SyntaxKind || (SyntaxKind = {}));
|
|
//// [b.js]
|
|
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
SyntaxKind.ImportClause;
|
|
"Type" /* SymbolFlags.Type */;
|
|
let kind;
|
|
let flags;
|
|
//// [c.js]
|
|
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
const flags = "Type" /* SymbolFlags.Type */;
|