补全typings
This commit is contained in:
parent
d984641e22
commit
d09b270b7f
|
@ -39,7 +39,7 @@ export class GameEvent {
|
|||
**/
|
||||
resolve: null | ((event: GameEvent | PromiseLike<GameEvent>) => void);
|
||||
/**
|
||||
* @type {null|((value: any) => void)} 另一种结束event.content的resolve形式
|
||||
* @type {null|((value?: any) => void)} 另一种结束event.content的resolve形式
|
||||
**/
|
||||
resolveContent: null | ((value?: any) => void);
|
||||
_triggered: number;
|
||||
|
@ -160,6 +160,10 @@ export class GameEvent {
|
|||
* @type { Function | undefined }
|
||||
*/
|
||||
ai: Function | undefined;
|
||||
/**
|
||||
* @type { string }
|
||||
*/
|
||||
triggername: string;
|
||||
/**
|
||||
* @param {keyof this} key
|
||||
* @param {number} [value]
|
||||
|
|
2
node_modules/@types/noname-typings/nonameModules/noname/library/element/player.d.ts
generated
vendored
2
node_modules/@types/noname-typings/nonameModules/noname/library/element/player.d.ts
generated
vendored
|
@ -826,7 +826,7 @@ export class Player extends HTMLDivElement {
|
|||
* @returns { Card[] }
|
||||
*/
|
||||
getCards(arg1?: string, arg2?: string | Record<string, any> | ((card: Card) => boolean)): Card[];
|
||||
iterableGetDiscardableCards(player: any, arg1: any, arg2: any): Generator<any, void, unknown>;
|
||||
iterableGetDiscardableCards(player: Player, arg1?: string, arg2?: string): Generator<Card, void, unknown>;
|
||||
getDiscardableCards(player: any, arg1: any, arg2: any): any[];
|
||||
/**
|
||||
* @param {Parameters<lib['filter']['canBeGained']>[1]} player
|
||||
|
|
|
@ -192,6 +192,10 @@ export class GameEvent {
|
|||
* @type { Function | undefined }
|
||||
*/
|
||||
ai;
|
||||
/**
|
||||
* @type { string }
|
||||
*/
|
||||
triggername;
|
||||
/**
|
||||
* @param {keyof this} key
|
||||
* @param {number} [value]
|
||||
|
|
|
@ -3646,6 +3646,12 @@ export class Player extends HTMLDivElement {
|
|||
getCards(arg1, arg2) {
|
||||
return Array.from(this.iterableGetCards(arg1, arg2));
|
||||
}
|
||||
/**
|
||||
* @param { Player } player
|
||||
* @param { string } [arg1]
|
||||
* @param { string } [arg2]
|
||||
* @returns { Generator<Card, void, unknown> }
|
||||
*/
|
||||
*iterableGetDiscardableCards(player, arg1, arg2) {
|
||||
for (let card of this.iterableGetCards(arg1, arg2)) {
|
||||
if (lib.filter.canBeDiscarded(card, player, this)) {
|
||||
|
|
Loading…
Reference in New Issue