From db66c7e8ddb6c6969f4f9d786bd7981514e01f2d Mon Sep 17 00:00:00 2001 From: Kenny Huynh Date: Mon, 10 May 2021 01:11:04 -0700 Subject: [PATCH] fix: type for CmsEventListener handler property (#5353) --- packages/netlify-cms-core/index.d.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/netlify-cms-core/index.d.ts b/packages/netlify-cms-core/index.d.ts index f88e61ea..356755f2 100644 --- a/packages/netlify-cms-core/index.d.ts +++ b/packages/netlify-cms-core/index.d.ts @@ -482,7 +482,13 @@ declare module 'netlify-cms-core' { export interface CmsEventListener { name: 'prePublish' | 'postPublish' | 'preUnpublish' | 'postUnpublish' | 'preSave' | 'postSave'; - handler: { entry: Map; author: { login: string; name: string } }; + handler: ({ + entry, + author, + }: { + entry: Map; + author: { login: string; name: string }; + }) => any; } export type CmsEventListenerOptions = any; // TODO: type properly