editor.js icon indicating copy to clipboard operation
editor.js copied to clipboard

Why can't import BlockAddedMutationType

Open tcper opened this issue 2 years ago • 0 comments

When you use import EditorJS, {BlockAddedMutationType} from '@editorjs/editorjs';

You will get this error: SyntaxError: The requested module '/node_modules/.vite/deps/@editorjs_editorjs.js?v=03c9909b' does not provide an export named 'BlockAddedMutationType' (at Editor.vue:7:1)

But in VSCode, ctrl+click could jump to export file, and shows BlockAddedMutationType exported And after tries, I found this works: import EditorJS, {type OutputData} from '@editorjs/editorjs';

So, what magic behind this ? editorjs hope we use it or otherwise?

tcper avatar Jan 11 '24 03:01 tcper