-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pick PR #49356 (Add nightly-only error on ImportType resolution mode …
…assertion) into release-4.7 (#49365) * Add nightly-only error on ImportType resolution mode assertion (#49356) * Add nightly-only error on ImportType resolution mode assertion * Temporarily change version to demonstrate errors * Revert "Temporarily change version to demonstrate errors" This reverts commit 40c2469. * "Resolution mode" -> "resolution-mode" * Update baselines
- Loading branch information
1 parent
5f7f0b1
commit 3bf0d30
Showing
22 changed files
with
257 additions
and
102 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
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
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
80 changes: 80 additions & 0 deletions
80
.../baselines/reference/nodeModulesDeclarationEmitDynamicImportWithPackageExports.errors.txt
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,80 @@ | ||
tests/cases/conformance/node/other.cts(3,14): error TS2841: The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'. | ||
tests/cases/conformance/node/other.cts(4,14): error TS2841: The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'. | ||
tests/cases/conformance/node/other2.cts(3,14): error TS2841: The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'. | ||
|
||
|
||
==== tests/cases/conformance/node/index.ts (0 errors) ==== | ||
// esm format file | ||
export {}; | ||
==== tests/cases/conformance/node/index.mts (0 errors) ==== | ||
// esm format file | ||
export {}; | ||
==== tests/cases/conformance/node/index.cts (0 errors) ==== | ||
// cjs format file | ||
export {}; | ||
==== tests/cases/conformance/node/other.ts (0 errors) ==== | ||
// esm format file | ||
export const a = await import("package/cjs"); | ||
export const b = await import("package/mjs"); | ||
export const c = await import("package"); | ||
export const f = await import("inner"); | ||
==== tests/cases/conformance/node/other2.ts (0 errors) ==== | ||
// esm format file | ||
export const d = await import("inner/cjs"); | ||
export const e = await import("inner/mjs"); | ||
==== tests/cases/conformance/node/other.mts (0 errors) ==== | ||
// esm format file | ||
export const a = await import("package/cjs"); | ||
export const b = await import("package/mjs"); | ||
export const c = await import("package"); | ||
export const f = await import("inner"); | ||
==== tests/cases/conformance/node/other2.mts (0 errors) ==== | ||
// esm format file | ||
export const d = await import("inner/cjs"); | ||
export const e = await import("inner/mjs"); | ||
==== tests/cases/conformance/node/other.cts (2 errors) ==== | ||
// cjs format file, no TLA | ||
export const a = import("package/cjs"); | ||
export const b = import("package/mjs"); | ||
~ | ||
!!! error TS2841: The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'. | ||
export const c = import("package"); | ||
~ | ||
!!! error TS2841: The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'. | ||
export const f = import("inner"); | ||
==== tests/cases/conformance/node/other2.cts (1 errors) ==== | ||
// cjs format file, no TLA | ||
export const d = import("inner/cjs"); | ||
export const e = import("inner/mjs"); | ||
~ | ||
!!! error TS2841: The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'. | ||
==== tests/cases/conformance/node/node_modules/inner/index.d.ts (0 errors) ==== | ||
// cjs format file | ||
export const cjsMain = true; | ||
==== tests/cases/conformance/node/node_modules/inner/index.d.mts (0 errors) ==== | ||
// esm format file | ||
export const esm = true; | ||
==== tests/cases/conformance/node/node_modules/inner/index.d.cts (0 errors) ==== | ||
// cjs format file | ||
export const cjsNonmain = true; | ||
==== tests/cases/conformance/node/package.json (0 errors) ==== | ||
{ | ||
"name": "package", | ||
"private": true, | ||
"type": "module", | ||
"exports": { | ||
"./cjs": "./index.cjs", | ||
"./mjs": "./index.mjs", | ||
".": "./index.js" | ||
} | ||
} | ||
==== tests/cases/conformance/node/node_modules/inner/package.json (0 errors) ==== | ||
{ | ||
"name": "inner", | ||
"private": true, | ||
"exports": { | ||
"./cjs": "./index.cjs", | ||
"./mjs": "./index.mjs", | ||
".": "./index.js" | ||
} | ||
} |
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
24 changes: 12 additions & 12 deletions
24
tests/baselines/reference/nodeModulesImportModeDeclarationEmit1(module=node16).errors.txt
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
Oops, something went wrong.