export declare function readStdin(): Promise; /** The payload flags a command may offer: --data , --file , --stdin. */ export type JsonObjectSource = { data?: string; file?: string; stdin?: boolean; }; export declare function hasJsonObjectSource(src: JsonObjectSource): boolean; /** * Read a JSON object from whichever of --data, --file or --stdin was passed. * Returns undefined when none was. Every input problem is a UsageError (exit 2). */ export declare function readJsonObject(src: JsonObjectSource): Promise | undefined>; /** * Read a JSON array from a ---file path or ---stdin. Returns * undefined when neither was passed. Every input problem is a UsageError. */ export declare function readJsonArray(flag: string, src: { file?: string; stdin?: boolean; }): Promise; /** readJsonObject, but a missing payload is a UsageError too. */ export declare function requireJsonObject(src: JsonObjectSource, missingMessage?: string): Promise>;