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

Improve data provider types #5934

Merged

Conversation

andrico1234
Copy link
Contributor

Only 3 param types required this

UpdateParams
UpdateManyParams
CreateParams

This small change allows us to pass through our data's types if we know what they'll be at this point, and defaulting to any if no type is passed through. The current types treat the data object as any.

As for naming, I'm not too keen on giving single letter names to the generic's arguments. I'll be happy to change T to Data or whatever you feel is most appropriate

@andrico1234 andrico1234 changed the title [WIP] Improve data provider types Improve data provider types Feb 19, 2021
@andrico1234
Copy link
Contributor Author

FYI I had trouble linking RA using the instructions in the .README so I wasn't able to test the types in my own repo. AFAIK there aren't any uses of the dataProvider's update, updateMany, and create methods in any of the test repos.

I might have completely missed it though!

@fzaninotto fzaninotto merged commit 0ccffa7 into marmelab:master Feb 19, 2021
@fzaninotto
Copy link
Member

Thanks!

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.

None yet

2 participants