@mikezimm/fps-core-v7
Version:
Library of reusable core interfaces, types and constants migrated from fps-library-v2
19 lines • 759 B
TypeScript
/**
* Converts a string representation of an object into a HeadersInit object.
* @param jsonString - The string representation of the headers object.
* @returns A HeadersInit object.
* @throws Error if the input is not a valid JSON object or cannot be converted.
*/
export interface IParseHeadersFromStringResult {
headers: HeadersInit;
string: string;
error: string;
}
export declare function parseHeadersFromString(jsonString: string): IParseHeadersFromStringResult;
export interface IParseHeadersFromObjectResult {
headers: HeadersInit;
jsonObject: any;
error: string;
}
export declare function parseHeadersFromObject(jsonObject: any): IParseHeadersFromObjectResult;
//# sourceMappingURL=parseHeaders.d.ts.map