Update README.md

This commit is contained in:
George 2019-10-19 22:43:55 +03:00 committed by GitHub
parent 7978257b06
commit 528ee75ebd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,20 +44,20 @@ const connection = new CollaborativeBackend(options)
### options: ### options:
``` ```
{ {
port: number port: number // posrt to start io connection
connectOpts?: SocketIO.ServerOptions connectOpts?: SocketIO.ServerOptions
defaultValue?: ValueJSON defaultValue?: ValueJSON // default value
saveTreshold?: number saveTreshold?: number // theshold of onDocumentSave callback execution
cursorAnnotationType?: string cursorAnnotationType?: string // type string for cursor annotations
onAuthRequest?: ( onAuthRequest?: ( // auth callback
query: Object, query: Object,
socket?: SocketIO.Socket socket?: SocketIO.Socket
) => Promise<boolean> | boolean ) => Promise<boolean> | boolean
onDocumentLoad?: ( onDocumentLoad?: ( // request slatejs document callback
pathname: string, pathname: string,
query?: Object query?: Object
) => ValueJSON | null | false | undefined ) => ValueJSON | null | false | undefined
onDocumentSave?: (pathname: string, json: ValueJSON) => Promise<void> | void onDocumentSave?: (pathname: string, json: ValueJSON) => Promise<void> | void // save document callback
} }
``` ```