TypeScript/tests/baselines/reference/moduleResolutionWithoutExtension8.symbols
Gabriela Araujo Britto 9cdbb7248b
Improve errors on module: node12 and extensionless relative imports (#46486)
* add new error + suggestions

* push down assert defined

* remove comment

* fix esm module import detection, update baselines

* add and update new tests

* fix review comments

* remove renamed baseline references

* update node modules test baselines

* fix error message, add new tests

* update old tests with new error message
2021-10-29 10:25:03 -07:00

9 lines
361 B
Plaintext

=== /src/bar.cts ===
// Extensionless relative path dynamic import in a cjs module
import("./foo").then(x => x); // should error, ask for extension
>import("./foo").then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --))
>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --))
>x : Symbol(x, Decl(bar.cts, 1, 21))
>x : Symbol(x, Decl(bar.cts, 1, 21))