Skip to content

Fix missing 'block' from TableConstructor type. - #191

Open
btrewern wants to merge 2 commits into
editor-js:masterfrom
btrewern:type-fix
Open

Fix missing 'block' from TableConstructor type.#191
btrewern wants to merge 2 commits into
editor-js:masterfrom
btrewern:type-fix

Conversation

@btrewern

@btrewern btrewern commented Jul 29, 2026

Copy link
Copy Markdown

The type definition for TableConstructor is missing the block property. This fixes that.

Closes #180

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the JSDoc-driven type definitions for the Editor.js Table tool constructor to include the missing block property, addressing the TypeScript compilation error reported in #180.

Changes:

  • Add a BlockAPI import typedef to reference Editor.js’s BlockAPI type from JSDoc.
  • Extend TableConstructor’s documented shape to include block.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/plugin.js
Comment on lines 26 to +31
* @typedef {object} TableConstructor
* @property {TableConfig} data — previously saved data
* @property {TableConfig} config - user config for Tool
* @property {object} api - Editor.js API
* @property {boolean} readOnly - read-only mode flag
* @property {BlockAPI} block - interact with current block
Comment thread src/plugin.js
Comment on lines +5 to +7
/**
* @typedef {import('@editorjs/editorjs').BlockAPI} BlockAPI
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants