Skip to content

Generated code can have implicit any #37

@DanielRose

Description

@DanielRose

For all unions/interfaces/objects in the GraphQL schema, the generated code includes a "type-guard" called is{name}, which uses a string array {name}_possibleTypes with the type-names implementing the source value. That array implicitly typed, however.

If the schema includes unused interfaces, the array will be empty, and the array is implicitly typed as any[]. If the Typescript compiler setting noImplicitAny is used, that is a compile error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions