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 {
NodeType,
} from 'prosemirror-model'
import { Plugin } from 'prosemirror-state'
import { InputRule } from 'prosemirror-inputrules'
import { ExtensionConfig } from './Extension'
import { Attribute, NodeViewRenderer, Overwrite } from './types'
import { Attributes, NodeViewRenderer, Overwrite } from './types'
import { Editor } from './Editor'
export interface NodeConfig<Options = any, Commands = {}> extends Overwrite<ExtensionConfig<Options, Commands>, {
@@ -94,9 +95,7 @@ export interface NodeConfig<Options = any, Commands = {}> extends Overwrite<Exte
this: {
options: Options,
},
) => {
[key: string]: Attribute
},
) => Attributes,
/**
* Commands
@@ -125,7 +124,7 @@ export interface NodeConfig<Options = any, Commands = {}> extends Overwrite<Exte
options: Options,
editor: Editor,
type: NodeType,
}) => any[],
}) => InputRule[],
/**
* Paste rules
@@ -134,7 +133,7 @@ export interface NodeConfig<Options = any, Commands = {}> extends Overwrite<Exte
options: Options,
editor: Editor,
type: NodeType,
}) => any[],
}) => Plugin[],
/**
* ProseMirror plugins