You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classA{publicx:number;}classB{privatex:number;}leta:A=newAasReadonly<A>;// succeedsletb:B=newBasReadonly<B>;// type error: Property x is missing in Readonly<B>classAA{privatex:number;}classBBextendsAA{}letbb:BB=newBBasReadonly<BB>;// type error: Property x is missing in Readonly<BB>
Expected behavior:
To me it appears B and its Readonly are the same (since there are no external visible properties) while A and its Readonly differ in the mutability in x. Although I also think it would be fine if all assignments worked.
I actually noticed this with the case of BB and it being a private field in the super class that caused the assignment to fail.
Actual behavior:
As per code comments
The text was updated successfully, but these errors were encountered:
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
TypeScript Version: 2.3.2
Code
Expected behavior:
To me it appears B and its Readonly are the same (since there are no external visible properties) while A and its Readonly differ in the mutability in x. Although I also think it would be fine if all assignments worked.
I actually noticed this with the case of BB and it being a private field in the super class that caused the assignment to fail.
Actual behavior:
As per code comments
The text was updated successfully, but these errors were encountered: