Skip to content

Invalidate unnecessary 'as any' and '@ts-ignore' #37391

Closed
@steida

Description

@steida

TypeScript type system is not easy. Errors are often undecipherable. There is no shame to use as any or @ts-ignore because YOLO is the real thing. Especially after days spent hunting compiler bugs.

But TypeScript and its ecosystem is smarter day by day. Some old as any or @ts-ignore maybe are not required anymore.

TypeScript should detect it.

Activity

IllusionMH

IllusionMH commented on Mar 14, 2020

@IllusionMH
Contributor

Not sure if first one is doable or reasonable, however second point us already implemented.
Use //@ts-expect-error #36014

AlCalzone

AlCalzone commented on Mar 14, 2020

@AlCalzone
Contributor

For the first one you might want to try the wotan linter.

steida

steida commented on Mar 14, 2020

@steida
Author

@IllusionMH Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @steida@IllusionMH@AlCalzone

        Issue actions

          Invalidate unnecessary 'as any' and '@ts-ignore' · Issue #37391 · microsoft/TypeScript