Closed
Description
TypeScript Version: 3.8.0-dev.20200123
Search Terms: type only import merged namesapce
Code
// file1.ts
export interface Foo { }
export namespace Foo {
export const x = 1;
}
// file2.ts
import type { Foo } from "./file1";
declare function f(): Foo; // (1)
Expected behavior:
- No error
Actual behavior:
- Error:
Cannot use namespace 'Foo' as a type.
Playground Link:
Related Issues: