vest-utils
Advanced tools
Comparing version 1.2.0 to 1.2.1
{ | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"name": "vest-utils", | ||
@@ -4,0 +4,0 @@ "author": "ealush", |
@@ -15,2 +15,3 @@ type DropFirst<T extends unknown[]> = T extends [ | ||
type TArgs = any[]; | ||
type Predicate<T = any> = boolean | ((value: T) => boolean); | ||
/** | ||
@@ -83,2 +84,3 @@ * Creates a cache function | ||
type TArgs = any[]; | ||
type Predicate<T = any> = boolean | ((value: T) => boolean); | ||
function createBus(): BusType; | ||
@@ -157,2 +159,3 @@ type OnReturn = { | ||
type TArgs = any[]; | ||
type Predicate<T = any> = boolean | ((value: T) => boolean); | ||
function createTinyState<S>(initialValue: SetValueInput<S>): TinyState<S>; | ||
@@ -173,3 +176,17 @@ type TinyState<S> = () => [ | ||
declare namespace Predicates { | ||
type Predicate<T> = boolean | ((value: T) => boolean); | ||
type DropFirst<T extends unknown[]> = T extends [ | ||
unknown, | ||
...infer U | ||
] ? U : never; | ||
type Stringable = string | CB<string>; | ||
type CB<T = any, Args extends TArgs = TArgs> = (...args: Args) => T; | ||
type ValueOf<T> = T[keyof T]; | ||
type Nullish<T = void> = Nullable<T> | Maybe<T>; | ||
type Nullable<T> = T | null; | ||
type Maybe<T> = T | undefined | void; | ||
type OneOrMoreOf<T> = T | T[]; | ||
type DynamicValue<T, Args extends TArgs = TArgs> = T | CB<T, Args>; | ||
type BlankValue = Maybe<"">; | ||
type TArgs = any[]; | ||
type Predicate<T = any> = boolean | ((value: T) => boolean); | ||
function all<T = any>(...p: Predicate<T>[]): (value: T) => boolean; | ||
@@ -179,3 +196,3 @@ function any<T = any>(...p: Predicate<T>[]): (value: T) => boolean; | ||
export { createCache as cache, CacheApi, BusType, TinyState, isNullish, isNotNullish, asArray, callEach, hasOwnProperty, isPromise, optionalFunctionValue, _default as assign, defaultTo, invariant, isStringValue, bindNot, either, isBoolean, deferThrow, bus, seq, genSeq, isFunction, mapFirst, greaterThan, longerThan, isNumeric, isNotNumeric, isObject, lengthEquals, lengthNotEquals, numberEquals, numberNotEquals, isNull, isNotNull, isUndefined, isNotUndefined, isArray, isNotArray, isEmpty, isNotEmpty, isPositive, text, TStateMachine, StateMachine, nonnullish, tinyState, StringObject, noop, Predicates }; | ||
export type { Predicate, DropFirst, Stringable, CB, ValueOf, Nullish, Nullable, Maybe, OneOrMoreOf, DynamicValue, BlankValue }; | ||
export type { DropFirst, Stringable, CB, ValueOf, Nullish, Nullable, Maybe, OneOrMoreOf, DynamicValue, BlankValue, Predicate }; | ||
//# sourceMappingURL=vest-utils.d.ts.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
183083
1202