mirror of
https://github.com/swc-project/swc.git
synced 2024-12-21 12:41:54 +03:00
29 lines
374 B
TypeScript
29 lines
374 B
TypeScript
// @strict: true
|
|
// @target: esnext
|
|
|
|
// @filename: enum.ts
|
|
export enum Foo {
|
|
A,
|
|
B,
|
|
}
|
|
|
|
// @filename: test.ts
|
|
import {Foo} from './enum';
|
|
|
|
enum Bar {
|
|
A,
|
|
B,
|
|
}
|
|
let foo = Foo.A as const;
|
|
let bar = Bar.A as const;
|
|
|
|
// @filename: ns.ts
|
|
namespace ns {
|
|
export enum Foo { X }
|
|
ns.Foo.X as const;
|
|
}
|
|
|
|
// @filename: more.ts
|
|
export enum Foo { X }
|
|
(Foo).X as const;
|