Skip to content

reference directive caused issue with ts-check #4059

@jasonlyu123

Description

@jasonlyu123

Steps to reproduce

// @ts-check

/// <reference lib="dom" />

let a = ''
a = 1;

Behavior with typescript@6.0

The file will be type-checked.

Behavior with tsgo

As long as any tri-slash reference directive is after the ts-check directive, the file won't be type-checked. Even if compilerOptions.checkJs is true, or if the file is a ts file. It makes ts-check actually act like ts-nocheck.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions