denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
93.06k stars 5.14k forks source link

fix(lsp): Pass diagnostic codes to TSC as numbers #23720

Closed nathanwhit closed 1 week ago

nathanwhit commented 1 week ago

Fixes the Debug Failure errors described in https://github.com/denoland/deno/issues/23643#issuecomment-2094552765 .

The issue here was that we were passing diagnostic codes as strings but TSC expects the codes to be numbers. This resulted in some quick fixes not working (as illustrated by the test added here which fails before this PR).

The first commit is the actual fix. The rest are just test related.