* 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
8 lines
599 B
Plaintext
8 lines
599 B
Plaintext
/src/bar.cts(2,8): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.
|
|
|
|
|
|
==== /src/bar.cts (1 errors) ====
|
|
// Extensionless relative path dynamic import in a cjs module
|
|
import("./foo").then(x => x); // should error, ask for extension
|
|
~~~~~~~
|
|
!!! error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path. |