Interface returned when type validation succeeds

Returned when the input value perfectly conforms to the specified type T. Since success is true, TypeScript's type guard allows safe access to the validated data through the data property.

interface ISuccess<T = unknown> {
    data: T;
    success: true;
}

Type Parameters

  • T = unknown

    The validated type

Properties

Properties

data: T

The validated data of type T

success: true

Indicates validation success