|
2 | 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 | 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 | 4 | Try `npm install @types/bar` if it exists or add a new declaration (.d.ts) file containing `declare module 'bar';` |
| 5 | +/a.ts(5,30): error TS7016: Could not find a declaration file for module '@scope/foo/sub'. '/node_modules/@scope/foo/sub.js' implicitly has an 'any' type. |
| 6 | + If the '@scope/foo' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/scope__foo` |
| 7 | +/a.ts(6,30): error TS7016: Could not find a declaration file for module '@scope/bar/sub'. '/node_modules/@scope/bar/sub.js' implicitly has an 'any' type. |
| 8 | + Try `npm install @types/scope__bar` if it exists or add a new declaration (.d.ts) file containing `declare module '@scope/bar';` |
5 | 9 |
|
6 | 10 |
|
7 | | -==== /a.ts (2 errors) ==== |
| 11 | +==== /a.ts (4 errors) ==== |
8 | 12 | import * as foo from "foo"; |
9 | 13 | import * as fooSub from "foo/sub"; |
10 | 14 | ~~~~~~~~~ |
|
14 | 18 | ~~~~~~~~~ |
15 | 19 | !!! error TS7016: Could not find a declaration file for module 'bar/sub'. '/node_modules/bar/sub.js' implicitly has an 'any' type. |
16 | 20 | !!! error TS7016: Try `npm install @types/bar` if it exists or add a new declaration (.d.ts) file containing `declare module 'bar';` |
| 21 | + import * as scopeFoo from "@scope/foo"; |
| 22 | + import * as scopeFooSub from "@scope/foo/sub"; |
| 23 | + ~~~~~~~~~~~~~~~~ |
| 24 | +!!! error TS7016: Could not find a declaration file for module '@scope/foo/sub'. '/node_modules/@scope/foo/sub.js' implicitly has an 'any' type. |
| 25 | +!!! error TS7016: If the '@scope/foo' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/scope__foo` |
| 26 | + import * as scopeBarSub from "@scope/bar/sub"; |
| 27 | + ~~~~~~~~~~~~~~~~ |
| 28 | +!!! error TS7016: Could not find a declaration file for module '@scope/bar/sub'. '/node_modules/@scope/bar/sub.js' implicitly has an 'any' type. |
| 29 | +!!! error TS7016: Try `npm install @types/scope__bar` if it exists or add a new declaration (.d.ts) file containing `declare module '@scope/bar';` |
17 | 30 |
|
18 | 31 | ==== /node_modules/@types/foo/index.d.ts (0 errors) ==== |
19 | 32 | export const foo: number; |
|
32 | 45 |
|
33 | 46 | ==== /node_modules/bar/package.json (0 errors) ==== |
34 | 47 | { "name": "bar", "version": "1.2.3" } |
| 48 | + |
| 49 | +==== /node_modules/@types/scope__foo/index.d.ts (0 errors) ==== |
| 50 | + export const foo: number; |
| 51 | + |
| 52 | +==== /node_modules/@types/scope__foo/package.json (0 errors) ==== |
| 53 | + { "name": "@types/scope__foo", "version": "1.2.3" } |
| 54 | + |
| 55 | +==== /node_modules/@scope/foo/sub.js (0 errors) ==== |
| 56 | + const x = 0; |
| 57 | + |
| 58 | +==== /node_modules/@scope/foo/package.json (0 errors) ==== |
| 59 | + { "name": "@scope/foo", "version": "1.2.3" } |
| 60 | + |
| 61 | +==== /node_modules/@scope/bar/sub.js (0 errors) ==== |
| 62 | + const x = 0; |
| 63 | + |
| 64 | +==== /node_modules/@scope/bar/package.json (0 errors) ==== |
| 65 | + { "name": "@scope/bar", "version": "1.2.3" } |
35 | 66 |
|
0 commit comments