update: update event type

This commit is contained in:
yanmao 2021-12-29 02:18:44 +08:00
parent 3cbadcf72a
commit 1a60591811
6 changed files with 8 additions and 8 deletions

View File

@ -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,

View File

@ -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 {

View File

@ -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,

View File

@ -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,

View File

@ -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;

View File

@ -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,