Files

4 lines
114 B
TypeScript

export function errorMessage(err: unknown): string {
return err instanceof Error ? err.message : String(err);
}