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
Currently, while OverrideProperties restricts the keys you can override to the keys that are present in the type you pass (TOriginal), it doesn't offer autocomplete:
But with a simple tweak we can enable autocompletion:
Currently, while
OverrideProperties
restricts the keys you can override to the keys that are present in the type you pass (TOriginal
), it doesn't offer autocomplete:But with a simple tweak we can enable autocompletion:
Here's a demo showcasing the implementation:
https://stackblitz.com/edit/typescript-zyn86c?file=index.ts
This implementation keeps keys "strict", in the sense that you cannot override/add keys that are not present in the original type.
If maintainers agree that this is a good improvement, I can create a PR.
The text was updated successfully, but these errors were encountered: