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

feat: add ngOnChanges type safety for inputs #71

Merged
merged 3 commits into from
Feb 2, 2024

Conversation

maxime1992
Copy link
Contributor

No description provided.

@maxime1992 maxime1992 requested a review from zakhenry February 2, 2024 10:24
@maxime1992 maxime1992 self-assigned this Feb 2, 2024
@maxime1992 maxime1992 merged commit 1e90976 into master Feb 2, 2024
1 check passed
Copy link

github-actions bot commented Feb 2, 2024

🎉 This PR is included in version 2.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

// specifying the generics is only needed if you intend to
// use the `ngOnChanges` observable, this way you'll have
// typed input values instead of just a `SimpleChange`
getObservableLifecycle<ChildComponent, 'input1' | 'input2'>(this);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the consequence of not defining the generic? ngOnChanges works fine but just has untyped object?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants