mirror of
https://github.com/codex-team/editor.js
synced 2026-03-18 08:29:52 +01:00
fix: lint issues in api.ts
This commit is contained in:
parent
4762b105c4
commit
5d25817e22
1 changed files with 10 additions and 4 deletions
|
|
@ -9,9 +9,10 @@ import type { BlockAPI as BlockAPIInterface } from '../../../types/api';
|
|||
* @class
|
||||
* @param {Block} block - Block to expose
|
||||
*/
|
||||
function BlockAPI(
|
||||
const BlockAPI = function BlockAPI(
|
||||
this: BlockAPIInterface,
|
||||
block: Block
|
||||
): void {
|
||||
): BlockAPIInterface {
|
||||
const blockAPI: BlockAPIInterface = {
|
||||
/**
|
||||
* Block id
|
||||
|
|
@ -139,6 +140,11 @@ function BlockAPI(
|
|||
};
|
||||
|
||||
Object.setPrototypeOf(this, blockAPI);
|
||||
}
|
||||
|
||||
export default BlockAPI;
|
||||
return this;
|
||||
};
|
||||
|
||||
// Export BlockAPI with proper constructor type
|
||||
export default BlockAPI as unknown as {
|
||||
new (block: Block): BlockAPIInterface;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue