Skip to content

Commit

Permalink
Add YDocument.providers attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart committed Feb 15, 2024
1 parent 803631d commit 13e98f1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions javascript/src/ydocument.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,22 @@
|----------------------------------------------------------------------------*/

import { JSONExt, JSONObject, JSONValue } from '@lumino/coreutils';
import { IDisposable } from '@lumino/disposable';
import { ISignal, Signal } from '@lumino/signaling';
import { Awareness } from 'y-protocols/awareness';
import * as Y from 'yjs';
import type { DocumentChange, ISharedDocument, StateChange } from './api.js';

/**
* An interface for a document provider.
*/
export interface IDocumentProvider extends IDisposable {
/**
* Returns a Promise that resolves when the document provider is ready.
*/
readonly ready: Promise<void>;
}

/**
* Generic shareable document.
*/
Expand Down Expand Up @@ -200,6 +211,7 @@ export abstract class YDocument<T extends DocumentChange>
private _awareness: Awareness;
private _isDisposed = false;
private _disposed = new Signal<this, void>(this);
providers: IDocumentProvider[] = [];
}

/**
Expand Down

0 comments on commit 13e98f1

Please sign in to comment.