add PackedRef

This commit is contained in:
tamaina 2021-09-12 15:48:08 +09:00
parent 04aa4a5e2c
commit e2550e8ddd

View file

@ -47,7 +47,9 @@ export const refs = {
GalleryPost: packedGalleryPostSchema, 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 { export interface Schema extends SimpleSchema {
items?: Schema; items?: Schema;