From d6d8d48feffa0d2f6cd0847b08e0617fad429e51 Mon Sep 17 00:00:00 2001 From: Kira Date: Mon, 26 Oct 2020 14:47:34 +0800 Subject: [PATCH 1/3] =?UTF-8?q?refactor:=20=E6=94=B9=E4=B8=8B=E6=8F=8F?= =?UTF-8?q?=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/core/plugin.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/typescript/core/plugin.ts b/typescript/core/plugin.ts index cbd1da1d9..53cca49a7 100644 --- a/typescript/core/plugin.ts +++ b/typescript/core/plugin.ts @@ -1,13 +1,13 @@ -import {_Widget} from "./widget"; +import { _Widget } from "./widget"; -type configWidgetFn = (options: object) => object -type configObjectFn = (widget: _Widget) => void +type configWidgetFn = (type: string, options: object) => object +type configObjectFn = (type: string, widget: _Widget) => void -export type _config = (widgetFunction: configWidgetFn | configWidgetFn[], objectFunction: configObjectFn | configObjectFn[]) => void +export type _config = (widgetFunction: configWidgetFn | configWidgetFn[], objectFunction: configObjectFn | configObjectFn[]) => void -export type _configWidget = (shorcut: string, widgetFunction: configWidgetFn) => void +export type _configWidget = (shortcut: string, widgetFunction: configWidgetFn) => void -export type _registerObject = (shorcut: string, objectFunction: configObjectFn) => void +export type _registerObject = (shortcut: string, objectFunction: configObjectFn) => void export type _Plugin = { config: _config; From 9c93c388be03739fe9dfd07652565519eeb50278 Mon Sep 17 00:00:00 2001 From: Kira Date: Mon, 26 Oct 2020 14:50:09 +0800 Subject: [PATCH 2/3] =?UTF-8?q?refactor:=20=E6=94=B9=E4=B8=8B=E6=8F=8F?= =?UTF-8?q?=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/core/base.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript/core/base.ts b/typescript/core/base.ts index 40a216d76..e8793810c 100644 --- a/typescript/core/base.ts +++ b/typescript/core/base.ts @@ -263,7 +263,7 @@ export interface _base { isDeepMatch: (object: any, attrs: any) => boolean; - contains: (obj: any[], target: any, fromIndex?: number) => number; + contains: (obj: any[], target: any, fromIndex?: number) => boolean; deepContains: (obj: any[], copy: any) => number; From 9cd399a67f181338b36e3d59d58444344fbb4f60 Mon Sep 17 00:00:00 2001 From: Kira Date: Mon, 26 Oct 2020 15:04:47 +0800 Subject: [PATCH 3/3] =?UTF-8?q?refactor:=20=E6=94=B9=E4=B8=8B=E6=8F=8F?= =?UTF-8?q?=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/core/plugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript/core/plugin.ts b/typescript/core/plugin.ts index 53cca49a7..83c1176fb 100644 --- a/typescript/core/plugin.ts +++ b/typescript/core/plugin.ts @@ -1,6 +1,6 @@ import { _Widget } from "./widget"; -type configWidgetFn = (type: string, options: object) => object +type configWidgetFn = (type: string, options: Obj) => void type configObjectFn = (type: string, widget: _Widget) => void export type _config = (widgetFunction: configWidgetFn | configWidgetFn[], objectFunction: configObjectFn | configObjectFn[]) => void