method BaseError.prototype.toSerializable
BaseError.prototype.toSerializable(): TData

Serializes error to a plain object. Subclasses must implement this to return their specific data type.

Return Type

Plain object representation of the error

Usage

import { BaseError } from "result/mod.ts";