You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this gives the proper auto complete when creating a new instance:
without the attrs you get all the model props
unfortunately this requires a base class to work
Im not exactly sure how this could be best integrated into the library (if at all) but here are some options.
Im happy to pr them but just wanted to get your feelings first.
Options:
docs: just a some docs and people can copy and paste the snippets
TypedModel base class
export abstract class TypedModel<T,C=T> extends Model<ModelAttrs<T>,ModelAttrs<C>>{}
The text was updated successfully, but these errors were encountered:
Hello,
I managed to reduce a bit of boiler plate with a simple type definition:
this gives the proper auto complete when creating a new instance:
without the attrs you get all the model props
unfortunately this requires a base class to work
Im not exactly sure how this could be best integrated into the library (if at all) but here are some options.
Im happy to pr them but just wanted to get your feelings first.
Options:
The text was updated successfully, but these errors were encountered: