UNPKG

@promptbook/azure-openai

Version:

Promptbook: Run AI apps in plain human language across multiple models and platforms

22 lines (21 loc) 620 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;