import {HasAll} from "./ApiTypes"; export type Diff = T extends U ? never : T; // Remove types/keys found in U export type Filter = T extends U ? T : never; // Remove types/keys not found in U export type RemoveVerbs = Diff; export type AnyFunction = (...args: any[]) => any; export type ReturnType = T extends (...args: any[]) => infer R ? R : never; export type ApiStructureFunction = T extends AnyFunction ? { $id: ApiStructureMap> } : unknown; export type ApiStructureChild = (ApiStructureFunction & ApiStructureMap) export type ApiStructureMap = { [P in RemoveVerbs]: ApiStructureChild }