feat(lsp): add TS quick fix code actions (#9396)

This commit is contained in:
Kitson Kelly 2021-02-05 05:53:02 +11:00 committed by GitHub
parent 644a7ff2d7
commit b77fcbc518
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 944 additions and 8 deletions

View file

@ -37,6 +37,7 @@ use std::cell::RefCell;
use std::convert::From;
use std::fs::File;
use std::io::Read;
use std::path::Path;
use std::path::PathBuf;
use std::pin::Pin;
use std::rc::Rc;
@ -82,7 +83,7 @@ pub fn init(isolate: &mut JsRuntime) {
pub trait FetchPermissions {
fn check_net_url(&self, _url: &Url) -> Result<(), AnyError>;
fn check_read(&self, _p: &PathBuf) -> Result<(), AnyError>;
fn check_read(&self, _p: &Path) -> Result<(), AnyError>;
}
/// For use with `op_fetch` when the user does not want permissions.
@ -93,7 +94,7 @@ impl FetchPermissions for NoFetchPermissions {
Ok(())
}
fn check_read(&self, _p: &PathBuf) -> Result<(), AnyError> {
fn check_read(&self, _p: &Path) -> Result<(), AnyError> {
Ok(())
}
}