Skip to content

Commit f053285

Browse files
committed
Rename connectFork to connect
1 parent ef97680 commit f053285

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

javascript/src/api.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ export interface IDocumentProvider extends IDisposable {
9595
fork(): Promise<string>;
9696

9797
/**
98-
* Connect the shared document to a forked room with forkId (disconnect from previous room).
98+
* Connect the shared document to a room with given ID (disconnect from previous room).
9999
*/
100-
connectFork(forkId: string): void;
100+
connect(roomId: string): void;
101101
}
102102

103103
/**

javascript/src/ydocument.ts

+7-2
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)