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
|
tests/cases/compiler/user.ts(1,15): error TS2691: An import path cannot end with a '.ts' extension. Consider importing './x' instead.
tests/cases/compiler/user.ts(2,15): error TS2691: An import path cannot end with a '.tsx' extension. Consider importing './y' instead.
tests/cases/compiler/user.ts(3,15): error TS2691: An import path cannot end with a '.d.ts' extension. Consider importing './z' instead.
==== tests/cases/compiler/x.ts (0 errors) ====
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 TS2691: An import path cannot end with a '.ts' extension. Consider importing './x' instead.
import y from "./y.tsx";
~~~~~~~~~
!!! error TS2691: An import path cannot end with a '.tsx' extension. Consider importing './y' instead.
import z from "./z.d.ts";
~~~~~~~~~~
!!! error TS2691: An import path cannot end with a '.d.ts' extension. Consider importing './z' instead.
// Making sure the suggested fixes are valid:
import x2 from "./x";
import y2 from "./y";
import z2 from "./z";
|