import { SpawnSyncOptions } from 'child_process'; /** * JSONPrimitive represents a primitive which can be safely transmitted over JSON. * @see {@link JSONObject} * @public */ export type JSONPrimitive = string | number | boolean | null | undefined; /** * JSONValue represents a value which can be safely transmitted over JSON. * @see {@link JSONObject} * @public */ export type JSONValue = JSONObject | JSONArray | JSONPrimitive; /** * JSONArray represents an array which can be safely transmitted over JSON. * @see {@link JSONObject} * @public */ export type JSONArray = JSONValue[]; /** * JSONObject represents an object which can be safely transmitted over JSON. * @public */ export interface JSONObject extends Record { } /** * Value represents data that can safely be input to, * or returned from a doSync() function. * @public */ export type Value = JSONValue; /** * An AsyncFn can be used with doSync(). * @public */ export type AsyncFn = (...v: I) => Promise; /** * DoSyncOptions is the set of options that can be used with {@link doSync}. * * It is a copy of {@link SpawnSyncOptions}. * @public */ export interface DoSyncOptions extends SpawnSyncOptions { } /** * doSync returns a synchronous version of certian * special asynchronous functions by extracting them * and running them as a synchronous node subprocess. * * The input and output types of the function must be serializible * to JSON, and the function must not reference any parent * scopes (i.e. file-defined variables) to function. * * @public */ export declare const doSync: (f: AsyncFn, opts?: DoSyncOptions) => (...ip: I) => O; export default doSync; //# sourceMappingURL=doSync.d.ts.map