移除一些编译时的错误

This commit is contained in:
zhl 2020-12-08 16:40:20 +08:00
parent 3de7c13212
commit 1a735bca6d
4 changed files with 4 additions and 4 deletions

2
src/global.d.ts vendored
View File

@ -169,7 +169,7 @@ declare module "colyseus" {
* @param source 0: 正常抽卡, 1: 技能 * @param source 0: 正常抽卡, 1: 技能
* @param fromplayer * @param fromplayer
*/ */
addCard(dstplayer: string, count: number, max_count: number, source: number = 0, fromplayer?: string): boolean; addCard(dstplayer: string, count: number, max_count: number, source?: number, fromplayer?: string): boolean;
/** /**
* *

View File

@ -13,7 +13,7 @@ import {GameEnv} from "../../cfg/GameEnv";
*/ */
export class NextTurnCommand extends Command<CardGameState, {}> { export class NextTurnCommand extends Command<CardGameState, {}> {
async execute() { async execute(){
this.state.gameState = GameStateConst.STATE_BEGIN_DRAW; this.state.gameState = GameStateConst.STATE_BEGIN_DRAW;
const sessionIds = [...this.state.players.keys()]; const sessionIds = [...this.state.players.keys()];
if (!this.state.currentTurn) { if (!this.state.currentTurn) {

View File

@ -91,7 +91,7 @@ const comparePlayer = function (room: Room, p0: Player, p1: Player): CompareResu
} }
export class PartResultCommand extends Command<CardGameState, {}> { export class PartResultCommand extends Command<CardGameState, {}> {
execute() { execute() : Array<Command> | void {
this.state.gameState = GameStateConst.STATE_ROUND_RESULT; this.state.gameState = GameStateConst.STATE_ROUND_RESULT;
const time = singleton(GameEnv).resultShowTime || 1; const time = singleton(GameEnv).resultShowTime || 1;

View File

@ -11,7 +11,7 @@ import {GameResultCommand} from "./GameResultCommand";
*/ */
export class TurnEndCommand extends Command<CardGameState, {}> { export class TurnEndCommand extends Command<CardGameState, {}> {
execute() { execute() : Array<Command> | void{
// @ts-ignore // @ts-ignore
const sessionIds = [...this.state.players.keys()]; const sessionIds = [...this.state.players.keys()];
if (this.state.currentTurn) { if (this.state.currentTurn) {