UNPKG

ts-odata-client

Version:
16 lines (15 loc) 982 B
import type { ProxyFilterMethods } from "./ProxyFilterTypes"; export declare const propertyPath: unique symbol; export declare const lambdaVariable: unique symbol; export declare const proxyProperties: unique symbol; type QueryableFieldsFor<T> = T extends number ? Exclude<keyof T, keyof number> : T extends string ? Exclude<keyof T, keyof string> : T extends Date ? Exclude<keyof T, keyof Date> : T extends Array<unknown> ? Exclude<keyof T, keyof Array<unknown>> : T extends object ? Exclude<keyof T, keyof object> : keyof T & string; export type EntityProxy<T, IncludeFilterMethods = false> = { [P in QueryableFieldsFor<T>]: PropertyProxy<T[P], IncludeFilterMethods> & (IncludeFilterMethods extends true ? ProxyFilterMethods<T[P]> : object); } & { [lambdaVariable]: string; [proxyProperties]: PropertyProxy<unknown>[]; }; export type PropertyProxy<T, IncludeFilterMethods = false> = EntityProxy<T, IncludeFilterMethods> & { [propertyPath]: string[]; }; export {};