mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 15:57:13 +00:00
Added typings for prosemirror-collab 0.18.0
This commit is contained in:
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// Type definitions for prosemirror-collab 0.18.0
|
||||
// Project: https://github.com/ProseMirror/prosemirror-collab
|
||||
// Definitions by: David Hahn <https://github.com/davidka>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import { Plugin } from 'prosemirror-state'
|
||||
import { EditorState } from 'prosemirror-state'
|
||||
import { Step } from 'prosemirror-transform'
|
||||
import { Transaction } from 'prosemirror-state'
|
||||
|
||||
declare module "prosemirror-collab" {
|
||||
export function collab(config?: { version?: number, clientID?: number }): Plugin
|
||||
export function receiveTransaction(state: EditorState, steps: Step[], clientIDs: number[]): Transaction
|
||||
export function sendableSteps(state: EditorState): { version: number, steps: Step[], clientID: number, origins: Transaction[] } | void
|
||||
export function getVersion(state: EditorState): number
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import * as collab from 'prosemirror-collab';
|
||||
import {EditorState} from 'prosemirror-state';
|
||||
|
||||
let state = new EditorState();
|
||||
let version = collab.getVersion(state);
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"prosemirror-collab-tests.ts"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user