-
Notifications
You must be signed in to change notification settings - Fork 109
Export simple type annotations for function-as-a-child arguments #69
Comments
Does the self-assignment mean you're making a PR that fixes this? 😄 |
Yes, I got started on it - it turns out it is not that simple because |
🤔
I'm having a little trouble grokking this. Sorry, my head was just knee-deep in IdP talk. 😅 I might come back to this later. Or if you could possible rephrase/illustrate with snippets I'd be grateful. |
The
and this is based on whether we are working with |
Oh wow they're actually the same, never mind I didn't say anything :) |
Is your feature request related to a problem? Please describe.
Sometimes it is necessary to pass down methods such as
refetch
andmutate
that come from the function-as-a-child arguments of theGet
andMutate
components, e.g. child component or a component method at which point they need a type annotation. Currently, this is quite hard to reproduce with the mutate API looking something like this: https://github.com/contiamo/restful-react/blob/master/src/Mutate.tsx#L119.Describe the solution you'd like
The library should export interfaces for these methods taking the number and configuration of generics as the
Get
orMutate
components themselves. This would make type annotations straightforward and easy to follow.The text was updated successfully, but these errors were encountered: