What are the Drizzle conventions for giving names to Drizzle return types?
Hello all, I have a question about Drizzle conventions. Do people give names to the return types of their Drizzle calls?
For example, consider the following code:
For example, consider the following code:
- Here, we use the
ReturnTypeutility type from TypeScript to satisfy DRY. (If we wanted to violate DRY, we could repeat all the user fields inside of a dedicatedUserTypeScriptinterface.) - However, we now have a problem where Intellisense does not work properly. In other words, if we mouse over
in the following code:user
We get the full enumerated object inside of a union withundeifned, instead of the much easier to read and understandUser | undefined.
Does anyone know if there are Drizzle conventions to get smarter Intellisense here?