From bdd16e396d1307382d33acad9231c2b256086d5a Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Tue, 13 Sep 2022 15:16:08 +0400 Subject: [PATCH] Update TS --- index.d.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/index.d.ts b/index.d.ts index 8d7f37c0c..cc98fe09c 100644 --- a/index.d.ts +++ b/index.d.ts @@ -798,7 +798,7 @@ declare namespace grapesjs { * @param components - HTML string or components model * @param opt - the options object to be used by the [setComponents]{@link em#setComponents} method */ - setComponents(components: object[] | any | string, opt: any): any; + setComponents(components: object[] | any | string, opt?: any): any; /** * Add components * @example @@ -817,7 +817,7 @@ declare namespace grapesjs { */ addComponents( components: object[] | any | string, - opts: { + opts?: { avoidUpdateStyle?: boolean; } ): Component[]; @@ -1630,6 +1630,10 @@ declare namespace grapesjs { * Custom behavior on click, eg. `(block, editor) => editor.getWrapper().append(block.get('content'))` */ onClick?: (...params: any[]) => any; + /** + * Block attributes + */ + attributes?: Record; } interface Block extends Backbone.Model { /**