swc/crates/swc_ecma_parser/tests/tsc/constEnum3.ts
2022-02-04 17:08:38 +09:00

11 lines
192 B
TypeScript

const enum TestType { foo, bar }
type TestTypeStr = keyof typeof TestType;
function f1(f: TestType) { }
function f2(f: TestTypeStr) { }
f1(TestType.foo)
f1(TestType.bar)
f2('foo')
f2('bar')