Skip to content

@ts-nocheck seems to be ignored on TS file #26887

@mjbvz

Description

@mjbvz

From @arsnl on August 25, 2018 0:59

  • VSCode Version: 1.26.1
  • OS Version: macOS High Sierra 10.13.6
  • TypeScript: 3.0.1

Steps to Reproduce

  1. Add // @ts-nocheck at the start of any TypeScript file
  2. Try to trigger any TS check error

Result

VS Code display TS error

error

Expected

VS Code should not display TS error

Does this issue occur when all extensions are disabled?: Yes

Snippet to try

// @ts-nocheck

const test = (foo: string) => `${foo}-bar`;

test(1); // Should not display error

test('baz'); // Correct behavior with correct type

// @ts-ignore
test(1); // Correct behavior with @ts-ignore

Copied from original issue: microsoft/vscode#57187

Metadata

Metadata

Assignees

No one assigned

    Labels

    In DiscussionNot yet reached consensusSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions