You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 16, 2023. It is now read-only.
First, I thought that something is wrong with TS itself, so I opened issue there with my investigation details: microsoft/TypeScript#37551
But then I found out that dtslint uses different TS versions for parsing source and for applying linting rules (see microsoft/TypeScript#37551 (comment)).
When parsing source, dtslint uses Linter.createProgram(tsconfigPath) which resolves to project's TS. But then in rules, it requires internal (bundled) TS: import * as ts from "typescript";. Which results in unpredicted behavior, because version might not match at all.
In my case, SyntaxKind.VoidKeyword and other SyntaxKind.*s values were changed because of microsoft/TypeScript#35998 PR to TS.
I think we should either use projects TS, or use bundled TS version for both tasks. I'll be happy to investigate more and open PR with this change. Let me know what you think, thanks!