Skip to content
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

types(model): support calling Model.validate() with pathsToSkip option #14088

Merged
merged 2 commits into from
Nov 21, 2023

Conversation

vkarpov15
Copy link
Collaborator

Re: #14003

Summary

While #14003 looks like a non-issue, it did lead us to find that TS types don't support calling Model.validate() with a pathsToSkip option

Examples

Comment on lines 463 to +466
validate(): Promise<void>;
validate(optional: any): Promise<void>;
validate(optional: any, pathsToValidate: PathsToValidate): Promise<void>;
validate(obj: any): Promise<void>;
validate(obj: any, pathsOrOptions: PathsToValidate): Promise<void>;
validate(obj: any, pathsOrOptions: { pathsToSkip?: pathsToSkip }): Promise<void>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kinda unrelated to this PR or issue, but dosnt validate return a casted copy?

* @return {Promise<Object>} casted and validated copy of `obj` if validation succeeded

@hasezoey hasezoey added the typescript Types or Types-test related issue / Pull Request label Nov 17, 2023
@vkarpov15 vkarpov15 merged commit b7a63de into 7.x Nov 21, 2023
@hasezoey hasezoey deleted the vkarpov15/gh-14003 branch November 22, 2023 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
typescript Types or Types-test related issue / Pull Request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants