-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🤖 Pick PR #60415 (Fix false positive rewriteRelativeI...) into releas…
…e-5.7 (#60424) Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
- Loading branch information
1 parent
44bd3f2
commit 3ee2b95
Showing
3 changed files
with
30 additions
and
1 deletion.
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
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,14 @@ | ||
//// [tests/cases/conformance/externalModules/rewriteRelativeImportExtensions/nonTSExtensions.ts] //// | ||
|
||
//// [example.json] | ||
{} | ||
|
||
//// [styles.d.css.ts] | ||
export {}; | ||
|
||
//// [index.mts] | ||
import {} from "./example.json" with { type: "json" }; // Ok | ||
import {} from "./styles.css"; // Ok | ||
|
||
//// [index.mjs] | ||
export {}; |
15 changes: 15 additions & 0 deletions
15
tests/cases/conformance/externalModules/rewriteRelativeImportExtensions/nonTSExtensions.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,15 @@ | ||
// @module: nodenext | ||
// @rewriteRelativeImportExtensions: true | ||
// @allowArbitraryExtensions: true | ||
// @resolveJsonModule: true | ||
// @noTypesAndSymbols: true | ||
|
||
// @Filename: example.json | ||
{} | ||
|
||
// @Filename: styles.d.css.ts | ||
export {}; | ||
|
||
// @Filename: index.mts | ||
import {} from "./example.json" with { type: "json" }; // Ok | ||
import {} from "./styles.css"; // Ok |