-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed as not planned
Labels
enhancementNew feature or requestNew feature or request
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
When using Drizzle's type inference ($inferSelect), JSDoc comments from the schema definition are lost in the inferred types. This makes it harder to maintain self-documenting code as the documentation needs to be duplicated or is lost entirely when working with the inferred types.
Current Behavior
// schema.ts
export const myTable = pgTable('my_table', {
/** The value of the style property */
value: text('value'),
});
// model.ts
export type MyTable = typeof myTable.$inferSelect;
// The resulting type loses all JSDoc comments:
// type MyTable = {
// value: string | null;
// }I'd hope we can infer the JSDoc or have an alternative way to provide generation of JSDoc.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request