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 (types): fix item type for IItemRenderer #47

Merged
merged 1 commit into from
Nov 12, 2019

Conversation

lopesc
Copy link
Contributor

@lopesc lopesc commented Nov 12, 2019

Fix IItemRenderer interface to make item type generic and update addItem interface to include item as a parameter.

Fixes TS error where addItem(item) expects 0 arguments. This is not correct as addItem expects the item as a parameter.

Fix IItemRenderer interface to make item type generic and update addItem interface to include item as a parameter
@lopesc
Copy link
Contributor Author

lopesc commented Nov 12, 2019

@lopesc Please take a look. Thanks!

@sanusart
Copy link
Owner

Thanks @lopesc looks good.

@sanusart sanusart merged commit 4606eb5 into sanusart:master Nov 12, 2019
@sanusart
Copy link
Owner

Published v3.6.6

@lopesc
Copy link
Contributor Author

lopesc commented Nov 12, 2019

Thanks @sanusart That was super quick. I was actually tidying up some more types as I go, so I'll create another PR when I am done. I like the idea of making these interfaces generic so that the consumer can specify what is the type of the objects in the list. Otherwise TS does not know how to handle the different function parameter, component props (options, values), etc.

@sanusart
Copy link
Owner

Great, thanks @lopesc, I never get to properly type stuff so this would be great!

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