chore(eslint): fixed eslint rules
This commit is contained in:
parent
2bf5e6e700
commit
830f251537
2 changed files with 13 additions and 13 deletions
|
|
@ -44,16 +44,16 @@ export const TicTacToeImpl: Omit<ITicTacToeDb, keyof Database> = {
|
|||
tictactoe.playerX = @id
|
||||
OR tictactoe.playerO = @id;
|
||||
`);
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
return q.all({ id }).map((s: any) => {
|
||||
const g: (TicTacToeGame & { nameX?: string, nameO?: string }) | undefined = TicTacToeGameFromRow(s);
|
||||
if (isNullish(g)) return undefined;
|
||||
g.nameX = s.nameX;
|
||||
g.nameO = s.nameO;
|
||||
if (isNullish(g.nameO) || isNullish(g.nameO)) return undefined;
|
||||
return g as TicTacToeGame & { nameX: string, nameO: string };
|
||||
}).filter(v => !isNullish(v));
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
return q.all({ id }).map((s: any) => {
|
||||
const g: (TicTacToeGame & { nameX?: string, nameO?: string }) | undefined = TicTacToeGameFromRow(s);
|
||||
if (isNullish(g)) return undefined;
|
||||
g.nameX = s.nameX;
|
||||
g.nameO = s.nameO;
|
||||
if (isNullish(g.nameO) || isNullish(g.nameO)) return undefined;
|
||||
return g as TicTacToeGame & { nameX: string, nameO: string };
|
||||
}).filter(v => !isNullish(v));
|
||||
},
|
||||
};
|
||||
|
||||
export type TTTGameId = UUID & { readonly __uuid: unique symbol };
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ const TTTHistoryResponse = {
|
|||
data: Type.Array(
|
||||
Type.Object({
|
||||
gameId: Type.String({ description: 'gameId' }),
|
||||
playerX: Type.Object({id: Type.String(), name: Type.String()}),
|
||||
playerO: Type.Object({id: Type.String(), name: Type.String()}),
|
||||
playerX: Type.Object({ id: Type.String(), name: Type.String() }),
|
||||
playerO: Type.Object({ id: Type.String(), name: Type.String() }),
|
||||
date: Type.String(),
|
||||
outcome: Type.Enum(['winX', 'winO', 'other']),
|
||||
}),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue