loro-repo 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,10 +1,60 @@
1
1
  import { Flock } from "@loro-dev/flock";
2
2
  import { Frontiers, LoroDoc } from "loro-crdt";
3
- import { JoinError, JoinResponseOk, RoomId, UpdateError } from "loro-protocol";
3
+ import { RoomId } from "loro-protocol";
4
+ import { LoroAdaptorConfig } from "loro-adaptors/loro";
4
5
  import { LoroWebsocketClientOptions } from "loro-websocket";
5
- import { FlockAdaptorConfig } from "loro-adaptors/flock";
6
6
 
7
7
  //#region src/types.d.ts
8
+ /**
9
+ * Construction options for creating a `LoroRepo` instance.
10
+ */
11
+ interface LoroRepoOptions {
12
+ /**
13
+ * Transport adapter responsible for fetching and pushing CRDT bundles.
14
+ * Omit when operating fully offline or within pure tests.
15
+ */
16
+ readonly transportAdapter?: TransportAdapter;
17
+ /**
18
+ * Storage adapter that hydrates snapshots and persists incremental updates.
19
+ */
20
+ readonly storageAdapter?: StorageAdapter;
21
+ /**
22
+ * Optional adapter that moves asset payloads while keeping metadata in sync.
23
+ */
24
+ readonly assetTransportAdapter?: AssetTransportAdapter;
25
+ /**
26
+ * Debounce duration in milliseconds before persisting document frontier metadata
27
+ * after local edits. Defaults to 1000 ms when omitted.
28
+ */
29
+ readonly docFrontierDebounceMs?: number;
30
+ }
31
+ /**
32
+ * Persists metadata, documents, and asset payloads on behalf of the repo.
33
+ */
34
+ interface StorageAdapter {
35
+ init?(): Promise<void>;
36
+ close?(): void;
37
+ /**
38
+ * Writes document snapshots, queued updates, assets, or meta bundles to durable storage.
39
+ */
40
+ save(payload: StorageSavePayload): Promise<void>;
41
+ /**
42
+ * Optionally deletes an asset payload during garbage collection.
43
+ */
44
+ deleteAsset?(assetId: AssetId): Promise<void>;
45
+ /**
46
+ * Loads a stored document by hydrating the persisted snapshot and replaying any queued updates.
47
+ */
48
+ loadDoc(docId: string): Promise<LoroDoc | undefined>;
49
+ /**
50
+ * Loads the repository-level metadata replica, if present.
51
+ */
52
+ loadMeta(): Promise<Flock | undefined>;
53
+ /**
54
+ * Loads a cached asset payload, if present.
55
+ */
56
+ loadAsset(assetId: AssetId): Promise<Uint8Array | undefined>;
57
+ }
8
58
  type GlobalBlob = typeof globalThis extends {
9
59
  Blob: infer B;
10
60
  } ? B : {
@@ -39,29 +89,6 @@ type JsonObject = {
39
89
  * Synchronisation lanes available to repo consumers.
40
90
  */
41
91
  type SyncScope = "meta" | "doc" | "full";
42
- /**
43
- * Construction options for creating a `LoroRepo` instance.
44
- */
45
- interface LoroRepoOptions<_Meta extends JsonObject = JsonObject> {
46
- /**
47
- * Transport adapter responsible for fetching and pushing CRDT bundles.
48
- * Omit when operating fully offline or within pure tests.
49
- */
50
- readonly transportAdapter?: TransportAdapter;
51
- /**
52
- * Storage adapter that hydrates snapshots and persists incremental updates.
53
- */
54
- readonly storageAdapter?: StorageAdapter;
55
- /**
56
- * Optional adapter that moves asset payloads while keeping metadata in sync.
57
- */
58
- readonly assetTransportAdapter?: AssetTransportAdapter;
59
- /**
60
- * Debounce duration in milliseconds before persisting document frontier metadata
61
- * after local edits. Defaults to 1000 ms when omitted.
62
- */
63
- readonly docFrontierDebounceMs?: number;
64
- }
65
92
  /**
66
93
  * Parameters accepted by `LoroRepo.sync`.
67
94
  */
@@ -147,45 +174,6 @@ interface TransportAdapter {
147
174
  * Subscribes to live document updates, returning a cleanup handle.
148
175
  */
149
176
  joinDocRoom(docId: string, loroDoc: LoroDoc, params?: TransportJoinParams): TransportSubscription;
150
- /**
151
- * Optional callback invoked upon successful join responses.
152
- */
153
- handleJoinResponse?(response: JoinResponseOk): void;
154
- /**
155
- * Optional callback surfaced when joining a room fails.
156
- */
157
- handleJoinError?(error: JoinError): void;
158
- /**
159
- * Optional callback for update-level failures (e.g., decoding errors).
160
- */
161
- handleUpdateError?(error: UpdateError): void;
162
- }
163
- /**
164
- * Persists metadata, documents, and asset payloads on behalf of the repo.
165
- */
166
- interface StorageAdapter {
167
- init?(): Promise<void>;
168
- close?(): void;
169
- /**
170
- * Writes document snapshots, queued updates, assets, or meta bundles to durable storage.
171
- */
172
- save(payload: StorageSavePayload): Promise<void>;
173
- /**
174
- * Optionally deletes an asset payload during garbage collection.
175
- */
176
- deleteAsset?(assetId: AssetId): Promise<void>;
177
- /**
178
- * Loads a stored document by hydrating the persisted snapshot and replaying any queued updates.
179
- */
180
- loadDoc(docId: string): Promise<LoroDoc | undefined>;
181
- /**
182
- * Loads the repository-level metadata replica, if present.
183
- */
184
- loadMeta(): Promise<Flock | undefined>;
185
- /**
186
- * Loads a cached asset payload, if present.
187
- */
188
- loadAsset(assetId: AssetId): Promise<Uint8Array | undefined>;
189
177
  }
190
178
  /**
191
179
  * Union describing the kinds of payloads persisted via the storage adapter.
@@ -428,74 +416,6 @@ interface RepoEventFilter<Meta extends JsonObject = JsonObject> {
428
416
  readonly by?: ReadonlyArray<RepoEventBy>;
429
417
  }
430
418
  //#endregion
431
- //#region src/loro-adaptor.d.ts
432
- type RepoFlockAdaptorConfig = FlockAdaptorConfig;
433
- //#endregion
434
- //#region src/transport/websocket.d.ts
435
- interface WebSocketTransportOptions {
436
- /**
437
- * WebSocket endpoint provided to the loro-websocket client.
438
- */
439
- readonly url: string;
440
- /**
441
- * Optional loro-websocket client configuration.
442
- */
443
- readonly client?: Omit<LoroWebsocketClientOptions, "url">;
444
- /**
445
- * Metadata room identifier. When omitted, metadata synchronisation is disabled.
446
- */
447
- readonly metadataRoomId?: string;
448
- /**
449
- * Overrides the CRDT type advertised for the metadata room (defaults to `%FLO`).
450
- * Only `%FLO` is supported.
451
- */
452
- readonly metadataCrdtType?: string;
453
- /**
454
- * Optional adaptor configuration for metadata joins.
455
- */
456
- readonly metadataAdaptorConfig?: RepoFlockAdaptorConfig;
457
- /**
458
- * Static auth payload for metadata joins.
459
- */
460
- readonly metadataAuth?: Uint8Array;
461
- /**
462
- * Factory that maps document ids to room identifiers. Defaults to the doc id.
463
- */
464
- readonly docRoomId?: (docId: string) => string;
465
- /**
466
- * Optional auth provider for document joins.
467
- */
468
- readonly docAuth?: (docId: string) => Uint8Array | undefined;
469
- }
470
- /**
471
- * loro-websocket backed {@link TransportAdapter} implementation for LoroRepo.
472
- */
473
- declare class WebSocketTransportAdapter implements TransportAdapter {
474
- private readonly options;
475
- private client?;
476
- private metadataSession?;
477
- private readonly docSessions;
478
- constructor(options: WebSocketTransportOptions);
479
- connect(_options?: {
480
- timeout?: number;
481
- }): Promise<void>;
482
- close(): Promise<void>;
483
- isConnected(): boolean;
484
- syncMeta(flock: Flock, options?: {
485
- timeout?: number;
486
- }): Promise<TransportSyncResult>;
487
- joinMetaRoom(flock: Flock, params?: TransportJoinParams): TransportSubscription;
488
- syncDoc(docId: string, doc: LoroDoc, options?: {
489
- timeout?: number;
490
- }): Promise<TransportSyncResult>;
491
- joinDocRoom(docId: string, doc: LoroDoc, params?: TransportJoinParams): TransportSubscription;
492
- private ensureClient;
493
- private ensureMetadataSession;
494
- private teardownMetadataSession;
495
- private ensureDocSession;
496
- private leaveDocSession;
497
- }
498
- //#endregion
499
419
  //#region src/transport/broadcast-channel.d.ts
500
420
  interface BroadcastChannelTransportOptions {
501
421
  /**
@@ -626,9 +546,70 @@ declare class FileSystemStorageAdaptor implements StorageAdapter {
626
546
  private assetPath;
627
547
  }
628
548
  //#endregion
549
+ //#region src/transport/websocket.d.ts
550
+ interface WebSocketTransportOptions {
551
+ /**
552
+ * WebSocket endpoint provided to the loro-websocket client.
553
+ */
554
+ readonly url: string;
555
+ /**
556
+ * Metadata room identifier. Defaults to "repo:meta".
557
+ */
558
+ readonly metadataRoomId?: string;
559
+ /**
560
+ * Optional loro-websocket client configuration.
561
+ */
562
+ readonly client?: Omit<LoroWebsocketClientOptions, "url">;
563
+ /**
564
+ * Optional adaptor configuration for metadata joins.
565
+ */
566
+ readonly metadataAdaptorConfig?: LoroAdaptorConfig;
567
+ /**
568
+ * Static auth payload for metadata joins.
569
+ */
570
+ readonly metadataAuth?: Uint8Array | (() => Promise<Uint8Array>);
571
+ /**
572
+ * Factory that maps document ids to room identifiers. Defaults to the doc id.
573
+ */
574
+ readonly docRoomId?: (docId: string) => string;
575
+ /**
576
+ * Optional auth provider for document joins.
577
+ */
578
+ readonly docAuth?: (docId: string) => Promise<Uint8Array>;
579
+ }
580
+ /**
581
+ * loro-websocket backed {@link TransportAdapter} implementation for LoroRepo.
582
+ * It uses loro-protocol as the underlying protocol for the transport.
583
+ */
584
+ declare class WebSocketTransportAdapter implements TransportAdapter {
585
+ private readonly options;
586
+ private client?;
587
+ private metadataSession?;
588
+ private readonly docSessions;
589
+ constructor(options: WebSocketTransportOptions);
590
+ connect(_options?: {
591
+ timeout?: number;
592
+ }): Promise<void>;
593
+ close(): Promise<void>;
594
+ isConnected(): boolean;
595
+ syncMeta(flock: Flock, options?: {
596
+ timeout?: number;
597
+ }): Promise<TransportSyncResult>;
598
+ joinMetaRoom(flock: Flock, params?: TransportJoinParams): TransportSubscription;
599
+ syncDoc(docId: string, doc: LoroDoc, options?: {
600
+ timeout?: number;
601
+ }): Promise<TransportSyncResult>;
602
+ joinDocRoom(docId: string, doc: LoroDoc, params?: TransportJoinParams): TransportSubscription;
603
+ private ensureClient;
604
+ private ensureMetadataSession;
605
+ private teardownMetadataSession;
606
+ private ensureDocSession;
607
+ private leaveDocSession;
608
+ }
609
+ //#endregion
629
610
  //#region src/index.d.ts
630
611
  declare class LoroRepo<Meta extends JsonObject = JsonObject> {
631
- readonly options: LoroRepoOptions<Meta>;
612
+ readonly options: LoroRepoOptions;
632
613
  private _destroyed;
633
614
  private readonly transport?;
634
615
  private readonly storage?;
@@ -642,7 +623,7 @@ declare class LoroRepo<Meta extends JsonObject = JsonObject> {
642
623
  private readonly state;
643
624
  private readonly syncRunner;
644
625
  private constructor();
645
- static create<Meta extends JsonObject = JsonObject>(options: LoroRepoOptions<Meta>): Promise<LoroRepo<Meta>>;
626
+ static create<Meta extends JsonObject = JsonObject>(options: LoroRepoOptions): Promise<LoroRepo<Meta>>;
646
627
  /**
647
628
  * Load meta from storage.
648
629
  *
package/dist/index.d.ts CHANGED
@@ -1,11 +1,60 @@
1
1
  import { Flock } from "@loro-dev/flock";
2
- import { LoroAdaptor } from "loro-adaptors/loro";
3
- import { JoinError, JoinResponseOk, RoomId, UpdateError } from "loro-protocol";
4
- import { LoroWebsocketClientOptions } from "loro-websocket";
5
2
  import { Frontiers, LoroDoc } from "loro-crdt";
6
- import { FlockAdaptor, FlockAdaptorConfig } from "loro-adaptors/flock";
3
+ import { LoroAdaptorConfig } from "loro-adaptors/loro";
4
+ import { RoomId } from "loro-protocol";
5
+ import { LoroWebsocketClientOptions } from "loro-websocket";
7
6
 
8
7
  //#region src/types.d.ts
8
+ /**
9
+ * Construction options for creating a `LoroRepo` instance.
10
+ */
11
+ interface LoroRepoOptions {
12
+ /**
13
+ * Transport adapter responsible for fetching and pushing CRDT bundles.
14
+ * Omit when operating fully offline or within pure tests.
15
+ */
16
+ readonly transportAdapter?: TransportAdapter;
17
+ /**
18
+ * Storage adapter that hydrates snapshots and persists incremental updates.
19
+ */
20
+ readonly storageAdapter?: StorageAdapter;
21
+ /**
22
+ * Optional adapter that moves asset payloads while keeping metadata in sync.
23
+ */
24
+ readonly assetTransportAdapter?: AssetTransportAdapter;
25
+ /**
26
+ * Debounce duration in milliseconds before persisting document frontier metadata
27
+ * after local edits. Defaults to 1000 ms when omitted.
28
+ */
29
+ readonly docFrontierDebounceMs?: number;
30
+ }
31
+ /**
32
+ * Persists metadata, documents, and asset payloads on behalf of the repo.
33
+ */
34
+ interface StorageAdapter {
35
+ init?(): Promise<void>;
36
+ close?(): void;
37
+ /**
38
+ * Writes document snapshots, queued updates, assets, or meta bundles to durable storage.
39
+ */
40
+ save(payload: StorageSavePayload): Promise<void>;
41
+ /**
42
+ * Optionally deletes an asset payload during garbage collection.
43
+ */
44
+ deleteAsset?(assetId: AssetId): Promise<void>;
45
+ /**
46
+ * Loads a stored document by hydrating the persisted snapshot and replaying any queued updates.
47
+ */
48
+ loadDoc(docId: string): Promise<LoroDoc | undefined>;
49
+ /**
50
+ * Loads the repository-level metadata replica, if present.
51
+ */
52
+ loadMeta(): Promise<Flock | undefined>;
53
+ /**
54
+ * Loads a cached asset payload, if present.
55
+ */
56
+ loadAsset(assetId: AssetId): Promise<Uint8Array | undefined>;
57
+ }
9
58
  type GlobalBlob = typeof globalThis extends {
10
59
  Blob: infer B;
11
60
  } ? B : {
@@ -40,29 +89,6 @@ type JsonObject = {
40
89
  * Synchronisation lanes available to repo consumers.
41
90
  */
42
91
  type SyncScope = "meta" | "doc" | "full";
43
- /**
44
- * Construction options for creating a `LoroRepo` instance.
45
- */
46
- interface LoroRepoOptions<_Meta extends JsonObject = JsonObject> {
47
- /**
48
- * Transport adapter responsible for fetching and pushing CRDT bundles.
49
- * Omit when operating fully offline or within pure tests.
50
- */
51
- readonly transportAdapter?: TransportAdapter;
52
- /**
53
- * Storage adapter that hydrates snapshots and persists incremental updates.
54
- */
55
- readonly storageAdapter?: StorageAdapter;
56
- /**
57
- * Optional adapter that moves asset payloads while keeping metadata in sync.
58
- */
59
- readonly assetTransportAdapter?: AssetTransportAdapter;
60
- /**
61
- * Debounce duration in milliseconds before persisting document frontier metadata
62
- * after local edits. Defaults to 1000 ms when omitted.
63
- */
64
- readonly docFrontierDebounceMs?: number;
65
- }
66
92
  /**
67
93
  * Parameters accepted by `LoroRepo.sync`.
68
94
  */
@@ -148,45 +174,6 @@ interface TransportAdapter {
148
174
  * Subscribes to live document updates, returning a cleanup handle.
149
175
  */
150
176
  joinDocRoom(docId: string, loroDoc: LoroDoc, params?: TransportJoinParams): TransportSubscription;
151
- /**
152
- * Optional callback invoked upon successful join responses.
153
- */
154
- handleJoinResponse?(response: JoinResponseOk): void;
155
- /**
156
- * Optional callback surfaced when joining a room fails.
157
- */
158
- handleJoinError?(error: JoinError): void;
159
- /**
160
- * Optional callback for update-level failures (e.g., decoding errors).
161
- */
162
- handleUpdateError?(error: UpdateError): void;
163
- }
164
- /**
165
- * Persists metadata, documents, and asset payloads on behalf of the repo.
166
- */
167
- interface StorageAdapter {
168
- init?(): Promise<void>;
169
- close?(): void;
170
- /**
171
- * Writes document snapshots, queued updates, assets, or meta bundles to durable storage.
172
- */
173
- save(payload: StorageSavePayload): Promise<void>;
174
- /**
175
- * Optionally deletes an asset payload during garbage collection.
176
- */
177
- deleteAsset?(assetId: AssetId): Promise<void>;
178
- /**
179
- * Loads a stored document by hydrating the persisted snapshot and replaying any queued updates.
180
- */
181
- loadDoc(docId: string): Promise<LoroDoc | undefined>;
182
- /**
183
- * Loads the repository-level metadata replica, if present.
184
- */
185
- loadMeta(): Promise<Flock | undefined>;
186
- /**
187
- * Loads a cached asset payload, if present.
188
- */
189
- loadAsset(assetId: AssetId): Promise<Uint8Array | undefined>;
190
177
  }
191
178
  /**
192
179
  * Union describing the kinds of payloads persisted via the storage adapter.
@@ -429,74 +416,6 @@ interface RepoEventFilter<Meta extends JsonObject = JsonObject> {
429
416
  readonly by?: ReadonlyArray<RepoEventBy>;
430
417
  }
431
418
  //#endregion
432
- //#region src/loro-adaptor.d.ts
433
- type RepoFlockAdaptorConfig = FlockAdaptorConfig;
434
- //#endregion
435
- //#region src/transport/websocket.d.ts
436
- interface WebSocketTransportOptions {
437
- /**
438
- * WebSocket endpoint provided to the loro-websocket client.
439
- */
440
- readonly url: string;
441
- /**
442
- * Optional loro-websocket client configuration.
443
- */
444
- readonly client?: Omit<LoroWebsocketClientOptions, "url">;
445
- /**
446
- * Metadata room identifier. When omitted, metadata synchronisation is disabled.
447
- */
448
- readonly metadataRoomId?: string;
449
- /**
450
- * Overrides the CRDT type advertised for the metadata room (defaults to `%FLO`).
451
- * Only `%FLO` is supported.
452
- */
453
- readonly metadataCrdtType?: string;
454
- /**
455
- * Optional adaptor configuration for metadata joins.
456
- */
457
- readonly metadataAdaptorConfig?: RepoFlockAdaptorConfig;
458
- /**
459
- * Static auth payload for metadata joins.
460
- */
461
- readonly metadataAuth?: Uint8Array;
462
- /**
463
- * Factory that maps document ids to room identifiers. Defaults to the doc id.
464
- */
465
- readonly docRoomId?: (docId: string) => string;
466
- /**
467
- * Optional auth provider for document joins.
468
- */
469
- readonly docAuth?: (docId: string) => Uint8Array | undefined;
470
- }
471
- /**
472
- * loro-websocket backed {@link TransportAdapter} implementation for LoroRepo.
473
- */
474
- declare class WebSocketTransportAdapter implements TransportAdapter {
475
- private readonly options;
476
- private client?;
477
- private metadataSession?;
478
- private readonly docSessions;
479
- constructor(options: WebSocketTransportOptions);
480
- connect(_options?: {
481
- timeout?: number;
482
- }): Promise<void>;
483
- close(): Promise<void>;
484
- isConnected(): boolean;
485
- syncMeta(flock: Flock, options?: {
486
- timeout?: number;
487
- }): Promise<TransportSyncResult>;
488
- joinMetaRoom(flock: Flock, params?: TransportJoinParams): TransportSubscription;
489
- syncDoc(docId: string, doc: LoroDoc, options?: {
490
- timeout?: number;
491
- }): Promise<TransportSyncResult>;
492
- joinDocRoom(docId: string, doc: LoroDoc, params?: TransportJoinParams): TransportSubscription;
493
- private ensureClient;
494
- private ensureMetadataSession;
495
- private teardownMetadataSession;
496
- private ensureDocSession;
497
- private leaveDocSession;
498
- }
499
- //#endregion
500
419
  //#region src/transport/broadcast-channel.d.ts
501
420
  interface BroadcastChannelTransportOptions {
502
421
  /**
@@ -627,9 +546,70 @@ declare class FileSystemStorageAdaptor implements StorageAdapter {
627
546
  private assetPath;
628
547
  }
629
548
  //#endregion
549
+ //#region src/transport/websocket.d.ts
550
+ interface WebSocketTransportOptions {
551
+ /**
552
+ * WebSocket endpoint provided to the loro-websocket client.
553
+ */
554
+ readonly url: string;
555
+ /**
556
+ * Metadata room identifier. Defaults to "repo:meta".
557
+ */
558
+ readonly metadataRoomId?: string;
559
+ /**
560
+ * Optional loro-websocket client configuration.
561
+ */
562
+ readonly client?: Omit<LoroWebsocketClientOptions, "url">;
563
+ /**
564
+ * Optional adaptor configuration for metadata joins.
565
+ */
566
+ readonly metadataAdaptorConfig?: LoroAdaptorConfig;
567
+ /**
568
+ * Static auth payload for metadata joins.
569
+ */
570
+ readonly metadataAuth?: Uint8Array | (() => Promise<Uint8Array>);
571
+ /**
572
+ * Factory that maps document ids to room identifiers. Defaults to the doc id.
573
+ */
574
+ readonly docRoomId?: (docId: string) => string;
575
+ /**
576
+ * Optional auth provider for document joins.
577
+ */
578
+ readonly docAuth?: (docId: string) => Promise<Uint8Array>;
579
+ }
580
+ /**
581
+ * loro-websocket backed {@link TransportAdapter} implementation for LoroRepo.
582
+ * It uses loro-protocol as the underlying protocol for the transport.
583
+ */
584
+ declare class WebSocketTransportAdapter implements TransportAdapter {
585
+ private readonly options;
586
+ private client?;
587
+ private metadataSession?;
588
+ private readonly docSessions;
589
+ constructor(options: WebSocketTransportOptions);
590
+ connect(_options?: {
591
+ timeout?: number;
592
+ }): Promise<void>;
593
+ close(): Promise<void>;
594
+ isConnected(): boolean;
595
+ syncMeta(flock: Flock, options?: {
596
+ timeout?: number;
597
+ }): Promise<TransportSyncResult>;
598
+ joinMetaRoom(flock: Flock, params?: TransportJoinParams): TransportSubscription;
599
+ syncDoc(docId: string, doc: LoroDoc, options?: {
600
+ timeout?: number;
601
+ }): Promise<TransportSyncResult>;
602
+ joinDocRoom(docId: string, doc: LoroDoc, params?: TransportJoinParams): TransportSubscription;
603
+ private ensureClient;
604
+ private ensureMetadataSession;
605
+ private teardownMetadataSession;
606
+ private ensureDocSession;
607
+ private leaveDocSession;
608
+ }
609
+ //#endregion
630
610
  //#region src/index.d.ts
631
611
  declare class LoroRepo<Meta extends JsonObject = JsonObject> {
632
- readonly options: LoroRepoOptions<Meta>;
612
+ readonly options: LoroRepoOptions;
633
613
  private _destroyed;
634
614
  private readonly transport?;
635
615
  private readonly storage?;
@@ -643,7 +623,7 @@ declare class LoroRepo<Meta extends JsonObject = JsonObject> {
643
623
  private readonly state;
644
624
  private readonly syncRunner;
645
625
  private constructor();
646
- static create<Meta extends JsonObject = JsonObject>(options: LoroRepoOptions<Meta>): Promise<LoroRepo<Meta>>;
626
+ static create<Meta extends JsonObject = JsonObject>(options: LoroRepoOptions): Promise<LoroRepo<Meta>>;
647
627
  /**
648
628
  * Load meta from storage.
649
629
  *