add PackedRef

This commit is contained in:
tamaina 2021-09-12 15:48:08 +09:00
parent 04aa4a5e2c
commit e2550e8ddd
1 changed files with 3 additions and 1 deletions

View File

@ -47,7 +47,9 @@ export const refs = {
GalleryPost: packedGalleryPostSchema,
};
export type Packed<x extends keyof typeof refs> = SchemaType<typeof refs[x]>
export type Packed<x extends keyof typeof refs> = PackRef<typeof refs[x]>
type PackRef<s extends { properties: Obj, [x: string]: any }> = { [x in keyof s['properties']]: SchemaType<s['properties'][x]> };
export interface Schema extends SimpleSchema {
items?: Schema;