|
| 1 | +/a.ts(2,25): error TS7016: Could not find a declaration file for module 'foo/sub'. '/node_modules/foo/sub.js' implicitly has an 'any' type. |
| 2 | + If the 'foo' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/foo` |
| 3 | +/a.ts(3,25): error TS7016: Could not find a declaration file for module 'bar/sub'. '/node_modules/bar/sub.js' implicitly has an 'any' type. |
| 4 | + Try `npm install @types/bar` if it exists or add a new declaration (.d.ts) file containing `declare module 'bar';` |
| 5 | + |
| 6 | + |
| 7 | +==== /a.ts (2 errors) ==== |
| 8 | + import * as foo from "foo"; |
| 9 | + import * as fooSub from "foo/sub"; |
| 10 | + ~~~~~~~~~ |
| 11 | +!!! error TS7016: Could not find a declaration file for module 'foo/sub'. '/node_modules/foo/sub.js' implicitly has an 'any' type. |
| 12 | +!!! error TS7016: If the 'foo' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/foo` |
| 13 | + import * as barSub from "bar/sub"; |
| 14 | + ~~~~~~~~~ |
| 15 | +!!! error TS7016: Could not find a declaration file for module 'bar/sub'. '/node_modules/bar/sub.js' implicitly has an 'any' type. |
| 16 | +!!! error TS7016: Try `npm install @types/bar` if it exists or add a new declaration (.d.ts) file containing `declare module 'bar';` |
| 17 | + |
| 18 | +==== /node_modules/@types/foo/index.d.ts (0 errors) ==== |
| 19 | + export const foo: number; |
| 20 | + |
| 21 | +==== /node_modules/@types/foo/package.json (0 errors) ==== |
| 22 | + { "name": "@types/foo", "version": "1.2.3" } |
| 23 | + |
| 24 | +==== /node_modules/foo/sub.js (0 errors) ==== |
| 25 | + const x = 0; |
| 26 | + |
| 27 | +==== /node_modules/foo/package.json (0 errors) ==== |
| 28 | + { "name": "foo", "version": "1.2.3" } |
| 29 | + |
| 30 | +==== /node_modules/bar/sub.js (0 errors) ==== |
| 31 | + const x = 0; |
| 32 | + |
| 33 | +==== /node_modules/bar/package.json (0 errors) ==== |
| 34 | + { "name": "bar", "version": "1.2.3" } |
| 35 | + |
0 commit comments