fix types
This commit is contained in:
@@ -113,6 +113,7 @@ export default class ExtensionManager {
|
||||
type: getSchemaTypeByName(extension.name, this.schema),
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
const renderer = extension.addNodeView?.bind(context)?.() as NodeViewRenderer
|
||||
|
||||
const nodeview = (
|
||||
|
||||
@@ -148,7 +148,11 @@ export interface NodeExtensionSpec<Options = {}, Commands = {}> extends Overwrit
|
||||
/**
|
||||
* Node View
|
||||
*/
|
||||
addNodeView?: (() => NodeViewRenderer) | null,
|
||||
addNodeView?: ((this: {
|
||||
options: Options,
|
||||
editor: Editor,
|
||||
type: NodeType,
|
||||
}) => NodeViewRenderer) | null,
|
||||
}> {}
|
||||
|
||||
export type NodeExtension = Required<Omit<NodeExtensionSpec, 'defaultOptions'> & {
|
||||
|
||||
Reference in New Issue
Block a user