Interface for properties passed to the TypeGuardError constructor.

const props: TypeGuardError.IProps = {
method: "typia.assertEquals",
path: "input.sex",
expected: "undefined",
value: 1,
message: "Custom error message" // optional
};
interface IProps {
    expected: string;
    message?: string;
    method: string;
    path?: string;
    value: any;
}

Properties

expected: string

String representation of the expected type at the error location.

"string", "number & ExclusiveMinimum<19>"
message?: string

Custom error message (optional).

If not provided, a default format message will be automatically generated.

method: string

The name of the typia method that threw the error.

"typia.assert", "typia.assertEquals"
path?: string

The access path to the property where the assertion error occurred (optional).

"input.age", "input.profile.email"
value: any

The actual value that failed assertion.