UNPKG

foxts

Version:

Opinionated collection of common TypeScript utils by @SukkaW

11 lines (9 loc) 364 B
interface ErrorLikeObject { name: string; message: string; stack?: string; } declare function isErrorLikeObject(obj: unknown): obj is ErrorLikeObject; declare function extractErrorMessage(error: unknown, includeName?: boolean, includeStack?: boolean): string | null; export { extractErrorMessage, isErrorLikeObject }; export type { ErrorLikeObject };