refactoring
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user