Skip to content

TypeScript Generator - Ability to mark as ts-nocheck #426

@mythridium

Description

@mythridium

I would like the ability to have // @ts-nocheck added to the top of all generated files.

These are getting generated into my project, but when I build my project, the typescript compiler is throwing type errors from these generated files which I don't care about. I can't exclude these files since I import the classes to act upon so they always get included regardless. I don't want to disable type checking as my own code wouldn't be checked then, but unsure how else I can skip type checking all files within the generated output directory.

If I add the comment // @ts-nocheck at the top of the file it disables type checking for the entier file so this would be an easy solution for typescript to just ignore these generated files, but being the nature of generated files, it gets deleted the next time I generate them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions