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
pkl-typescript currently doesn't support generating child classes that override the type of a property from the parent class.
The README currently says:
TypeScript interfaces, when using extends to extend a parent type, do not support overriding the type of a property from the parent.
This is actually only sort-of true - TypeScript does allow overriding a property type when the new type is compatible with the parent type (eg. narrowing string to a string literal type).
If it's possible to detect this compatibility in Pkl reflection, we should allow this particular subclassing behaviour.
The text was updated successfully, but these errors were encountered:
pkl-typescript
currently doesn't support generating child classes that override the type of a property from the parent class.The README currently says:
This is actually only sort-of true - TypeScript does allow overriding a property type when the new type is compatible with the parent type (eg. narrowing
string
to a string literal type).If it's possible to detect this compatibility in Pkl reflection, we should allow this particular subclassing behaviour.
The text was updated successfully, but these errors were encountered: