unknownutil icon indicating copy to clipboard operation
unknownutil copied to clipboard

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

Open lambdalisue opened this issue 1 year ago • 0 comments

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;

lambdalisue avatar Aug 13 '24 08:08 lambdalisue