-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
Fix AvailableA PR has been opened for this issueA PR has been opened for this issueNeeds InvestigationThis issue needs a team member to investigate its status.This issue needs a team member to investigate its status.
Milestone
Description
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 installnpm 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 buildincorrect generated path forreference path(it exits for 1 more folder). - For
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.
Metadata
Metadata
Assignees
Labels
Fix AvailableA PR has been opened for this issueA PR has been opened for this issueNeeds InvestigationThis issue needs a team member to investigate its status.This issue needs a team member to investigate its status.