rapiq
Version:
A tiny library which provides utility types/functions for request and response query handling.
7 lines • 485 B
TypeScript
import type { Flatten, NestedKeys, ObjectLiteral, OnlyObject, SimpleKeys } from '../types';
type ParseAllowedObjectOption<T extends ObjectLiteral = ObjectLiteral> = {
[K in keyof T]?: T[K] extends OnlyObject<T[K]> ? ParseAllowedOption<Flatten<T[K]>> : never;
};
export type ParseAllowedOption<T> = T extends ObjectLiteral ? (ParseAllowedObjectOption<T> | (SimpleKeys<T>[] | ParseAllowedObjectOption<T>)[] | NestedKeys<T>[]) : string[];
export {};
//# sourceMappingURL=type.d.ts.map