diff --git a/noname/library/element/gameEvent.js b/noname/library/element/gameEvent.js index ee689d27e..eb99e42b2 100644 --- a/noname/library/element/gameEvent.js +++ b/noname/library/element/gameEvent.js @@ -6,7 +6,7 @@ import { ui } from "../../ui/index.js"; import { AsyncFunction } from "../../util/index.js"; export class GameEvent { - /** @type { this & import('./gameEventPromise.js').GameEventPromise } */ + /** @type { this & GameEventPromise } */ #promise; /** * @param {string | GameEvent} [name] @@ -55,7 +55,7 @@ export class GameEvent { **/ this.async = false; /** - * @type {null|(event: GameEvent)=>any} 这个异步事件对应Promise的resolve函数 + * @type {null|((event: GameEvent | PromiseLike)=>void)} 这个异步事件对应Promise的resolve函数 **/ this.resolve = null; if (trigger !== false && !game.online) this._triggered = 0; diff --git a/noname/library/element/gameEventPromise.js b/noname/library/element/gameEventPromise.js index 725c4afd6..d33cfaf5e 100644 --- a/noname/library/element/gameEventPromise.js +++ b/noname/library/element/gameEventPromise.js @@ -35,7 +35,7 @@ export class GameEventPromise extends Promise { } #event; /** - * @param { import('./gameEvent.js').GameEvent } arg + * @param { GameEvent } arg */ constructor(arg) { if (arg instanceof GameEventPromise) throw new Error("GameEventPromise cannot copy.");