helper function parameter type

I am trying to make a basic helper function that takes in a parameter. I want the parameter type to be the same type as a column type. I have a solution, but is this the best way?
No description
2 Replies
tacomanator
tacomanator9mo ago
If you're doing this a lot, you might consider declaring a type:
export type SelectBusinessApplication = InferSelectModel<typeof businessapplication>;
export type SelectBusinessApplication = InferSelectModel<typeof businessapplication>;
And using that throughout the app. I am just assuming this reduces the overall work of the type checker.
iCode
iCodeOP9mo ago
that makes sense, ty!
Want results from more Discord servers?
Add your server