mirror of
https://github.com/cudr/slate-collaborative.git
synced 2024-10-27 20:34:06 +00:00
20 lines
538 B
TypeScript
20 lines
538 B
TypeScript
import { ValueJSON } from 'slate'
|
|
import { Server } from 'http'
|
|
|
|
export interface ConnectionOptions {
|
|
entry: number | Server
|
|
connectOpts?: SocketIO.ServerOptions
|
|
defaultValue?: ValueJSON
|
|
saveTreshold?: number
|
|
cursorAnnotationType?: string
|
|
onAuthRequest?: (
|
|
query: Object,
|
|
socket?: SocketIO.Socket
|
|
) => Promise<boolean> | boolean
|
|
onDocumentLoad?: (
|
|
pathname: string,
|
|
query?: Object
|
|
) => ValueJSON | null | false | undefined
|
|
onDocumentSave?: (pathname: string, json: ValueJSON) => Promise<void> | void
|
|
}
|