Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: properly scope variables in TSModuleBlock
Co-authored-by: Nicol貌 Ribaudo <nicolo.ribaudo@gmail.com>
- Loading branch information
1 parent
367d4ed
commit 346e812
Showing
6 changed files
with
18 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,5 @@ export namespace Namespaced { | |
fileName: _jsxFileName, | ||
lineNumber: 3, | ||
columnNumber: 3 | ||
}, void 0); | ||
}, this); | ||
} |
5 changes: 5 additions & 0 deletions
5
...gin-transform-typescript/test/fixtures/namespace/declare-global-nested-namespace/input.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
declare global { namespace globalThis { var i18n: any; } } | ||
|
||
namespace X { var i18n: any; } | ||
|
||
export class i18n {} |
7 changes: 7 additions & 0 deletions
7
...n-transform-typescript/test/fixtures/namespace/declare-global-nested-namespace/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
let X; | ||
|
||
(function (_X) { | ||
var i18n; | ||
})(X || (X = {})); | ||
|
||
export class i18n {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters