Skip to content

feat: add SideEffect to the Predicate so that assert or ensure can produce more user-friendly error messages #121

Description

@lambdalisue

Assumed to use SideEffect for recording which part of the array/object attribute cause failer. Like

export type SideEffect = (value: unknown) => void;
export type Predicate<T> = (x: unknown, sideEffect?: SideEffect) => x is T;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions