You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: tests/baselines/reference/dynamicImportDefer(module=es2015).errors.txt
+4-4
Original file line number
Diff line number
Diff line change
@@ -8,13 +8,13 @@ b.ts(5,1): error TS1323: Dynamic imports are only supported when the '--module'
8
8
}
9
9
10
10
==== b.ts (2 errors) ====
11
-
import.defer("./a").then(ns => {
12
-
~~~~~~~~~~~~~~~~~~~
11
+
import.defer("./a.js").then(ns => {
12
+
~~~~~~~~~~~~~~~~~~~~~~
13
13
!!! error TS18060: Deferred imports are only supported when the '--module' flag is set to 'esnext' or 'nodenext'.
14
14
ns.foo();
15
15
});
16
16
17
-
import("./a"); // TODO: Removing this makes the `import.defer` call complain about module not found
18
-
~~~~~~~~~~~~~
17
+
import("./a.js"); // TODO: Without this the import.defer cannot resolve ./a
18
+
~~~~~~~~~~~~~~~~
19
19
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
0 commit comments