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

LogicDto is typed incorrectly #1810

Closed
mantariksh opened this issue May 6, 2021 · 2 comments · Fixed by #1800
Closed

LogicDto is typed incorrectly #1810

mantariksh opened this issue May 6, 2021 · 2 comments · Fixed by #1800

Comments

@mantariksh
Copy link
Contributor

In src/types/form_logic.ts, LogicDto is typed as

LogicDto = ConditionalPick<LeanDocument<ILogicSchema>, Primitive>

This was initially typed to be in line with FormFieldDto, but this is wrong because Logic contains nested objects which are not primitives, resulting in LogicDto only containing _id and logicType.

@seaerchin
Copy link
Contributor

was actually looking at this and i have a fix - can just change to ConditionalExcept<LeanDocument<ILogicSchema>, Function>

@mantariksh
Copy link
Contributor Author

as discussed, the fix mentioned above doesn't work because the logic schema contains a nested condition schema, which won't have its Mongoose properties removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants