Replies: 1 comment
-
Never mind, I've written too much C++/Java/Haskell to not realize that |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all. In a number of places, where components/hooks etc are generic with respect to the resource type, TData is used, often with the default type BaseRecord. However, in some places (e.g. useTable), TData is constrained to be a subclass of BaseRecord, rather than defaulting to it, and since BaseRecord is defined as
this means any string is valid as a key. Do we need this constraint? I would have preferred to have the keys restricted to the keys defined by my resource, but with this constraint, any string will pass the type checker.
Beta Was this translation helpful? Give feedback.
All reactions