Replies: 1 comment
-
Hello Alfa, you can call me Gregor. :) ... i like your enthusiasm. From what you propose it doesn't seem to be a complete rewrite. Only adapting a lot of typscript. I am open to imrprove everything. Maybe we should start finishing first the open type PR. I am sure we can merge a lot of that before v2. What about working on #1067 ? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
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:
Typing a
Partial
type forElement
taking into account the field declaration for the currentModel
instance. For example, let's say we have aPost
model that has the following fields:@Uid
field 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 thetitle
field) and return a type that has all the required fields. This type could be used when using theRepository.save
method (i.e.Repository.save<TModel extends Model>(model: RequiredModelAttributes<TModel>)
.Entities
interface).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
Final checks
Beta Was this translation helpful? Give feedback.
All reactions