This commit is contained in:
tamaina 2021-09-12 23:08:42 +09:00
parent 77ed1d7dc4
commit 6b72d888f8

View file

@ -2,9 +2,7 @@ import { User } from '@/models/entities/user';
import { EntityRepository, Repository } from 'typeorm'; import { EntityRepository, Repository } from 'typeorm';
import { Users } from '../../../index'; import { Users } from '../../../index';
import { ReversiGame } from '@/models/entities/games/reversi/game'; import { ReversiGame } from '@/models/entities/games/reversi/game';
import { SchemaType } from '@/misc/schema'; import { Packed } from '@/misc/schema';
export type PackedReversiGame = SchemaType<typeof packedReversiGameSchema>;
@EntityRepository(ReversiGame) @EntityRepository(ReversiGame)
export class ReversiGameRepository extends Repository<ReversiGame> { export class ReversiGameRepository extends Repository<ReversiGame> {
@ -14,7 +12,7 @@ export class ReversiGameRepository extends Repository<ReversiGame> {
options?: { options?: {
detail?: boolean detail?: boolean
} }
): Promise<PackedReversiGame> { ): Promise<Packed<'ReversiGame'>> {
const opts = Object.assign({ const opts = Object.assign({
detail: true detail: true
}, options); }, options);