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

Fix generated code for type-guards #38

Closed
wants to merge 1 commit into from
Closed

Fix generated code for type-guards #38

wants to merge 1 commit into from

Conversation

DanielRose
Copy link

@DanielRose DanielRose commented Aug 31, 2020

Fixes #37

Explicitly types the helper array {name}_possibleTypes as String[].

An alternative would be to check if the arrays are empty, and don't emit the code in that case (in lines 21 and 24).

The generated code results in an empty array (i.e. any[]) for unused interfaces. Depending on the Typescript strictness settings, that can be a compile error.
@DanielRose DanielRose closed this by deleting the head repository Aug 19, 2022
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 this pull request may close these issues.

Generated code can have implicit any
1 participant