Skip to content

Commit

Permalink
types(vest-utils): Move Predicate type to utilityTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
ealush committed Nov 28, 2023
1 parent 3007217 commit 39804ca
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions packages/vest-utils/src/Predicates.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { isEmpty } from 'isEmpty';
import optionalFunctionValue from 'optionalFunctionValue';

export type Predicate<T> = boolean | ((value: T) => boolean);
import { Predicate } from 'utilityTypes';

export function all<T = any>(...p: Predicate<T>[]): (value: T) => boolean {
return (value: T) =>
Expand Down
2 changes: 2 additions & 0 deletions packages/vest-utils/src/utilityTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ export type DynamicValue<T, Args extends TArgs = TArgs> = T | CB<T, Args>;
export type BlankValue = Maybe<''>;

type TArgs = any[];

export type Predicate<T = any> = boolean | ((value: T) => boolean);
3 changes: 1 addition & 2 deletions packages/vest-utils/src/vest-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ export { StringObject } from 'StringObject';
export { noop } from 'noop';
export * as Predicates from 'Predicates';

export type { Predicate } from 'Predicates';

export type {
DropFirst,
Stringable,
Expand All @@ -51,4 +49,5 @@ export type {
OneOrMoreOf,
DynamicValue,
BlankValue,
Predicate,
} from 'utilityTypes';
2 changes: 1 addition & 1 deletion packages/vest/src/suite/SuiteWalker.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Predicates, type Predicate, isNullish } from 'vest-utils';
import { Predicate, Predicates, isNullish } from 'vest-utils';
import { TIsolate, VestRuntime, Walker } from 'vestjs-runtime';

import { CommonStates } from 'CommonStateMachine';
Expand Down

2 comments on commit 39804ca

@vercel
Copy link

@vercel vercel bot commented on 39804ca Nov 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

vest-next – ./website

vest-website.vercel.app
vest-next-git-latest-ealush.vercel.app
vest-next.vercel.app
vest-next-ealush.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 39804ca Nov 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

vest – ./website

vest-git-latest-ealush.vercel.app
vest.vercel.app
vest-ealush.vercel.app
vestjs.dev
www.vestjs.dev

Please sign in to comment.