Update type
This commit is contained in:
parent
022c57e88a
commit
e81d521c9c
2 changed files with 4 additions and 3 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
import type { CursorSpan } from "./CursorSpan";
|
import type { CursorSpan } from "./CursorSpan";
|
||||||
|
|
||||||
export interface DocumentWithCursors {
|
export interface DocumentWithCursors {
|
||||||
vault_update_id: number;
|
vault_update_id: number | null;
|
||||||
document_id: string;
|
document_id: string;
|
||||||
relative_path: string;
|
relative_path: string;
|
||||||
cursors: CursorSpan[];
|
cursors: CursorSpan[];
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,9 @@ pub struct CursorPositionFromClient {
|
||||||
|
|
||||||
#[derive(TS, Serialize, Deserialize, Clone, Debug)]
|
#[derive(TS, Serialize, Deserialize, Clone, Debug)]
|
||||||
pub struct DocumentWithCursors {
|
pub struct DocumentWithCursors {
|
||||||
#[ts(as = "u32")]
|
// It's None in case the document is dirty
|
||||||
pub vault_update_id: VaultUpdateId,
|
#[ts(as = "Option<u32>")]
|
||||||
|
pub vault_update_id: Option<VaultUpdateId>,
|
||||||
|
|
||||||
pub document_id: DocumentId,
|
pub document_id: DocumentId,
|
||||||
pub relative_path: String,
|
pub relative_path: String,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue