-
Notifications
You must be signed in to change notification settings - Fork 13k
Description
TypeScript Version: 3.1.0-dev.20180901
Typescript build fails when using tsc -b
with project references. The generated .d.ts
files in outDir
fails to resolve relative imports imports
Another(consequence) issue is that extending an interface does not recognizes properties of super interface. As can be seen in the output below a.ts
imports interface IT2
from which it extends with another property prop3
but the compiler fails to resolve relative reference in generated d.ts
file and throws error.
Search Terms:
tsc build
project references
Code
https://github.com/pragatisureka/typescript-build-test
This repo is similar to https://github.com/RyanCavanaugh/project-references-outfile but without outFile
Expected behavior:
Build succeeds
Actual behavior:
Build fails
mainpkg/dist/a.d.ts:1:21 - error TS2307: Cannot find module './b'.
1 import { IT2 } from './b';
~~~~~
pkg2/c.ts:6:9 - error TS2322: Type '{ prop1: string; prop2: string[]; prop3: number; }' is not assignable to type 'IT1'.
Object literal may only specify known properties, but 'prop1' does not exist in type 'IT1'. Did you mean to write 'prop3'?
6 prop1: 'text',