TypeScript Version: 3.9.0-dev.20200413, 3.8.3
Search Terms: composite projects, declaration files, paths, reference, baseUrl
Code
- Download zip with the project ts-bug.zip
npm install
npm run build-non-composite - it should be fine
Then, if you run npm run build - there are 2 errors:
lib/src/common/nominal.d.ts:2:55 - error TS2304: Cannot find name 'MyNominal'.
2 export declare type Nominal<T, Name extends string> = MyNominal<T, Name>;
~~~~~~~~~
lib/src/common/nominal.d.ts:1:22 - error TS6053: File 'C:/projects/src/common/types.d.ts' not found.
1 /// <reference path="../../../src/common/types.d.ts" />
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
And if you run npm run build-baseUrl - there are another 2 errors:
lib/src/common/nominal.d.ts:2:55 - error TS2304: Cannot find name 'MyNominal'.
2 export declare type Nominal<T, Name extends string> = MyNominal<T, Name>;
~~~~~~~~~
lib/src/common/nominal.d.ts:1:23 - error TS2688: Cannot find type definition file for 'types'.
1 /// <reference types="types" />
~~~~~
This is pretty similar to #31696. In this case we have 2 bugs:
- For
npm run build incorrect generated path for reference path (it exits for 1 more folder).
- For
npm run build-baseUrl (which is differ from build case in the only baseUrl compiler option in common sub-project) incorrectly replaced refernce path with reference types, so no project could use it because they might (and will) not have the same baseUrl option.
Related Issues: #31696, #25600
TypeScript Version: 3.9.0-dev.20200413, 3.8.3
Search Terms: composite projects, declaration files, paths, reference, baseUrl
Code
npm installnpm run build-non-composite- it should be fineThen, if you run
npm run build- there are 2 errors:And if you run
npm run build-baseUrl- there are another 2 errors:This is pretty similar to #31696. In this case we have 2 bugs:
npm run buildincorrect generated path forreference path(it exits for 1 more folder).npm run build-baseUrl(which is differ frombuildcase in the onlybaseUrlcompiler option incommonsub-project) incorrectly replacedrefernce pathwithreference types, so no project could use it because they might (and will) not have the samebaseUrloption.Related Issues: #31696, #25600