Closed cmaster11 closed 7 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
e80f93f
) 98.69% compared to head (f7c6bf9
) 98.69%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
E.g. take this schema:
Without brackets, a chain would have become
In this type, the whole
any | { json: any; } | { raw: string; }
is the return type of the function, which is wrong.With brackets, it will be:
There could be some more advanced logic to figure out if we want the brackets or not depending if we're using a union or not, but I feel it is even safer in general to just wrap function types in brackets given the "unsupported" nature of the Function type.
Note: this will conflict on merge with https://github.com/mrjono1/joi-to-typescript/pull/401. I'll take care of it if merged. Probably one test will fail.