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
{{ message }}
Repository navigation
Implementation of abstract properties doesn't care about readonly and/or writeonly propertiesΒ #62527
{abstractclassA{abstracta: number;// Not readonly}// TypeScript doesn't care that this doesn't implement the setterclassBextendsA{geta(){return1;}// Readonly}constl: A=newB();l.a=8;// No error (Reasonable)}{abstractclassA{abstractreadonlya: number;// Readonly}// TypeScript doesn't care that this doesn't implement the getterclassBextendsA{seta(v: number){}// Writeonly}constl=newB();l.a=8;// No error (Good)}
π Actual behavior
TypeScript only cares about the name of the implemented property and its type
π Expected behavior
It should also care about whether it's readable and/or writable
Activity
MartinJohns commentedon Oct 2, 2025
Duplicate of #49345.
AFatNiBBa commentedon Oct 2, 2025
Just as a confirmation, is it true that:
MartinJohns commentedon Oct 2, 2025
There is no flag. But there's an open PR about introducing such a flag: #58296
typescript-bot commentedon Oct 5, 2025
This issue has been marked as "Duplicate" and has seen no recent activity. It has been automatically closed for house-keeping purposes.