feat(cli): support "types" when type checking (#10999)

Fixes #10677
This commit is contained in:
Kitson Kelly 2021-06-22 07:18:32 +10:00 committed by GitHub
parent cda15f2a98
commit 281c4cd8fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 636 additions and 92 deletions

View file

@ -10,6 +10,7 @@ use deno_core::serde_json::Value;
use deno_core::url::Url;
use deno_core::ModuleSpecifier;
use log::error;
use lsp::WorkspaceFolder;
use lspower::lsp;
use std::collections::BTreeMap;
use std::collections::HashMap;
@ -188,6 +189,7 @@ pub struct ConfigSnapshot {
pub client_capabilities: ClientCapabilities,
pub root_uri: Option<Url>,
pub settings: Settings,
pub workspace_folders: Option<Vec<lsp::WorkspaceFolder>>,
}
impl ConfigSnapshot {
@ -218,6 +220,7 @@ pub struct Config {
pub root_uri: Option<Url>,
settings: Arc<RwLock<Settings>>,
tx: mpsc::Sender<ConfigRequest>,
pub workspace_folders: Option<Vec<WorkspaceFolder>>,
}
impl Config {
@ -319,6 +322,7 @@ impl Config {
root_uri: None,
settings,
tx,
workspace_folders: None,
}
}
@ -343,6 +347,7 @@ impl Config {
.try_read()
.map_err(|_| anyhow!("Error reading settings."))?
.clone(),
workspace_folders: self.workspace_folders.clone(),
})
}