From 0372f559bc7e1d02cdc2fe0b5dfd39a9ea45e960 Mon Sep 17 00:00:00 2001 From: Jamie Stivala Date: Sun, 25 Sep 2022 09:59:42 +0200 Subject: [PATCH] Typings: Added editor parameter to onStore (#4605) * Typings: Added editor parameter to onStore Added an optional parameter to onStore in the storage manager. This is in accordance with the common use case (https://grapesjs.com/docs/modules/Storage.html#common-use-cases) - HTML code with project data * Typings: OnStore editor non-optional * Propagated editor to onStore in Remote Storage --- index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.d.ts b/index.d.ts index f2fa4d225..6f72ba4b9 100644 --- a/index.d.ts +++ b/index.d.ts @@ -443,7 +443,7 @@ declare namespace grapesjs { type?: string; stepsBeforeSave?: number; recovery?: boolean | Function; - onStore?: (data: any) => any; + onStore?: (data: any, editor: Editor) => any; onLoad?: (data: any) => any; options?: { local?: LocalStorageConfig; @@ -464,7 +464,7 @@ declare namespace grapesjs { contentTypeJson?: boolean; credentials?: RequestCredentials; fetchOptions?: string | ((opts: object) => object); - onStore?: (data: any) => any; + onStore?: (data: any, editor: Editor) => any; onLoad?: (data: any) => any; }