UNPKG

@promptbook/remote-server

Version:

Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action

23 lines (22 loc) 623 B
import type { JsonArray, JsonObject } from 'type-fest'; /** * Options for the `orderJson` function */ export type OrderJsonOptions<TObject extends JsonObject | JsonArray> = { /** * Value to checked, ordered and deeply frozen */ value: TObject; /** * Order of the object properties */ order: Array<keyof TObject>; }; /** * Orders JSON object by keys * * @returns The same type of object as the input re-ordered * * @public exported from `@promptbook/utils` */ export declare function orderJson<TObject extends JsonObject | JsonArray>(options: OrderJsonOptions<TObject>): TObject;