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
SharpTS ignores a TypeScript-valid colon description after a line directive.
// @ts-expect-error: intentional assignment for the negative controlconstvalue: number="wrong";
Pinned TypeScript 6.0.3 reports no diagnostic for this source; SharpTS reports TS2322 because Lexer.MatchesPragma only accepts end-of-line or whitespace after the directive name. The same source with a space instead of the colon is recognized. @ts-ignore: reason has the same delimiter issue.
This differs from closed #2522, which enabled module-wide line-directive handling and unused-expectation diagnostics: the colon spelling is discarded during lexing before those policies run. Found during the PR #3487 benchmark followup; no introducing-commit claim is made.
Acceptance: recognize colon descriptions for @ts-expect-error and @ts-ignore, preserve unused-expectation TS2578, suppress only the following eligible line, and keep misleading prose/truncated/file-pragma prefixes from disabling checking. Do not replace this with @ts-nocheck or weaken the diagnostic policy.
Pinned compiler evidence covers ten accepted, unused, line-local, and misleading-prefix controls in artifacts/p3-compiler/colon-directive-oracles.json, produced by verify-colon-directives.cjs against external/typescript/lib/typescript.js version 6.0.3.
Activity
Recognize colon descriptions on TypeScript line directives (Fixes #3488)