From 4ddba9208d20fc05a1ab604208d527f649c82455 Mon Sep 17 00:00:00 2001 From: Tomoyuki Hata Date: Thu, 18 Feb 2021 22:25:12 +0900 Subject: [PATCH] chore(types): a generic type for tool config added (#1517) * Add a generic type to ToolSettings * Update tool-settings.d.ts Co-authored-by: Peter Savchenko --- docs/CHANGELOG.md | 1 + types/tools/tool-settings.d.ts | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 65de59af..5ca27448 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -2,6 +2,7 @@ ### 2.19.2 +- `Improvements` - A generic type for Tool config added [#1516](https://github.com/codex-team/editor.js/issues/1516) - `Improvements` - Remove unused `force` option in `Caret.navigateNext()` and `Caret.navigatePrevious()` [#857](https://github.com/codex-team/editor.js/issues/857#issuecomment-770363438). - `Improvements` - Remove bundles from the repo [#1541](https://github.com/codex-team/editor.js/pull/1541). - `Fix` - Fix BlockManager.setCurrentBlockByChildNode() with multiple Editor.js instances [#1503](https://github.com/codex-team/editor.js/issues/1503). diff --git a/types/tools/tool-settings.d.ts b/types/tools/tool-settings.d.ts index 9058df0d..53b8f8c1 100644 --- a/types/tools/tool-settings.d.ts +++ b/types/tools/tool-settings.d.ts @@ -18,8 +18,10 @@ export interface ToolboxConfig { /** * Object passed to the Tool's constructor by {@link EditorConfig#tools} + * + * @template Config - the structure describing a config object supported by the tool */ -export interface ToolSettings { +export interface ToolSettings { /** * Tool's class @@ -29,7 +31,7 @@ export interface ToolSettings { /** * User configuration object that will be passed to the Tool's constructor */ - config?: ToolConfig; + config?: ToolConfig; /** * Is need to show Inline Toolbar.