mirror of
https://github.com/loro-dev/loro.git
synced 2025-02-06 12:25:03 +00:00
refactor: expose frontiers type
This commit is contained in:
parent
ed5324b506
commit
089d05e3a0
1 changed files with 4 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
export * from "loro-wasm";
|
export * from "loro-wasm";
|
||||||
import { Delta } from "loro-wasm";
|
import { Delta, OpId } from "loro-wasm";
|
||||||
import { PrelimText, PrelimList, PrelimMap } from "loro-wasm";
|
import { PrelimText, PrelimList, PrelimMap } from "loro-wasm";
|
||||||
import {
|
import {
|
||||||
ContainerID,
|
ContainerID,
|
||||||
|
@ -55,6 +55,7 @@ export type Value =
|
||||||
|
|
||||||
export type Container = LoroList | LoroMap | LoroText | LoroTree;
|
export type Container = LoroList | LoroMap | LoroText | LoroTree;
|
||||||
export type Prelim = PrelimList | PrelimMap | PrelimText;
|
export type Prelim = PrelimList | PrelimMap | PrelimText;
|
||||||
|
export type Frontiers = OpId[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a path to identify the exact location of an event's target.
|
* Represents a path to identify the exact location of an event's target.
|
||||||
|
@ -110,8 +111,8 @@ export type MapDiff = {
|
||||||
export type TreeDiff = {
|
export type TreeDiff = {
|
||||||
type: "tree";
|
type: "tree";
|
||||||
diff:
|
diff:
|
||||||
| { target: TreeID; action: "create" | "delete" }
|
| { target: TreeID; action: "create" | "delete" }
|
||||||
| { target: TreeID; action: "move"; parent: TreeID };
|
| { target: TreeID; action: "move"; parent: TreeID };
|
||||||
};
|
};
|
||||||
|
|
||||||
export type Diff = ListDiff | TextDiff | MapDiff | TreeDiff;
|
export type Diff = ListDiff | TextDiff | MapDiff | TreeDiff;
|
||||||
|
|
Loading…
Reference in a new issue