/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.
  If the 'foo' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/foo`
/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.
  Try `npm install @types/bar` if it exists or add a new declaration (.d.ts) file containing `declare module 'bar';`


==== /a.ts (2 errors) ====
    import * as foo from "foo";
    import * as fooSub from "foo/sub";
                            ~~~~~~~~~
!!! error TS7016: Could not find a declaration file for module 'foo/sub'. '/node_modules/foo/sub.js' implicitly has an 'any' type.
!!! 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`
    import * as barSub from "bar/sub";
                            ~~~~~~~~~
!!! error TS7016: Could not find a declaration file for module 'bar/sub'. '/node_modules/bar/sub.js' implicitly has an 'any' type.
!!! error TS7016:   Try `npm install @types/bar` if it exists or add a new declaration (.d.ts) file containing `declare module 'bar';`
    
==== /node_modules/@types/foo/index.d.ts (0 errors) ====
    export const foo: number;
    
==== /node_modules/@types/foo/package.json (0 errors) ====
    { "name": "@types/foo", "version": "1.2.3" }
    
==== /node_modules/foo/sub.js (0 errors) ====
    const x = 0;
    
==== /node_modules/foo/package.json (0 errors) ====
    { "name": "foo", "version": "1.2.3" }
    
==== /node_modules/bar/sub.js (0 errors) ====
    const x = 0;
    
==== /node_modules/bar/package.json (0 errors) ====
    { "name": "bar", "version": "1.2.3" }
    