import { GFString } from '../string/types'; import { GFError, GFErrorOptions, StackTrace } from './types'; export declare const isStackTraceNative: (stackTrace: StackTrace) => stackTrace is string; /** * Creates an error, optionally with child error(s), advice/tip(s), and a stack trace. * * @example * import { createGFError, GFResult } from 'good-flow' * * const task = (path: string): GFResult => { * try { * return [doTask()] * } * catch (e: any) { * // Create error * return [undefined, createGFError({ * msg: 'Could not do task', * inner: e, * })] * } * } * * const [taskResult, err] = task() * // Handle error * if (err != null) * console.log(err.toLogString()) // Do something with error */ export declare const createGFError: (options: GFErrorOptions | GFString) => GFError;