Files
seerr/server/interfaces/api/common.ts
2026-03-16 21:12:30 +05:00

24 lines
537 B
TypeScript

interface PageInfo {
pages: number;
page: number;
results: number;
pageSize: number;
}
export interface PaginatedResponse {
pageInfo: PageInfo;
}
/**
* Get the keys of an object that are not functions
*/
type NonFunctionPropertyNames<T> = {
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
[K in keyof T]: T[K] extends Function ? never : K;
}[keyof T];
/**
* Get the properties of an object that are not functions
*/
export type NonFunctionProperties<T> = Pick<T, NonFunctionPropertyNames<T>>;