diff options
author | Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com> | 2024-05-06 16:54:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-06 23:54:52 +0000 |
commit | 672216d65a7e737256133615b0bf56092b57b87f (patch) | |
tree | 1ee7458192b2e61344fd7e3e2261be6790f5dcbc /cli/lsp/tsc.rs | |
parent | 8eb1f11112c3ced0ff4a35f3487a4da507db05c2 (diff) |
fix(lsp): Pass diagnostic codes to TSC as numbers (#23720)
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.
Diffstat (limited to 'cli/lsp/tsc.rs')
-rw-r--r-- | cli/lsp/tsc.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/lsp/tsc.rs b/cli/lsp/tsc.rs index 0f7ec2b6c..61308092e 100644 --- a/cli/lsp/tsc.rs +++ b/cli/lsp/tsc.rs @@ -511,7 +511,7 @@ impl TsServer { snapshot: Arc<StateSnapshot>, specifier: ModuleSpecifier, range: Range<u32>, - codes: Vec<String>, + codes: Vec<i32>, format_code_settings: FormatCodeSettings, preferences: UserPreferences, ) -> Vec<CodeFixAction> { @@ -4817,7 +4817,7 @@ pub enum TscRequest { String, u32, u32, - Vec<String>, + Vec<i32>, FormatCodeSettings, UserPreferences, )>, |