mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
18 lines
528 B
Plaintext
18 lines
528 B
Plaintext
//// [tests/cases/conformance/externalModules/moduleResolutionWithoutExtension1.ts] ////
|
|
|
|
=== /src/foo.mts ===
|
|
export function foo() {
|
|
>foo : Symbol(foo, Decl(foo.mts, 0, 0))
|
|
|
|
return "";
|
|
}
|
|
|
|
=== /src/bar.mts ===
|
|
// Extensionless relative path ES import in an ES module
|
|
import { foo } from "./foo"; // should error, suggest adding ".mjs"
|
|
>foo : Symbol(foo, Decl(bar.mts, 1, 8))
|
|
|
|
import { baz } from "./baz"; // should error, ask for extension, no extension suggestion
|
|
>baz : Symbol(baz, Decl(bar.mts, 2, 8))
|
|
|