You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've copied the following code verbatim from a baseline test file for #6742. My understanding is that this code should compile without errors, but I get two errors, which I've indicated with comments. The output .js files are exactly as expected.
Code
//// [file1.ts]functionfoo(){}namespacefoo{exportvarv=1;}export=foo;//// [file2.ts]importx= require("./file1");x.b=1;// OKdeclare module "./file1"{interfaceA{a}// ERROR: Module augmentation cannot introduce new names in the top level scopeletb: number;// ERROR: Module augmentation cannot introduce new names in the top level scope}//// [file3.ts]import*asxfrom"./file1";import"./file2";leta: x.A;// OK, a's type is interface Aletb=x.b;// OK, b's type is number//// [tsconfig.json]{"compilerOptions": {"target": "es6","module": "amd"}}
Expected behavior:
No compiler errors.
Actual behavior:
Two compiler errors, as indicated in the code comments.
TypeScript Version:
nightly (1.9.0-dev.20160217)
Problem Description:
I've copied the following code verbatim from a baseline test file for #6742. My understanding is that this code should compile without errors, but I get two errors, which I've indicated with comments. The output
.js
files are exactly as expected.Code
Expected behavior:
No compiler errors.
Actual behavior:
Two compiler errors, as indicated in the code comments.
Additional info:
I also copied and compiled the express.d.ts baseline test, and that does compile for me with no errors.
The text was updated successfully, but these errors were encountered: