Skip to content

Commit e308e7f

Browse files
committed
Rename connectFork to connect
1 parent b7a6072 commit e308e7f

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

javascript/src/api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ export interface IDocumentProvider extends IDisposable {
9696
fork(): Promise<string>;
9797

9898
/**
99-
* Connect the shared document to a forked room with forkId (disconnect from previous room).
99+
* Connect the shared document to a room with given ID (disconnect from previous room).
100100
*/
101-
connectFork(forkId: string): void;
101+
connect(roomId: string): void;
102102
}
103103

104104
/**

javascript/src/ydocument.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ import { JSONExt, JSONObject, JSONValue } from '@lumino/coreutils';
77
import { ISignal, Signal } from '@lumino/signaling';
88
import { Awareness } from 'y-protocols/awareness';
99
import * as Y from 'yjs';
10-
import type { DocumentChange, IDocumentProvider, ISharedDocument, StateChange } from './api';
10+
import type {
11+
DocumentChange,
12+
IDocumentProvider,
13+
ISharedDocument,
14+
StateChange
15+
} from './api.js';
1116

1217
/**
1318
* Generic shareable document.
@@ -18,7 +23,7 @@ export abstract class YDocument<T extends DocumentChange>
1823
constructor(options?: YDocument.IOptions) {
1924
this._ydoc = options?.ydoc ?? new Y.Doc();
2025
this.rootRoomId = options?.rootRoomId ?? '';
21-
this.currentRoomId = options?.currentRoomId ?? ''
26+
this.currentRoomId = options?.currentRoomId ?? '';
2227

2328
this._ystate = this._ydoc.getMap('state');
2429

0 commit comments

Comments
 (0)