From e45e915cbf78f0da520dcab66a917d55f7463ae5 Mon Sep 17 00:00:00 2001 From: dependentmadani Date: Sat, 3 Aug 2024 19:53:59 +0100 Subject: [PATCH] refactor: remove some unecessary generics from isPromise --- package.json | 2 +- src/index.ts | 2 +- src/utils/isPromise.ts | 4 +--- yarn.lock | 8 ++++---- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 7b27d495..7120556e 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,6 @@ "vite-plugin-dts": "^3.9.1" }, "dependencies": { - "@codexteam/icons": "^0.3.0" + "@codexteam/icons": "^0.3.2" } } diff --git a/src/index.ts b/src/index.ts index 018ce450..3e93f82c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -30,7 +30,7 @@ */ import type { TunesMenuConfig } from '@editorjs/editorjs/types/tools'; -import type { API, ToolboxConfig, PasteConfig, BlockToolConstructorOptions, BlockTool, BlockAPI, PasteEvent, PatternPasteEventDetail, FilePasteEventDetail } from '@editorjs/editorjs'; +import type { API, ToolboxConfig, PasteConfig, BlockToolConstructorOptions, BlockAPI, PasteEvent, PatternPasteEventDetail, FilePasteEventDetail, BlockTool } from '@editorjs/editorjs'; import './index.css'; import Ui from './ui'; diff --git a/src/utils/isPromise.ts b/src/utils/isPromise.ts index bb693416..5eb679d1 100644 --- a/src/utils/isPromise.ts +++ b/src/utils/isPromise.ts @@ -1,10 +1,8 @@ -import type { UploadResponseFormat } from '../types/types'; - /** * Check if passed object is a Promise * @param object - object to check * @returns */ -export default function isPromise(object: Promise>): object is Promise> { +export default function isPromise(object: Promise<{}>): object is Promise<{}> { return object !== undefined && typeof object.then === 'function'; } diff --git a/yarn.lock b/yarn.lock index b1b136d1..2a3bf174 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,10 +12,10 @@ resolved "https://registry.yarnpkg.com/@codexteam/ajax/-/ajax-4.2.0.tgz#f89faecbaf8cd496bfd77ef20a7fe99ee20ca9a3" integrity sha512-54r/HZirqBPEV8rM9gZh570RCwG6M/iDAXT9Q9eGuMo9KZU49tw1dEDHjYsResGckfCsaymDqg4GnhfrBtX9JQ== -"@codexteam/icons@^0.3.0": - version "0.3.0" - resolved "https://registry.yarnpkg.com/@codexteam/icons/-/icons-0.3.0.tgz#62380b4053d487a257de443864b5c72dafab95e6" - integrity sha512-fJE9dfFdgq8xU+sbsxjH0Kt8Yeatw9xHBJWb77DhRkEXz3OCoIS6hrRC1ewHEryxzIjxD8IyQrRq2f+Gz3BcmA== +"@codexteam/icons@^0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@codexteam/icons/-/icons-0.3.2.tgz#b7aed0ba7b344e07953101f5476cded570d4f150" + integrity sha512-P1ep2fHoy0tv4wx85eic+uee5plDnZQ1Qa6gDfv7eHPkCXorMtVqJhzMb75o1izogh6G7380PqmFDXV3bW3Pig== "@editorjs/editorjs@2.30.0-rc.12": version "2.30.0-rc.12"