allow const enum in type query (#21083)

This commit is contained in:
Wenlu Wang authored and Mohamed Hegazy committed 2018-01-09 09:24:00 -08:00
1 parent ef5a289966
commit 062f97a6fa
8 files changed
+124 -11

No files matched your search

@@ -0,0 +1,10 @@
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')