update: trigger type

This commit is contained in:
yanmao 2021-12-29 01:31:04 +08:00
parent 95c062ac3b
commit 39888efa15
3 changed files with 4 additions and 4 deletions

View File

@ -344,7 +344,7 @@ export interface EditorInterface {
* @param eventType
* @param args
*/
trigger(eventType: string, ...args: any): any;
trigger<R = any>(eventType: string, ...args: any): R;
/**
* ctrl+a键按下false
* @param eventType
@ -946,7 +946,7 @@ export interface EngineInterface extends EditorInterface {
* @param eventType
* @param args
*/
trigger(eventType: string, ...args: any): any;
trigger<R = any>(eventType: string, ...args: any): R;
/**
* ctrl+a键按下false
* @param eventType

View File

@ -33,7 +33,7 @@ export interface EventInterface {
* @param eventType
* @param args
*/
trigger(eventType: string, ...args: any): any;
trigger<T = any>(eventType: string, ...args: any): T;
}
export type Selector =
| string

View File

@ -18,7 +18,7 @@ export interface ViewInterface extends EditorInterface {
* @param eventType
* @param args
*/
trigger(eventType: string, ...args: any): any;
trigger<R = any>(eventType: string, ...args: any): R;
/**
* render事件
* @param eventType render