fix: lint issues in api.ts

This commit is contained in:
JackUait 2025-11-07 04:13:26 +03:00
commit 5d25817e22

View file

@ -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;
};