Skip to content

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

@lambdalisue

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;

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