-
Notifications
You must be signed in to change notification settings - Fork 749
Open
Labels
Domain: Declaration EmitRelated to declaration emit, type printingRelated to declaration emit, type printing
Description
Potentially related: #1034
Steps to reproduce
https://github.com/johnpyp/tsgo-monorepo-reference-issue
Setup
package-c: exportsMyTypeinterfacepackage-b: project reference topackage-c, exportscreateThing()returningMyTypepackage-a: project reference topackage-bonly (notpackage-c), usescreateThing()without type annotation
The issue is that package-a reaches package-c types transitively through package-b, but doesn't have a direct project reference to package-c.
Behavior with typescript@5.9
No error
Behavior with tsgo
packages/package-a/src/index.ts(4,10): error TS2742: The inferred type of 'thing' cannot be named without a reference to '../../package-b/node_modules/package-c/out'. This is likely not portable. A type annotation is necessary.
sanny-io, romulovalez, riordanpawley, solita-markoma, samhh and 6 moretmm1, MIreland, tonivj5 and v-bilyavskiy
Metadata
Metadata
Assignees
Labels
Domain: Declaration EmitRelated to declaration emit, type printingRelated to declaration emit, type printing