File: moduleResolutionNoTsCJS.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 (33 lines) | stat: -rw-r--r-- 1,512 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
26
27
28
29
30
31
32
33
tests/cases/compiler/user.ts(1,15): error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled.
tests/cases/compiler/user.ts(2,15): error TS5097: An import path can only end with a '.tsx' extension when 'allowImportingTsExtensions' is enabled.
tests/cases/compiler/user.ts(3,15): error TS2846: A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file './z' instead?


==== tests/cases/compiler/x.ts (0 errors) ====
    // CommonJS output
    
    export default 0;
    
==== tests/cases/compiler/y.tsx (0 errors) ====
    export default 0;
    
==== tests/cases/compiler/z.d.ts (0 errors) ====
    declare const x: number;
    export default x;
    
==== tests/cases/compiler/user.ts (3 errors) ====
    import x from "./x.ts";
                  ~~~~~~~~
!!! error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled.
    import y from "./y.tsx";
                  ~~~~~~~~~
!!! error TS5097: An import path can only end with a '.tsx' extension when 'allowImportingTsExtensions' is enabled.
    import z from "./z.d.ts";
                  ~~~~~~~~~~
!!! error TS2846: A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file './z' instead?
    
    // Making sure the suggested fixes are valid:
    import x2 from "./x";
    import y2 from "./y";
    import z2 from "./z";