mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-07-07 18:25:51 -05:00
Elide import namespace from which only const enums are used (#20320)
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
// @filename: foo.ts
|
||||
export const enum ConstFooEnum {
|
||||
Some,
|
||||
Values,
|
||||
Here
|
||||
};
|
||||
export function fooFunc(): void { /* removed */ }
|
||||
// @filename: index.ts
|
||||
import * as Foo from "./foo";
|
||||
|
||||
function check(x: Foo.ConstFooEnum): void {
|
||||
switch (x) {
|
||||
case Foo.ConstFooEnum.Some:
|
||||
break;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user