TypeScript/tests/baselines/reference/moduleResolutionWithExtensions_withPaths.symbols
Sheetal Nandi d36df0dda5
Try file if matched pattern specifies the extension instead of all the time (#42246)
* Test case for path mapping with extension

* Try file if matched pattern specifies the extension instead of all the time
Fixes #39743
2021-01-08 12:03:29 -08:00

27 lines
755 B
Plaintext

=== /node_modules/foo/lib/test.d.ts ===
export declare function test(): void;
>test : Symbol(test, Decl(test.d.ts, 0, 0))
=== /relative.d.ts ===
export declare function relative(): void;
>relative : Symbol(relative, Decl(relative.d.ts, 0, 0))
=== /test.ts ===
import { test } from "foo/test.js";
>test : Symbol(test, Decl(test.ts, 0, 8))
import { test as test2 } from "foo/test";
>test : Symbol(test, Decl(test.d.ts, 0, 0))
>test2 : Symbol(test2, Decl(test.ts, 1, 8))
import { relative } from "./relative.js";
>relative : Symbol(relative, Decl(test.ts, 2, 8))
import { relative as relative2 } from "./relative";
>relative : Symbol(relative, Decl(relative.d.ts, 0, 0))
>relative2 : Symbol(relative2, Decl(test.ts, 3, 8))