api-client-generator icon indicating copy to clipboard operation
api-client-generator copied to clipboard

About 'ngx-model-guards-export.mustache' template

Open sebnic opened this issue 4 years ago • 1 comments

Hello,

Why the boolean expression of generated type guards is always terminated by true?

see line 32 of 'ngx-model-guards-export.mustache' template.

Thank for your help.

sebnic avatar Dec 08 '20 09:12 sebnic

@sebnic hello, the intended logic here is to combine all checks for the type with and operation (&&) so for the convenience of generated code we end the checks with true. This can be interpreted as, if there are no falsy checks along the way, it is true.

vmasek avatar Dec 08 '20 09:12 vmasek