File: resolutionCandidateFromPackageJsonField2%28moduleresolution%3Dnode10%29.errors.txt

package info (click to toggle)
node-typescript 5.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 497,488 kB
  • sloc: javascript: 2,107,274; makefile: 6; sh: 1
file content (25 lines) | stat: -rw-r--r-- 757 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
test.ts(1,19): error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled.


==== tsconfig.json (0 errors) ====
    {
        "compilerOptions": {
            "paths": {
                "foo/*": ["./dist/*"],
                "baz/*.ts": ["./types/*.d.ts"]
            }
        }
    }
    
==== dist/bar.ts (0 errors) ====
    export const a = 1234;
    
==== types/main.d.ts (0 errors) ====
    export const b: string;
    
==== test.ts (1 errors) ====
    import { a } from "foo/bar.ts";
                      ~~~~~~~~~~~~
!!! error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled.
    import { b } from "baz/main.ts";