From b2e436f1631007583798e73a37b016b31376b2f0 Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 10 Jul 2023 21:25:18 +0800 Subject: [PATCH] fix type errors --- src/components/uiControls/bottom/index.ts | 4 ++-- src/components/uiControls/left/ColorSelect.ts | 2 +- src/components/uiControls/right/ClearButton.ts | 2 +- src/components/uiControls/top/SetSizeButton.ts | 1 - 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/components/uiControls/bottom/index.ts b/src/components/uiControls/bottom/index.ts index feef601..38971c5 100644 --- a/src/components/uiControls/bottom/index.ts +++ b/src/components/uiControls/bottom/index.ts @@ -1,4 +1,4 @@ -import { EditorState, UIComponent, EditorConfig } from "@/types"; +import { EditorState, UIComponent } from "@/types"; import elt from "@/utils/createElement"; import SaveButton from "./SaveButton"; @@ -6,7 +6,7 @@ class BottomControls implements UIComponent { public dom: HTMLElement; private controls: UIComponent[]; - constructor(state: EditorState, config: EditorConfig) { + constructor(state: EditorState) { this.controls = [new SaveButton(state)]; this.dom = elt( diff --git a/src/components/uiControls/left/ColorSelect.ts b/src/components/uiControls/left/ColorSelect.ts index 04e7c0f..ea9ee13 100644 --- a/src/components/uiControls/left/ColorSelect.ts +++ b/src/components/uiControls/left/ColorSelect.ts @@ -1,5 +1,5 @@ import elt from "@/utils/createElement"; -import { UIComponent, EditorState, EditorConfig, ActionObj } from "@/types"; +import { UIComponent, EditorState, EditorConfig } from "@/types"; class ColorSelect implements UIComponent { public input: HTMLInputElement; diff --git a/src/components/uiControls/right/ClearButton.ts b/src/components/uiControls/right/ClearButton.ts index 64a94d5..cb095c5 100644 --- a/src/components/uiControls/right/ClearButton.ts +++ b/src/components/uiControls/right/ClearButton.ts @@ -4,7 +4,7 @@ import elt from "@/utils/createElement"; class ClearButton implements UIComponent { public dom: HTMLButtonElement; - constructor(state: EditorState, { dispatch }: EditorConfig) { + constructor(_: EditorState, { dispatch }: EditorConfig) { this.dom = elt( "button", { diff --git a/src/components/uiControls/top/SetSizeButton.ts b/src/components/uiControls/top/SetSizeButton.ts index 7138056..7ba9b56 100644 --- a/src/components/uiControls/top/SetSizeButton.ts +++ b/src/components/uiControls/top/SetSizeButton.ts @@ -1,4 +1,3 @@ -import Picture from "@/models/picture"; import { ActionObj, EditorConfig, EditorState, UIComponent } from "@/types"; import elt from "@/utils/createElement";