@@ -6,14 +6,19 @@ Input::
66 "composite" : true ,
77 "declaration" : true ,
88 "module" : "esnext" ,
9- "moduleResolution" : "bundler"
10- }
9+ "moduleResolution" : "bundler" ,
10+ "rootDir" : "src" ,
11+ "outDir" : "dist"
12+ } ,
13+ "include" : [
14+ "src"
15+ ]
1116}
1217
13- //// [/home/src/workspaces/project/lib/utils.ts]
18+ //// [/home/src/workspaces/project/lib/src/ utils.ts]
1419export const test = ( ) => 'test' ;
1520
16- //// [/home/src/workspaces/project/lib/utils.d.ts]
21+ //// [/home/src/workspaces/project/lib/dist/ utils.d.ts]
1722export declare const test : ( ) => string ;
1823
1924//// [/home/src/workspaces/project/app/tsconfig.json]
@@ -30,8 +35,11 @@ export declare const test: () => string;
3035}
3136
3237//// [/home/src/workspaces/project/app/index.ts]
33- import Test from '../lib/utils' ;
34- console . log ( Test . test ( ) ) ;
38+
39+ import TestSrc from '../lib/src/utils' ; // Error
40+ import TestDecl from '../lib/dist/utils' ; // Error
41+ console . log ( TestSrc . test ( ) ) ;
42+ console . log ( TestDecl . test ( ) ) ;
3543
3644//// [/home/src/tslibs/TS/Lib/lib.d.ts]
3745interface Boolean { }
@@ -50,12 +58,15 @@ declare const console: { log(msg: any): void; };
5058
5159/ h o m e / src/ tslibs / TS / Lib / tsc . js -- p app -- pretty false
5260Output ::
53- app / index . ts ( 1 , 8 ) : error TS1192 : Module '"/home/src/workspaces/project/lib/utils"' has no default export .
61+ app / index . ts ( 2 , 28 ) : error TS1192 : Module '"/home/src/workspaces/project/lib/dist/utils"' has no default export .
62+ app / index . ts ( 3 , 28 ) : error TS1192 : Module '"/home/src/workspaces/project/lib/dist/utils"' has no default export .
5463
5564
5665//// [/home/src/workspaces/project/app/index.js]
57- import Test from '../lib/utils' ;
58- console . log ( Test . test ( ) ) ;
66+ import TestSrc from '../lib/src/utils' ; // Error
67+ import TestDecl from '../lib/dist/utils' ; // Error
68+ console . log ( TestSrc . test ( ) ) ;
69+ console . log ( TestDecl . test ( ) ) ;
5970
6071
6172
0 commit comments