fix some react ts issues

This commit is contained in:
Philipp Kühn
2021-04-07 14:29:51 +02:00
parent a06a8f0fa2
commit 2718ccff6f
4 changed files with 15 additions and 11 deletions

View File

@@ -100,10 +100,7 @@ export class PureEditorContent extends React.Component<EditorContentProps, Edito
return ( return (
<> <>
<div ref={this.editorContentRef} /> <div ref={this.editorContentRef} />
{
// @ts-ignore
<Portals renderers={this.state.renderers} /> <Portals renderers={this.state.renderers} />
}
</> </>
) )
} }

View File

@@ -36,7 +36,6 @@ class ReactNodeView extends NodeView<React.FunctionComponent, Editor> {
return string.charAt(0).toUpperCase() + string.substring(1) return string.charAt(0).toUpperCase() + string.substring(1)
} }
// @ts-ignore
this.component.displayName = capitalizeFirstChar(this.extension.config.name) this.component.displayName = capitalizeFirstChar(this.extension.config.name)
} }
@@ -55,12 +54,8 @@ class ReactNodeView extends NodeView<React.FunctionComponent, Editor> {
}, []) }, [])
return ( return (
// @ts-ignore
<ReactNodeViewContext.Provider value={{ onDragStart, isEditable }}> <ReactNodeViewContext.Provider value={{ onDragStart, isEditable }}>
{
// @ts-ignore
<Component {...componentProps} /> <Component {...componentProps} />
}
</ReactNodeViewContext.Provider> </ReactNodeViewContext.Provider>
) )
} }

View File

@@ -0,0 +1,11 @@
{
"extends": "../../tsconfig",
"compilerOptions": {
"jsx": "react",
},
"exclude": [
"**/node_modules",
"**/dist",
"../vue-3",
]
}

View File

@@ -33,6 +33,7 @@
], ],
"exclude": [ "exclude": [
"**/node_modules", "**/node_modules",
"**/dist" "**/dist",
"**/vue-3"
] ]
} }