From 7fe19d1737375be21dbcbc0b4bd086198eda1287 Mon Sep 17 00:00:00 2001 From: apetitco Date: Sat, 20 Dec 2025 00:53:04 +0100 Subject: [PATCH] (misc): reindented file with tabs --- src/@shared/src/database/mixin/tictactoe.ts | 49 ++++++++++----------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/src/@shared/src/database/mixin/tictactoe.ts b/src/@shared/src/database/mixin/tictactoe.ts index 5fb7c5c..8d83e0b 100644 --- a/src/@shared/src/database/mixin/tictactoe.ts +++ b/src/@shared/src/database/mixin/tictactoe.ts @@ -1,31 +1,30 @@ -import { isNullish } from '@shared/utils'; import type { Database } from './_base'; -import { UserId } from './user'; +// import { UserId } from './user'; // describe every function in the object export interface ITicTacToeDb extends Database { - normalFunction(id: TemplateId): TemplateData | undefined, - asyncFunction(id: TemplateId): Promise, + normalFunction(id: TemplateId): TemplateData | undefined, + asyncFunction(id: TemplateId): Promise, }; export const TicTacToeImpl: Omit = { - /** - * @brief Write the outcome of the specified game to the database. - * - * @param gameId The game we want to write the outcome of. - * - */ - setGameOutcome(this: ITicTacToeDb, id: GameId): void { - // Find a way to retrieve the outcome of the game. - this.prepare('INSERT INTO tictactoe (game, outcome) VALUES (@id, "draw" /* replace w/ game outcome */)').run({ id }); - }, - /** - * whole function description - * - * @param id the argument description - * - * @returns what does the function return ? - */ + /** + * @brief Write the outcome of the specified game to the database. + * + * @param gameId The game we want to write the outcome of. + * + */ + setGameOutcome(this: ITicTacToeDb, id: GameId): void { + // Find a way to retrieve the outcome of the game. + this.prepare('INSERT INTO tictactoe (game, outcome) VALUES (@id, "draw" /* replace w/ game outcome */)').run({ id }); + }, + /** + * whole function description + * + * @param id the argument description + * + * @returns what does the function return ? + */ // async asyncFunction(this: ITemplateDb, id: TemplateId): Promise { // void id; // return undefined; @@ -35,10 +34,10 @@ export const TicTacToeImpl: Omit = { export type TicTacToeId = number & { readonly __brand: unique symbol }; export type TemplateData = { - readonly id: TicTacToeId; - readonly player1: string; - readonly player2: string; - readonly outcome: string; + readonly id: TicTacToeId; + readonly player1: string; + readonly player2: string; + readonly outcome: string; }; // this function will be able to be called from everywhere