fix: type for CmsEventListener handler property (#5353)

This commit is contained in:
Kenny Huynh 2021-05-10 01:11:04 -07:00 committed by GitHub
parent 00655964bf
commit db66c7e8dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -482,7 +482,13 @@ declare module 'netlify-cms-core' {
export interface CmsEventListener {
name: 'prePublish' | 'postPublish' | 'preUnpublish' | 'postUnpublish' | 'preSave' | 'postSave';
handler: { entry: Map<string, any>; author: { login: string; name: string } };
handler: ({
entry,
author,
}: {
entry: Map<string, any>;
author: { login: string; name: string };
}) => any;
}
export type CmsEventListenerOptions = any; // TODO: type properly