- Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Description
Sorry it's me again....
it seems this type is resolved too eagerly in parent class.
TypeScript Version: nightly
Code
classA{prop: {}propCopy: this['prop']}classBextendsA{prop: {field: number}propCopy2: this['prop']}varb=newBb.propCopy.field// error hereb.propCopy2.fieldExpected behavior:
Code should compile. both propCopy and propCopy2 have the same type.
Actual behavior:
Error on b.propCopy.field, b.propCopy is typed as {}
Metadata
Metadata
Assignees
Labels
No labels