swc/crates/swc_ecma_parser/tests/tsc/moduleResolutionWithoutExtension1.ts
2022-02-04 17:08:38 +09:00

13 lines
359 B
TypeScript

// @moduleResolution: node12
// @module: node12
// @filename: /src/foo.mts
export function foo() {
return "";
}
// @filename: /src/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