New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add TypeSafety to Entity.toObject()
#4198
Labels
enhancement
New feature or request
Milestone
Comments
Looks like this does the job just fine, given we don't support dot paths in there, it can be really simple: toObject<K extends EntityKey<T>>(ignoreFields?: K[]): Omit<EntityDTO<T>, K>; The |
B4nan
added a commit
that referenced
this issue
Apr 7, 2023
implemented via 18570d7 |
B4nan
added a commit
that referenced
this issue
Apr 7, 2023
B4nan
added a commit
that referenced
this issue
Apr 8, 2023
B4nan
added a commit
that referenced
this issue
Apr 10, 2023
B4nan
added a commit
that referenced
this issue
Apr 12, 2023
B4nan
added a commit
that referenced
this issue
Apr 26, 2023
jsprw
pushed a commit
to jsprw/mikro-orm-full-text-operators
that referenced
this issue
May 7, 2023
B4nan
added a commit
that referenced
this issue
May 14, 2023
B4nan
added a commit
that referenced
this issue
May 14, 2023
B4nan
added a commit
that referenced
this issue
May 24, 2023
B4nan
added a commit
that referenced
this issue
May 26, 2023
B4nan
added a commit
that referenced
this issue
Jun 11, 2023
B4nan
added a commit
that referenced
this issue
Sep 10, 2023
B4nan
added a commit
that referenced
this issue
Sep 20, 2023
B4nan
added a commit
that referenced
this issue
Sep 24, 2023
B4nan
added a commit
that referenced
this issue
Sep 30, 2023
B4nan
added a commit
that referenced
this issue
Oct 2, 2023
B4nan
added a commit
that referenced
this issue
Oct 17, 2023
B4nan
added a commit
that referenced
this issue
Oct 21, 2023
B4nan
added a commit
that referenced
this issue
Oct 25, 2023
B4nan
added a commit
that referenced
this issue
Nov 2, 2023
B4nan
added a commit
that referenced
this issue
Nov 5, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
.toObject
does not have solid TypeSafety for the args or on the return typeDescribe the solution you'd like
Refactor the method to have a signature similar to the following:
I believe it's possible to infer the type of
ignoreFields
, but maybe not... if not, maybe a generic argument?The text was updated successfully, but these errors were encountered: