d36df0dda5
* Test case for path mapping with extension * Try file if matched pattern specifies the extension instead of all the time Fixes #39743
25 lines
518 B
TypeScript
25 lines
518 B
TypeScript
// @noImplicitReferences: true
|
|
// @traceResolution: true
|
|
// @allowJs: true
|
|
// @esModuleInterop: true
|
|
// @fullEmitPaths: true
|
|
// @resolveJsonModule: true
|
|
|
|
// @Filename: /node_modules/foo/bar/foobar.json
|
|
{ "a": 10 }
|
|
|
|
// @Filename: /a.ts
|
|
import foobar from "foo/bar/foobar.json";
|
|
|
|
// @Filename: /tsconfig.json
|
|
{
|
|
"compilerOptions": {
|
|
"baseUrl": ".",
|
|
"paths": {
|
|
"*": ["node_modules/*", "src/types"]
|
|
},
|
|
"allowJs": true,
|
|
"outDir": "bin"
|
|
}
|
|
}
|