//! Native TypeScript-backed LSP. Project acquisition/resolution is supplied by a host. mod backend; mod bridge; mod project; mod server; mod service; mod wire; pub use project::canonical_uri; pub use project::{Diagnostic, ProjectInput, ResolvedImport, ScriptKind, Source}; pub use server::serve; pub use service::{Documents, ProjectService, Refresh}; pub type Error = Box; pub type Result = std::result::Result; pub const BACKEND_VERSION: &str = "7.1.0-dev.20261013.1"; /// Type-checks one immutable project generation and returns diagnostics for /// every module in it, in URI order. pub async fn check(binary: &std::path::Path, input: ProjectInput) -> Result> { let mut project = project::Project::create(binary, input).await?; let result = project.all_diagnostics().await; let close = project.close().await; result.and_then(|diagnostics| close.map(|()| diagnostics)) }