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

typescript: Add a generic type to .view #272

Merged
merged 3 commits into from
Nov 23, 2021

Conversation

Uzlopak
Copy link
Contributor

@Uzlopak Uzlopak commented Nov 23, 2021

I missed the ability to add typings to the view data-parameter. So with this change, it is possible to provide view a type, as I would expect.

This change is non breaking.

So what does it do exactly?

If you provide a type, which has to be an Object-Interface, it makes the data-parameter mandatory and the provided data has to be of shape of that interface. So if you change the interface and miss to adapt the change in the view then typescript screams at you :).

Checklist

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@mcollina mcollina requested a review from climba03003 November 23, 2021 15:54
Copy link
Member

@climba03003 climba03003 left a comment

Choose a reason for hiding this comment

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

LGTM.

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.

4 participants