TypeScript Version: 3.9.0-dev.20200222
Search Terms: export type * as namespace
Code
// provider.tsexportconstfoo=42;exportinterfaceBar{};// index1.tsimporttype*asAfrom'./provider';export{A};// index2.tsexporttype*asAfrom'./provider';
// 1.tsimport{A}from'./index1';constfoo=A.foo;typeBar=A.Bar;// 2.tsimport{A}from'./index2';constfoo=A.foo;// **expected an error, but succeed.**typeBar=A.Bar;Expected behavior:
index1.ts and index2.ts should have the same behaviour: export a namespace which only contain types, and the assignment to foo should result in an error.
Actual behavior:
In index2.ts the assignment succeed.
Playground Link:
Related Issues:
TypeScript Version: 3.9.0-dev.20200222
Search Terms: export type * as namespace
Code
Expected behavior:
index1.tsandindex2.tsshould have the same behaviour: export a namespace which only contain types, and the assignment tofooshould result in an error.Actual behavior:
In
index2.tsthe assignment succeed.Playground Link:
Related Issues: