From 7bb3050641ae4c6dea4c99214c9d51d2836c7ea0 Mon Sep 17 00:00:00 2001 From: Matthias Kunnen Date: Mon, 27 Feb 2023 10:36:23 +0100 Subject: [PATCH] uppy/image-editor: Fix TypeScript error in image-editor types (#4334) Fix TypeScript error in image-editor types Caused by TypeScript >= 4.8. --- packages/@uppy/image-editor/types/index.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/@uppy/image-editor/types/index.d.ts b/packages/@uppy/image-editor/types/index.d.ts index c8eace6bd0..e8b805f3f7 100644 --- a/packages/@uppy/image-editor/types/index.d.ts +++ b/packages/@uppy/image-editor/types/index.d.ts @@ -1,4 +1,4 @@ -import type { PluginOptions, UIPlugin, PluginTarget, UppyFile } from '@uppy/core' +import type { PluginOptions, UIPlugin, PluginTarget, UppyFile, IndexedObject } from '@uppy/core' import type Cropper from 'cropperjs' import ImageEditorLocale from './generatedLocale' @@ -32,12 +32,12 @@ export default ImageEditor // Events -export type FileEditorStartCallback = (file: UppyFile) => void; -export type FileEditorCompleteCallback = (updatedFile: UppyFile) => void; -export type FileEditorCancelCallback = (file: UppyFile) => void; +export type FileEditorStartCallback> = (file: UppyFile) => void; +export type FileEditorCompleteCallback> = (updatedFile: UppyFile) => void; +export type FileEditorCancelCallback> = (file: UppyFile) => void; declare module '@uppy/core' { - export interface UppyEventMap { + export interface UppyEventMap> { 'file-editor:start' : FileEditorStartCallback 'file-editor:complete': FileEditorCompleteCallback 'file-editor:cancel': FileEditorCancelCallback