refactoring

This commit is contained in:
Philipp Kühn
2020-11-16 21:54:40 +01:00
parent 13a314e123
commit d05c9fda3e
6 changed files with 28 additions and 29 deletions

View File

@@ -5,8 +5,9 @@ import {
MarkType,
} from 'prosemirror-model'
import { Plugin } from 'prosemirror-state'
import { InputRule } from 'prosemirror-inputrules'
import { ExtensionConfig } from './Extension'
import { Attribute, Overwrite } from './types'
import { Attributes, Overwrite } from './types'
import { Editor } from './Editor'
export interface MarkConfig<Options = any, Commands = {}> extends Overwrite<ExtensionConfig<Options, Commands>, {
@@ -59,9 +60,7 @@ export interface MarkConfig<Options = any, Commands = {}> extends Overwrite<Exte
this: {
options: Options,
},
) => {
[key: string]: Attribute
},
) => Attributes,
/**
* Commands
@@ -90,7 +89,7 @@ export interface MarkConfig<Options = any, Commands = {}> extends Overwrite<Exte
options: Options,
editor: Editor,
type: MarkType,
}) => any[],
}) => InputRule[],
/**
* Paste rules
@@ -99,7 +98,7 @@ export interface MarkConfig<Options = any, Commands = {}> extends Overwrite<Exte
options: Options,
editor: Editor,
type: MarkType,
}) => any[],
}) => Plugin[],
/**
* ProseMirror plugins