* 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
20 lines
473 B
TypeScript
20 lines
473 B
TypeScript
//// [tests/cases/conformance/externalModules/moduleResolutionWithoutExtension1.ts] ////
|
|
|
|
//// [foo.mts]
|
|
export function foo() {
|
|
return "";
|
|
}
|
|
|
|
//// [bar.mts]
|
|
// Extensionless relative path ES import in an ES module
|
|
import { foo } from "./foo"; // should error, suggest adding ".mjs"
|
|
import { baz } from "./baz"; // should error, ask for extension, no extension suggestion
|
|
|
|
|
|
//// [foo.mjs]
|
|
export function foo() {
|
|
return "";
|
|
}
|
|
//// [bar.mjs]
|
|
export {};
|