mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
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 {};
|