diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-01-14 18:29:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-14 18:29:17 +0100 |
commit | 0d51c1f90ecc3d276e17564c2471604b6dc1f2bd (patch) | |
tree | 60664f2442272fbd3feb2605ce604e2e97390613 /cli/lsp/language_server.rs | |
parent | f3bb0a1a0e5ee3335d3c45db2be285791c7516cf (diff) |
feat: remove conditional unstable type-checking (#21825)
This commit removes conditional type-checking of unstable APIs.
Before this commit `deno check` (or any other type-checking command and
the LSP) would error out if there was an unstable API in the code, but not
`--unstable` flag provided.
This situation hinders DX and makes it harder to configure Deno. Failing
during runtime unless `--unstable` flag is provided is enough in this case.
Diffstat (limited to 'cli/lsp/language_server.rs')
-rw-r--r-- | cli/lsp/language_server.rs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/cli/lsp/language_server.rs b/cli/lsp/language_server.rs index 395053fa5..a3c817526 100644 --- a/cli/lsp/language_server.rs +++ b/cli/lsp/language_server.rs @@ -1126,7 +1126,7 @@ impl Inner { "experimentalDecorators": true, "isolatedModules": true, "jsx": "react", - "lib": ["deno.ns", "deno.window"], + "lib": ["deno.ns", "deno.window", "deno.unstable"], "module": "esnext", "moduleDetection": "force", "noEmit": true, @@ -1137,14 +1137,6 @@ impl Inner { // TODO(@kitsonk) remove for Deno 1.15 "useUnknownInCatchVariables": false, })); - let config = &self.config; - let workspace_settings = config.workspace_settings(); - if workspace_settings.unstable { - let unstable_libs = json!({ - "lib": ["deno.ns", "deno.window", "deno.unstable"] - }); - tsconfig.merge(&unstable_libs); - } if let Err(err) = self.merge_user_tsconfig(&mut tsconfig) { self.client.show_message(MessageType::WARNING, err); } |