| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -158,7 +158,7 @@ export function transformECMAScriptModule(context: TransformationContext): (x: S | |||
| 158 | 158 | if (node === importsAndRequiresToRewriteOrShim?.[0]) { | |
| 159 | 159 | return visitImportOrRequireCall(importsAndRequiresToRewriteOrShim.shift()!); | |
| 160 | 160 | } | |
| 161 | - break; | ||
| 161 | + // fallthrough | ||
| 162 | 162 | default: | |
| 163 | 163 | if (importsAndRequiresToRewriteOrShim?.length && rangeContainsRange(node, importsAndRequiresToRewriteOrShim[0])) { | |
| 164 | 164 | return visitEachChild(node, visitor, context); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,6 +6,8 @@ main.ts(6,22): error TS2307: Cannot find module './foo.ts' or its corresponding | |||
| 6 | 6 | main.ts(8,15): error TS2307: Cannot find module './foo.ts' or its corresponding type declarations. | |
| 7 | 7 | main.ts(10,8): error TS2307: Cannot find module './foo.ts' or its corresponding type declarations. | |
| 8 | 8 | main.ts(11,8): error TS2307: Cannot find module './foo.ts' or its corresponding type declarations. | |
| 9 | + main.ts(13,18): error TS2307: Cannot find module './foo.ts' or its corresponding type declarations. | ||
| 10 | + main.ts(14,8): error TS2307: Cannot find module './foo.ts' or its corresponding type declarations. | ||
| 9 | 11 | no.ts(1,16): error TS2307: Cannot find module './foo.ts/foo.js' or its corresponding type declarations. | |
| 10 | 12 | no.ts(2,16): error TS2307: Cannot find module 'foo.ts' or its corresponding type declarations. | |
| 11 | 13 | no.ts(3,16): error TS2307: Cannot find module 'pkg/foo.ts' or its corresponding type declarations. | |
@@ -21,7 +23,7 @@ no.ts(11,8): error TS2307: Cannot find module 'node:path' or its corresponding t | |||
| 21 | 23 | ==== globals.d.ts (0 errors) ==== | |
| 22 | 24 | declare function require(module: string): any; | |
| 23 | 25 | ||
| 24 | - ==== main.ts (8 errors) ==== | ||
| 26 | + ==== main.ts (10 errors) ==== | ||
| 25 | 27 | // Rewrite | |
| 26 | 28 | import {} from "./foo.ts"; | |
| 27 | 29 | ~~~~~~~~~~ | |
@@ -45,6 +47,13 @@ no.ts(11,8): error TS2307: Cannot find module 'node:path' or its corresponding t | |||
| 45 | 47 | //Shim | |
| 46 | 48 | import("./foo.ts"); | |
| 47 | 49 | ~~~~~~~~~~ | |
| 50 | + !!! error TS2307: Cannot find module './foo.ts' or its corresponding type declarations. | ||
| 51 | + import("./foo.ts").then(() => {}); | ||
| 52 | + ~~~~~~~~~~ | ||
| 53 | + !!! error TS2307: Cannot find module './foo.ts' or its corresponding type declarations. | ||
| 54 | + function acceptAny(arg: any) {} | ||
| 55 | + acceptAny(import("./foo.ts")); | ||
| 56 | + ~~~~~~~~~~ | ||
| 48 | 57 | !!! error TS2307: Cannot find module './foo.ts' or its corresponding type declarations. | |
| 49 | 58 | import("./foo.ts", { with: { attr: "value" } }); | |
| 50 | 59 | ~~~~~~~~~~ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,6 +14,9 @@ import "./foo.ts"; | |||
| 14 | 14 | export * from "./foo.ts"; | |
| 15 | 15 | //Shim | |
| 16 | 16 | import("./foo.ts"); | |
| 17 | + import("./foo.ts").then(() => {}); | ||
| 18 | + function acceptAny(arg: any) {} | ||
| 19 | + acceptAny(import("./foo.ts")); | ||
| 17 | 20 | import("./foo.ts", { with: { attr: "value" } }); | |
| 18 | 21 | import("" + "./foo.ts"); | |
| 19 | 22 | //// [js.js] | |
@@ -71,6 +74,9 @@ import "./foo.js"; | |||
| 71 | 74 | export * from "./foo.js"; | |
| 72 | 75 | //Shim | |
| 73 | 76 | import("./foo.js"); | |
| 77 | + import("./foo.js").then(() => { }); | ||
| 78 | + function acceptAny(arg) { } | ||
| 79 | + acceptAny(import("./foo.js")); | ||
| 74 | 80 | import("./foo.js", { with: { attr: "value" } }); | |
| 75 | 81 | import(__rewriteRelativeImportExtension("" + "./foo.ts", true)); | |
| 76 | 82 | //// [js.js] | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,6 +6,8 @@ main.ts(6,22): error TS2307: Cannot find module './foo.ts' or its corresponding | |||
| 6 | 6 | main.ts(8,15): error TS2307: Cannot find module './foo.ts' or its corresponding type declarations. | |
| 7 | 7 | main.ts(10,8): error TS2307: Cannot find module './foo.ts' or its corresponding type declarations. | |
| 8 | 8 | main.ts(11,8): error TS2307: Cannot find module './foo.ts' or its corresponding type declarations. | |
| 9 | + main.ts(13,18): error TS2307: Cannot find module './foo.ts' or its corresponding type declarations. | ||
| 10 | + main.ts(14,8): error TS2307: Cannot find module './foo.ts' or its corresponding type declarations. | ||
| 9 | 11 | no.ts(1,16): error TS2307: Cannot find module './foo.ts/foo.js' or its corresponding type declarations. | |
| 10 | 12 | no.ts(2,16): error TS2307: Cannot find module 'foo.ts' or its corresponding type declarations. | |
| 11 | 13 | no.ts(3,16): error TS2307: Cannot find module 'pkg/foo.ts' or its corresponding type declarations. | |
@@ -21,7 +23,7 @@ no.ts(11,8): error TS2307: Cannot find module 'node:path' or its corresponding t | |||
| 21 | 23 | ==== globals.d.ts (0 errors) ==== | |
| 22 | 24 | declare function require(module: string): any; | |
| 23 | 25 | ||
| 24 | - ==== main.ts (8 errors) ==== | ||
| 26 | + ==== main.ts (10 errors) ==== | ||
| 25 | 27 | // Rewrite | |
| 26 | 28 | import {} from "./foo.ts"; | |
| 27 | 29 | ~~~~~~~~~~ | |
@@ -45,6 +47,13 @@ no.ts(11,8): error TS2307: Cannot find module 'node:path' or its corresponding t | |||
| 45 | 47 | //Shim | |
| 46 | 48 | import("./foo.ts"); | |
| 47 | 49 | ~~~~~~~~~~ | |
| 50 | + !!! error TS2307: Cannot find module './foo.ts' or its corresponding type declarations. | ||
| 51 | + import("./foo.ts").then(() => {}); | ||
| 52 | + ~~~~~~~~~~ | ||
| 53 | + !!! error TS2307: Cannot find module './foo.ts' or its corresponding type declarations. | ||
| 54 | + function acceptAny(arg: any) {} | ||
| 55 | + acceptAny(import("./foo.ts")); | ||
| 56 | + ~~~~~~~~~~ | ||
| 48 | 57 | !!! error TS2307: Cannot find module './foo.ts' or its corresponding type declarations. | |
| 49 | 58 | import("./foo.ts", { with: { attr: "value" } }); | |
| 50 | 59 | ~~~~~~~~~~ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,6 +14,9 @@ import "./foo.ts"; | |||
| 14 | 14 | export * from "./foo.ts"; | |
| 15 | 15 | //Shim | |
| 16 | 16 | import("./foo.ts"); | |
| 17 | + import("./foo.ts").then(() => {}); | ||
| 18 | + function acceptAny(arg: any) {} | ||
| 19 | + acceptAny(import("./foo.ts")); | ||
| 17 | 20 | import("./foo.ts", { with: { attr: "value" } }); | |
| 18 | 21 | import("" + "./foo.ts"); | |
| 19 | 22 | //// [js.js] | |
@@ -71,6 +74,9 @@ import "./foo.js"; | |||
| 71 | 74 | export * from "./foo.js"; | |
| 72 | 75 | //Shim | |
| 73 | 76 | import("./foo.js"); | |
| 77 | + import("./foo.js").then(() => { }); | ||
| 78 | + function acceptAny(arg) { } | ||
| 79 | + acceptAny(import("./foo.js")); | ||
| 74 | 80 | import("./foo.js", { with: { attr: "value" } }); | |
| 75 | 81 | import(__rewriteRelativeImportExtension("" + "./foo.ts")); | |
| 76 | 82 | //// [js.js] | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -21,6 +21,9 @@ import "./foo.ts"; | |||
| 21 | 21 | export * from "./foo.ts"; | |
| 22 | 22 | //Shim | |
| 23 | 23 | import("./foo.ts"); | |
| 24 | + import("./foo.ts").then(() => {}); | ||
| 25 | + function acceptAny(arg: any) {} | ||
| 26 | + acceptAny(import("./foo.ts")); | ||
| 24 | 27 | import("./foo.ts", { with: { attr: "value" } }); | |
| 25 | 28 | import("" + "./foo.ts"); | |
| 26 | 29 | // @Filename: js.js | |
| Back | FazBrowse Home | New Git URL |
0 commit comments