Open radio-miskovice opened 1 year ago
Does it help if you update svelte to 3.57.0?
Unfortunately it doesn't.
export const createEditorView = (element: HTMLElement, nodeViews: Record<string, NodeViewConstructor>, plugins: Plugin[]) => {
...
It seems that nodeViews
' type should be different, but so far I have little idea 1. what exactly should be the change, 2. if there are any potential adverse effects of such a change.
Can you provide a stackblitz or codesandbox link? I still cannot reproduce.
I will check what is definition of ComponentConstructorOptions. If it is based on Record<> then it could be some option in typescript config. Stackblitz or Codesandbox later.
Have you managed to solve it? @radio-miskovice
When using the code in
examples/svelte
I get error in this code (Editor.svelte, lines 32, 27, etc.):The error reads:
Type 'typeof Paragraph_SvelteComponent' is not assignable to type 'SvelteNodeViewComponent'. Types of parameters 'options' and 'options' are incompatible. Type 'ComponentConstructorOptions' is not assignable to type 'ComponentConstructorOptions<Record<string, never>>'.
Type 'EmptyProps' is not assignable to type 'Record<string, never>'.
Index signature for type 'string' is missing in type 'EmptyProps'.ts(2322)
Not sure how exactly approach a fix... My guess is that changing type in the adapter code should suffice, but did not have the courage to look inside, yet.
"@sveltejs/kit": "^1.5.0", "@sveltejs/adapter-auto": "^2.0.0", "svelte": "^3.54.0", "svelte-check": "^3.0.1", "@prosemirror-adapter/svelte": "^0.2.4",