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

package info (click to toggle)
node-typescript 5.0.4%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 459,116 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (25 lines) | stat: -rw-r--r-- 862 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
tests/cases/compiler/test.ts(1,19): error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled.


==== tests/cases/compiler/tsconfig.json (0 errors) ====
    {
        "compilerOptions": {
            "paths": {
                "foo/*": ["./dist/*"],
                "baz/*.ts": ["./types/*.d.ts"]
            }
        }
    }
    
==== tests/cases/compiler/dist/bar.ts (0 errors) ====
    export const a = 1234;
    
==== tests/cases/compiler/types/main.d.ts (0 errors) ====
    export const b: string;
    
==== tests/cases/compiler/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";