diff --git a/lib/node_modules/@stdlib/utils/async/if-else/docs/types/index.d.ts b/lib/node_modules/@stdlib/utils/async/if-else/docs/types/index.d.ts index 7dd425b4092c..7685ccfc8707 100644 --- a/lib/node_modules/@stdlib/utils/async/if-else/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/utils/async/if-else/docs/types/index.d.ts @@ -24,7 +24,7 @@ * @param error - encountered error or null * @param result - `x` or `y` */ -type Callback = ( error: Error | null, result: any ) => void; +type Callback = ( error: Error | null, result: T ) => void; /** * Predicate callback function. @@ -61,6 +61,15 @@ type PredicateCallback = PredicateNullary | PredicateUnary | PredicateBinary; */ type Predicate = ( clbk: PredicateCallback ) => void; +/** + * Determines the relationship between two types `T` and `U`, and returns: + * + * - `T` if `T` is assignable to `U`, + * - `U` if `U` is assignable to `T`, + * - A union of `U | T` as a fallback. + */ +type ResultFunction = T extends U ? T : U extends T ? U : U | T; + /** * If a predicate function returns a truthy value, returns `x`; otherwise, returns `y`. * @@ -87,7 +96,7 @@ type Predicate = ( clbk: PredicateCallback ) => void; * } * ifelseAsync( predicate, 1.0, -1.0, done ); */ -declare function ifelseAsync( predicate: Predicate, x: any, y: any, done: Callback ): void; +declare function ifelseAsync( predicate: Predicate, x: T, y: U, done: Callback> ): void; // EXPORTS //