mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Replace lib file instead of changing target
This commit is contained in:
@@ -295,14 +295,13 @@ a;b;
|
||||
}),
|
||||
"/Users/name/projects/web/tsconfig.json": JSON.stringify({
|
||||
compilerOptions: {
|
||||
target: "es5",
|
||||
module: "nodenext",
|
||||
moduleResolution: "nodenext",
|
||||
forceConsistentCasingInFileNames: true,
|
||||
traceResolution: true,
|
||||
}
|
||||
}),
|
||||
[libFile.path]: libFile.content,
|
||||
[libFile.path.replace("lib.d.ts", "lib.esnext.full.d.ts")]: libFile.content,
|
||||
}, { currentDirectory: "/Users/name/projects/web" }),
|
||||
});
|
||||
|
||||
|
||||
@@ -89,7 +89,6 @@ describe("unittests:: tsc-watch:: moduleResolution", () => {
|
||||
path: `/user/username/projects/myproject/tsconfig.json`,
|
||||
content: JSON.stringify({
|
||||
compilerOptions: {
|
||||
target: "es5",
|
||||
module: "nodenext",
|
||||
moduleResolution: "nodenext",
|
||||
outDir: "./dist",
|
||||
@@ -125,7 +124,10 @@ describe("unittests:: tsc-watch:: moduleResolution", () => {
|
||||
export function thing(): void {}
|
||||
`
|
||||
},
|
||||
libFile
|
||||
{
|
||||
...libFile,
|
||||
path: libFile.path.replace("lib.d.ts", "lib.esnext.full.d.ts")
|
||||
}
|
||||
], { currentDirectory: "/user/username/projects/myproject" }),
|
||||
commandLineArgs: ["-w", "--traceResolution"],
|
||||
edits: [{
|
||||
@@ -354,7 +356,7 @@ describe("unittests:: tsc-watch:: moduleResolution", () => {
|
||||
{
|
||||
path: `/user/username/projects/myproject/tsconfig.json`,
|
||||
content: JSON.stringify({
|
||||
compilerOptions: { target: "es5", module: "node16", moduleResolution: "node16" },
|
||||
compilerOptions: { module: "node16", moduleResolution: "node16" },
|
||||
})
|
||||
},
|
||||
{
|
||||
@@ -424,7 +426,10 @@ describe("unittests:: tsc-watch:: moduleResolution", () => {
|
||||
path: `/user/username/projects/myproject/node_modules/@types/pkg2/index.d.ts`,
|
||||
content: `export const x = 10;`
|
||||
},
|
||||
libFile
|
||||
{
|
||||
...libFile,
|
||||
path: libFile.path.replace("lib.d.ts", "lib.es2022.full.d.ts"),
|
||||
}
|
||||
], { currentDirectory: "/user/username/projects/myproject" }),
|
||||
commandLineArgs: ["-w", "--traceResolution"],
|
||||
edits: [
|
||||
|
||||
Reference in New Issue
Block a user