From 39804ca5ef342e78d31ce4db73f296d7db91c651 Mon Sep 17 00:00:00 2001 From: Evyatar Date: Tue, 28 Nov 2023 19:47:05 +0200 Subject: [PATCH] types(vest-utils): Move Predicate type to utilityTypes --- packages/vest-utils/src/Predicates.ts | 3 +-- packages/vest-utils/src/utilityTypes.ts | 2 ++ packages/vest-utils/src/vest-utils.ts | 3 +-- packages/vest/src/suite/SuiteWalker.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/vest-utils/src/Predicates.ts b/packages/vest-utils/src/Predicates.ts index 1ff6dac8b..45b3a89a1 100644 --- a/packages/vest-utils/src/Predicates.ts +++ b/packages/vest-utils/src/Predicates.ts @@ -1,7 +1,6 @@ import { isEmpty } from 'isEmpty'; import optionalFunctionValue from 'optionalFunctionValue'; - -export type Predicate = boolean | ((value: T) => boolean); +import { Predicate } from 'utilityTypes'; export function all(...p: Predicate[]): (value: T) => boolean { return (value: T) => diff --git a/packages/vest-utils/src/utilityTypes.ts b/packages/vest-utils/src/utilityTypes.ts index f50679dbd..af61a0706 100644 --- a/packages/vest-utils/src/utilityTypes.ts +++ b/packages/vest-utils/src/utilityTypes.ts @@ -21,3 +21,5 @@ export type DynamicValue = T | CB; export type BlankValue = Maybe<''>; type TArgs = any[]; + +export type Predicate = boolean | ((value: T) => boolean); diff --git a/packages/vest-utils/src/vest-utils.ts b/packages/vest-utils/src/vest-utils.ts index 329b08d99..55832348f 100644 --- a/packages/vest-utils/src/vest-utils.ts +++ b/packages/vest-utils/src/vest-utils.ts @@ -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, @@ -51,4 +49,5 @@ export type { OneOrMoreOf, DynamicValue, BlankValue, + Predicate, } from 'utilityTypes'; diff --git a/packages/vest/src/suite/SuiteWalker.ts b/packages/vest/src/suite/SuiteWalker.ts index b244557db..8b36565df 100644 --- a/packages/vest/src/suite/SuiteWalker.ts +++ b/packages/vest/src/suite/SuiteWalker.ts @@ -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';