From e749b756a0d54085d25f0b93fc4886f8f665c26f Mon Sep 17 00:00:00 2001 From: tamaina Date: Sun, 12 Sep 2021 22:12:48 +0900 Subject: [PATCH] add schemas refs, fix Packed type --- src/misc/schema.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/misc/schema.ts b/src/misc/schema.ts index fbcedbf2ff..4131875ef7 100644 --- a/src/misc/schema.ts +++ b/src/misc/schema.ts @@ -21,6 +21,9 @@ import { packedClipSchema } from '@/models/repositories/clip'; import { packedFederationInstanceSchema } from '@/models/repositories/federation-instance'; import { packedQueueCountSchema } from '@/models/repositories/queue'; import { packedGalleryPostSchema } from '@/models/repositories/gallery-post'; +import { packedEmojiSchema } from '@/models/repositories/emoji'; +import { packedReversiGameSchema } from '@/models/repositories/games/reversi/game'; +import { packedReversiMatchingSchema } from '@/models/repositories/games/reversi/matching'; export const refs = { User: packedUserSchema, @@ -45,11 +48,12 @@ export const refs = { Clip: packedClipSchema, FederationInstance: packedFederationInstanceSchema, GalleryPost: packedGalleryPostSchema, + Emoji: packedEmojiSchema, + ReversiGame: packedReversiGameSchema, + ReversiMatching: packedReversiMatchingSchema, }; -export type Packed = PackRef; - -type PackRef = { [x in keyof s['properties']]: SchemaType }; +export type Packed = ObjType<(typeof refs[x])['properties']>; export interface Schema extends SimpleSchema { items?: Schema;