3 ms·
A common convention I've seen is using T at the start of a type parameter, [1] for example. TKey, TData, TError, TSuccessCallback, etc. I always liked T at the
by code_biologist 2y ago
A common convention I've seen is using T at the start of a type parameter, [1] for example. TKey, TData, TError, TSuccessCallback, etc. I always liked T at the end, but I've not seen that as often.
[1] https://github.com/TanStack/query/blob/59a6d3df3035d6effeaed884f4575b1a0ef8e788/packages/react-query/src/useQuery.ts#L15-L23 https://github.com/TanStack/query/blob/59a6d3df3035d6effeaed...
- toastedwedge 2y agoSeems apt that the error for a generic type would (and should) be spelled "terror."