d36df0dda5
* Test case for path mapping with extension * Try file if matched pattern specifies the extension instead of all the time Fixes #39743
55 lines
1.9 KiB
Plaintext
55 lines
1.9 KiB
Plaintext
error TS6504: File '/node_modules/foo/lib/test.js' is a JavaScript file. Did you mean to enable the 'allowJs' option?
|
|
The file is in the program because:
|
|
Root file specified for compilation
|
|
error TS6504: File '/relative.js' is a JavaScript file. Did you mean to enable the 'allowJs' option?
|
|
The file is in the program because:
|
|
Matched by include pattern '**/*' in '/tsconfig.json'
|
|
|
|
|
|
!!! error TS6504: File '/node_modules/foo/lib/test.js' is a JavaScript file. Did you mean to enable the 'allowJs' option?
|
|
!!! error TS6504: The file is in the program because:
|
|
!!! error TS6504: Root file specified for compilation
|
|
!!! error TS6504: File '/relative.js' is a JavaScript file. Did you mean to enable the 'allowJs' option?
|
|
!!! error TS6504: The file is in the program because:
|
|
!!! error TS6504: Matched by include pattern '**/*' in '/tsconfig.json'
|
|
==== /tsconfig.json (0 errors) ====
|
|
{
|
|
"compilerOptions": {
|
|
"outDir": "lib",
|
|
"target": "ES6",
|
|
"module": "ES6",
|
|
"baseUrl": "/",
|
|
"moduleResolution": "Node",
|
|
"noImplicitAny": true,
|
|
"traceResolution": true,
|
|
"paths": {
|
|
"foo/*": ["node_modules/foo/lib/*"]
|
|
}
|
|
}
|
|
}
|
|
|
|
==== /node_modules/foo/lib/test.js (0 errors) ====
|
|
export function test() {
|
|
console.log("test");
|
|
}
|
|
|
|
==== /node_modules/foo/lib/test.d.ts (0 errors) ====
|
|
export declare function test(): void;
|
|
|
|
==== /relative.js (0 errors) ====
|
|
export function relative() {
|
|
console.log("test");
|
|
}
|
|
|
|
==== /relative.d.ts (0 errors) ====
|
|
export declare function relative(): void;
|
|
|
|
|
|
==== /test.ts (0 errors) ====
|
|
import { test } from "foo/test.js";
|
|
import { test as test2 } from "foo/test";
|
|
import { relative } from "./relative.js";
|
|
import { relative as relative2 } from "./relative";
|
|
|
|
|
|
|