Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use declare keyword to override property type from parent class #682

Merged
merged 1 commit into from
May 5, 2022

Conversation

lbguilherme
Copy link
Contributor

This syntax is supported since TypeScript 3.7 and is required since ES2022 (or the current ESNext).

See microsoft/TypeScript#33509 for extra details.

When overriding the type of a property from a parent class without setting an initial value, the keyword declare should be used to prevent the property from being initialized to undefined.

Replaces and closes #681.

lbguilherme added a commit that referenced this pull request May 5, 2022
@lbguilherme lbguilherme merged commit 9436e64 into master May 5, 2022
@dgadelha dgadelha deleted the fix/es2022 branch October 2, 2023 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants