table icon indicating copy to clipboard operation
table copied to clipboard

Property 'block' does not exist on type 'TableConstructor'

Open Munksgaard opened this issue 7 months ago • 3 comments

When compiling a project that uses @editor-js/table with typescript, I get the following error:

assets/node_modules/@editorjs/table/dist/plugin.d.ts:70:48 - error TS2339: Property 'block' does not exist on type 'TableConstructor'.

70     constructor({ data, config, api, readOnly, block }: TableConstructor);
                                                  ~~~~~


Found 1 error in assets/node_modules/@editorjs/table/dist/plugin.d.ts:70

Any idea how I can fix this?

Munksgaard avatar May 06 '25 10:05 Munksgaard

Take a look at this example: https://github.com/editor-js/image/blob/master/src/index.ts

neSpecc avatar May 06 '25 12:05 neSpecc

Take a look at this example: https://github.com/editor-js/image/blob/master/src/index.ts

Hi, I'm failing to see how this example answers the question

I am also getting this error and I installed the table package and following the documented implementation, so asking someone to look at an example of source code doesn't feel like an answer

ruancodeco avatar Jun 17 '25 07:06 ruancodeco

I ended up ignoring errors in TablePlugin like this:

      tools: {
        table: {
          // @ts-expect-error TablePlugin doesn't have proper types
          class: TablePlugin,
        },
      },

Munksgaard avatar Jun 17 '25 09:06 Munksgaard