mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-07-18 18:25:00 +00:00
dev: reduce a bundle of ts usage in query crate (#72)
This commit is contained in:
parent
c6509325a8
commit
cc1f418423
25 changed files with 204 additions and 117 deletions
|
@ -7,7 +7,7 @@ pub(crate) mod diagnostics;
|
|||
use std::sync::Arc;
|
||||
|
||||
pub use analysis::AnalysisContext;
|
||||
use typst_ts_core::TypstDocument;
|
||||
use typst::model::Document as TypstDocument;
|
||||
|
||||
pub use diagnostics::*;
|
||||
pub(crate) mod code_lens;
|
||||
|
@ -62,6 +62,16 @@ pub trait SyntaxRequest {
|
|||
fn request(self, ctx: &mut AnalysisContext) -> Option<Self::Response>;
|
||||
}
|
||||
|
||||
pub trait StatefulRequest {
|
||||
type Response;
|
||||
|
||||
fn request(
|
||||
self,
|
||||
ctx: &mut AnalysisContext,
|
||||
v: Option<VersionedDocument>,
|
||||
) -> Option<Self::Response>;
|
||||
}
|
||||
|
||||
mod polymorphic {
|
||||
use super::prelude::*;
|
||||
use super::*;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue