In type ToolConstructable a circular dependency
There was a problem while developing plugin on the typescript. In type ToolConstructable a circular dependency occurs and it is impossible to write a suitable constructor.
type ToolConstructable = BaseToolConstructable | BlockToolConstructable | InlineToolConstructable;
interface BaseToolConstructable {
new (config: {api: API, config?: ToolSettings}): BaseTool;
}
interface BlockToolConstructable extends BaseToolConstructable{
new (config: {api: API, config: ToolConfig, data: BlockToolData}): BlockTool;
}
InlineToolConstructable extends BaseToolConstructable {}
It seems that the BlockToolConstructable does not override the constructor that inherited. To avoid circular dependency, I had to redefine types as follows (not inherited from BaseToolConstructable):
type ToolConstructable = BaseToolConstructable | BlockToolConstructable;
interface BaseToolConstructable {...}
interface BlockToolConstructable {...}
Hi @stasyuk93
Thank you, we will include a fix to the next release
@gohabereg Hello! when the next release will be? :) The problem still exists
I can just recommend you to remove method "new" from BaseToolConstructable
Did this get resolved?