|
| 1 | +error TS6504: File '/node_modules/exports-and-types-versions/dist/foo.js' is a JavaScript file. Did you mean to enable the 'allowJs' option? |
| 2 | + The file is in the program because: |
| 3 | + Root file specified for compilation |
| 4 | +/main.cts(1,16): error TS7016: Could not find a declaration file for module 'exports-and-types-versions/foo'. '/node_modules/exports-and-types-versions/dist/foo.js' implicitly has an 'any' type. |
| 5 | + If the 'exports-and-types-versions' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module 'exports-and-types-versions/foo';` |
| 6 | +/main.cts(2,16): error TS2307: Cannot find module 'exports-and-types-versions/nope' or its corresponding type declarations. |
| 7 | +/main.cts(5,16): error TS2307: Cannot find module 'exports-and-types-versions/versioned-nah' or its corresponding type declarations. |
| 8 | +/main.mts(1,16): error TS7016: Could not find a declaration file for module 'exports-and-types-versions/foo'. '/node_modules/exports-and-types-versions/dist/foo.js' implicitly has an 'any' type. |
| 9 | + If the 'exports-and-types-versions' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module 'exports-and-types-versions/foo';` |
| 10 | +/main.mts(2,16): error TS2307: Cannot find module 'exports-and-types-versions/nope' or its corresponding type declarations. |
| 11 | +/main.mts(5,16): error TS2307: Cannot find module 'exports-and-types-versions/versioned-nah' or its corresponding type declarations. |
| 12 | + |
| 13 | + |
| 14 | +!!! error TS6504: File '/node_modules/exports-and-types-versions/dist/foo.js' is a JavaScript file. Did you mean to enable the 'allowJs' option? |
| 15 | +!!! error TS6504: The file is in the program because: |
| 16 | +!!! error TS6504: Root file specified for compilation |
| 17 | +==== /node_modules/exports-and-types-versions/package.json (0 errors) ==== |
| 18 | + { |
| 19 | + "name": "exports-and-types-versions", |
| 20 | + "version": "1.0.0", |
| 21 | + "exports": { |
| 22 | + "./foo": "./dist/foo.js", |
| 23 | + "./yep": { |
| 24 | + "types": "./types/foo.d.ts", |
| 25 | + "default": "./dist/foo.js" |
| 26 | + }, |
| 27 | + "./versioned-yep": { |
| 28 | + "types@>=4": "./types/foo.d.ts" |
| 29 | + }, |
| 30 | + "./versioned-nah": { |
| 31 | + "types@<4": "./types/foo.d.ts" |
| 32 | + } |
| 33 | + }, |
| 34 | + "typesVersions": { |
| 35 | + "*": { |
| 36 | + "foo": ["./types/foo.d.ts"], |
| 37 | + "nope": ["./types/foo.d.ts"], |
| 38 | + "versioned-nah": ["./types/foo.d.ts"] |
| 39 | + } |
| 40 | + } |
| 41 | + } |
| 42 | + |
| 43 | +==== /node_modules/exports-and-types-versions/dist/foo.js (0 errors) ==== |
| 44 | + module.exports = {}; |
| 45 | + |
| 46 | +==== /node_modules/exports-and-types-versions/types/foo.d.ts (0 errors) ==== |
| 47 | + export {}; |
| 48 | + |
| 49 | +==== /node_modules/just-types-versions/package.json (0 errors) ==== |
| 50 | + { |
| 51 | + "name": "just-types-versions", |
| 52 | + "version": "1.0.0", |
| 53 | + "typesVersions": { |
| 54 | + "*": { |
| 55 | + "foo": ["./types/foo.d.ts"] |
| 56 | + } |
| 57 | + } |
| 58 | + } |
| 59 | + |
| 60 | +==== /node_modules/just-types-versions/types/foo.d.ts (0 errors) ==== |
| 61 | + export {}; |
| 62 | + |
| 63 | +==== /main.cts (3 errors) ==== |
| 64 | + import {} from "exports-and-types-versions/foo"; |
| 65 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 66 | +!!! error TS7016: Could not find a declaration file for module 'exports-and-types-versions/foo'. '/node_modules/exports-and-types-versions/dist/foo.js' implicitly has an 'any' type. |
| 67 | +!!! error TS7016: If the 'exports-and-types-versions' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module 'exports-and-types-versions/foo';` |
| 68 | + import {} from "exports-and-types-versions/nope"; |
| 69 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 70 | +!!! error TS2307: Cannot find module 'exports-and-types-versions/nope' or its corresponding type declarations. |
| 71 | + import {} from "exports-and-types-versions/yep"; |
| 72 | + import {} from "exports-and-types-versions/versioned-yep"; |
| 73 | + import {} from "exports-and-types-versions/versioned-nah"; |
| 74 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 75 | +!!! error TS2307: Cannot find module 'exports-and-types-versions/versioned-nah' or its corresponding type declarations. |
| 76 | + import {} from "just-types-versions/foo"; |
| 77 | + |
| 78 | +==== /main.mts (3 errors) ==== |
| 79 | + import {} from "exports-and-types-versions/foo"; |
| 80 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 81 | +!!! error TS7016: Could not find a declaration file for module 'exports-and-types-versions/foo'. '/node_modules/exports-and-types-versions/dist/foo.js' implicitly has an 'any' type. |
| 82 | +!!! error TS7016: If the 'exports-and-types-versions' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module 'exports-and-types-versions/foo';` |
| 83 | + import {} from "exports-and-types-versions/nope"; |
| 84 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 85 | +!!! error TS2307: Cannot find module 'exports-and-types-versions/nope' or its corresponding type declarations. |
| 86 | + import {} from "exports-and-types-versions/yep"; |
| 87 | + import {} from "exports-and-types-versions/versioned-yep"; |
| 88 | + import {} from "exports-and-types-versions/versioned-nah"; |
| 89 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 90 | +!!! error TS2307: Cannot find module 'exports-and-types-versions/versioned-nah' or its corresponding type declarations. |
| 91 | + import {} from "just-types-versions/foo"; |
| 92 | + |
0 commit comments