-
-
Notifications
You must be signed in to change notification settings - Fork 43
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
Describe the feature
Dear Mr Becker,
I would like to kindly propose that we would start a collab on rewriting this whole package.
I am sure that you have learned a lot of things during the creation of Pinia ORM, so I would like to ask you if you would be interested in rewriting everything for v2.0.
The aspects of the package that I would like to focus on are:
- Generic types (there are lots of possible improvements that could be achieved by generics see feat: Attribute autocompletion in where and with #816 for example);
- Better hook types (Using hooks with Typescript #1067);
- Better Model API:
Typing aPartialtype forElementtaking into account the field declaration for the currentModelinstance. For example, let's say we have aPostmodel that has the following fields:@Uidfield and a@Str(null) declare title: string | null. My proposed/theoreticalRequiredModelAttributes<TModel extends Model>would see which fields can benull(in this case it would be thetitlefield) and return a type that has all the required fields. This type could be used when using theRepository.savemethod (i.e.Repository.save<TModel extends Model>(model: RequiredModelAttributes<TModel>). - Implement library interface overloads for globally declaring what entities the app has (e.g. module redeclaration/overloading with an
Entitiesinterface).
Let me know what you think, sir. I'm confident this could revolutionize the way people create Vue apps.
Thank you for your consideration!
All the best,
Alfa
Additional information
- Would you be willing to help implement this feature?
- Could this feature be implemented as a module?
Final checks
- Check existing discussions and issues.
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested