-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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 (#14109)
* Fix: properly scope variables in TSModuleBlock Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com> * Update fixtures (Windows) Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com> Co-authored-by: Babel Bot <babel-bot@users.noreply.github.com>
- Loading branch information
1 parent
cf0cfac
commit 586a7ee
Showing
7 changed files
with
19 additions
and
5 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); | ||
} |
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