ts-japi
Version:
A highly-modular (typescript-friendly)-framework agnostic library for serializing data to the JSON:API specification
11 lines • 887 B
TypeScript
import Relator from "../classes/relator";
import type { SerializerOptions } from "../interfaces/serializer.interface";
import type { Dictionary } from "../types/global.types";
export declare function recurseRelators(data: any[], relators: Record<string, Relator<any>>, include: number | string[] | undefined, keys: string[], relatorDataCache?: Map<Relator<any>, Dictionary<any>[]>): Promise<any[]>;
export declare function normalizeRelators<T extends Dictionary<any>>(relators: SerializerOptions<T>["relators"]): Record<string, Relator<T, any>> | undefined;
export declare class Helpers<PrimaryType extends Dictionary<any> = any> {
projectAttributes: (data: PrimaryType) => Partial<PrimaryType> | undefined;
relators: Record<string, Relator<PrimaryType, any>> | undefined;
constructor(options: SerializerOptions<PrimaryType>);
}
//# sourceMappingURL=serializer.utils.d.ts.map