update: update event type
This commit is contained in:
parent
3cbadcf72a
commit
1a60591811
|
@ -262,7 +262,7 @@ class Engine implements EngineInterface {
|
|||
this.change.range.blur();
|
||||
}
|
||||
|
||||
on<F extends EventListener = EventListener>(
|
||||
on<R = any, F extends EventListener = EventListener<R>>(
|
||||
eventType: string,
|
||||
listener: F,
|
||||
rewrite?: boolean,
|
||||
|
|
|
@ -438,7 +438,7 @@ class NodeEntry implements NodeInterface {
|
|||
* @param {Function} listener 事件函数
|
||||
* @return 返回当前实例
|
||||
*/
|
||||
on<F extends EventListener = EventListener>(
|
||||
on<R = any, F extends EventListener = EventListener<R>>(
|
||||
eventType: string,
|
||||
listener: F,
|
||||
): NodeInterface {
|
||||
|
|
|
@ -12,7 +12,7 @@ class Event implements EventInterface {
|
|||
* @param {Function} listener 事件处理方法
|
||||
* @param {boolean} rewrite 是否重写事件
|
||||
*/
|
||||
on<F extends EventListener = EventListener>(
|
||||
on<R = any, F extends EventListener = EventListener<R>>(
|
||||
eventType: string,
|
||||
listener: F,
|
||||
rewrite?: boolean,
|
||||
|
|
|
@ -143,7 +143,7 @@ export interface EditorInterface {
|
|||
* @param listener 事件回调
|
||||
* @param rewrite 是否重写
|
||||
*/
|
||||
on<F extends EventListener = EventListener>(
|
||||
on<R = any, F extends EventListener = EventListener<R>>(
|
||||
eventType: string,
|
||||
listener: F,
|
||||
rewrite?: boolean,
|
||||
|
@ -601,7 +601,7 @@ export interface EngineInterface extends EditorInterface {
|
|||
* @param listener 事件回调
|
||||
* @param rewrite 是否重写
|
||||
*/
|
||||
on<F extends EventListener = EventListener>(
|
||||
on<R = any, F extends EventListener = EventListener<R>>(
|
||||
eventType: string,
|
||||
listener: F,
|
||||
rewrite?: boolean,
|
||||
|
|
|
@ -21,7 +21,7 @@ export interface EventInterface {
|
|||
* @param listener 事件处理方法
|
||||
* @param rewrite 是否重写事件
|
||||
*/
|
||||
on<F extends EventListener = EventListener>(
|
||||
on<R = any, F extends EventListener = EventListener<R>>(
|
||||
eventType: string,
|
||||
listener: F,
|
||||
rewrite?: boolean,
|
||||
|
@ -278,7 +278,7 @@ export interface NodeInterface {
|
|||
* @param {Function} listener 事件函数
|
||||
* @return {NodeInterface} 返回当前实例
|
||||
*/
|
||||
on<F extends EventListener = EventListener>(
|
||||
on<R = any, F extends EventListener = EventListener<R>>(
|
||||
eventType: string,
|
||||
listener: F,
|
||||
): NodeInterface;
|
||||
|
|
|
@ -131,7 +131,7 @@ class View implements ViewInterface {
|
|||
return this.#_scrollNode;
|
||||
}
|
||||
|
||||
on<F extends EventListener = EventListener>(
|
||||
on<R = any, F extends EventListener = EventListener<R>>(
|
||||
eventType: string,
|
||||
listener: F,
|
||||
rewrite?: boolean,
|
||||
|
|
Loading…
Reference in New Issue