/** * Safe JSON parse * If the param string is valid JSON, safeJSONParse returns the parsed JSON and null for the error value * * If the param string is *not* valid JSON, safeJSONParse returns the original string and an error message to let the consumer know it is not valid JSON */ declare type SafeJSONParseReturn = [Record | any[] | string, Error | null]; declare function safeJSONParse(str: string): SafeJSONParseReturn; export { safeJSONParse };