Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Aug 18, 2023
1 parent 07084c9 commit 58cbb30
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 48 deletions.
12 changes: 6 additions & 6 deletions any-by-right/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

/// <reference types="@stdlib/types"/>

import { Collection } from '@stdlib/types/object';
import { Collection } from '@stdlib/types/array';

/**
* Checks whether an element in a collection passes a test.
Expand All @@ -35,7 +35,7 @@ type Nullary = () => boolean;
* @param value - collection value
* @returns boolean indicating whether an element in a collection passes a test
*/
type Unary = ( value: any ) => boolean;
type Unary<T> = ( value: T ) => boolean;

/**
* Checks whether an element in a collection passes a test.
Expand All @@ -44,7 +44,7 @@ type Unary = ( value: any ) => boolean;
* @param index - collection index
* @returns boolean indicating whether an element in a collection passes a test
*/
type Binary = ( value: any, index: number ) => boolean;
type Binary<T> = ( value: T, index: number ) => boolean;

/**
* Checks whether an element in a collection passes a test.
Expand All @@ -54,7 +54,7 @@ type Binary = ( value: any, index: number ) => boolean;
* @param collection - input collection
* @returns boolean indicating whether an element in a collection passes a test
*/
type Ternary = ( value: any, index: number, collection: Collection ) => boolean;
type Ternary<T> = ( value: T, index: number, collection: Collection<T> ) => boolean;

/**
* Checks whether an element in a collection passes a test.
Expand All @@ -64,7 +64,7 @@ type Ternary = ( value: any, index: number, collection: Collection ) => boolean;
* @param collection - input collection
* @returns boolean indicating whether an element in a collection passes a test
*/
type Predicate = Nullary | Unary | Binary | Ternary;
type Predicate<T> = Nullary | Unary<T> | Binary<T> | Ternary<T>;

/**
* Tests whether at least one element in a collection passes a test implemented by a predicate function.
Expand Down Expand Up @@ -96,7 +96,7 @@ type Predicate = Nullary | Unary | Binary | Ternary;
* var bool = anyByRight( arr, isNegative );
* // returns true
*/
declare function anyByRight( collection: Collection, predicate: Predicate, thisArg?: any ): boolean; // tslint-disable-line max-line-length
declare function anyByRight<T = unknown>( collection: Collection<T>, predicate: Predicate<T>, thisArg?: ThisParameterType<Predicate<T>> ): boolean;


// EXPORTS //
Expand Down
12 changes: 6 additions & 6 deletions any-by/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

/// <reference types="@stdlib/types"/>

import { Collection } from '@stdlib/types/object';
import { Collection } from '@stdlib/types/array';

/**
* Checks whether an element in a collection passes a test.
Expand All @@ -35,7 +35,7 @@ type Nullary = () => boolean;
* @param value - collection value
* @returns boolean indicating whether an element in a collection passes a test
*/
type Unary = ( value: any ) => boolean;
type Unary<T> = ( value: T ) => boolean;

/**
* Checks whether an element in a collection passes a test.
Expand All @@ -44,7 +44,7 @@ type Unary = ( value: any ) => boolean;
* @param index - collection index
* @returns boolean indicating whether an element in a collection passes a test
*/
type Binary = ( value: any, index: number ) => boolean;
type Binary<T> = ( value: T, index: number ) => boolean;

/**
* Checks whether an element in a collection passes a test.
Expand All @@ -54,7 +54,7 @@ type Binary = ( value: any, index: number ) => boolean;
* @param collection - input collection
* @returns boolean indicating whether an element in a collection passes a test
*/
type Ternary = ( value: any, index: number, collection: Collection ) => boolean;
type Ternary<T> = ( value: T, index: number, collection: Collection<T> ) => boolean;

/**
* Checks whether an element in a collection passes a test.
Expand All @@ -64,7 +64,7 @@ type Ternary = ( value: any, index: number, collection: Collection ) => boolean;
* @param collection - input collection
* @returns boolean indicating whether an element in a collection passes a test
*/
type Predicate = Nullary | Unary | Binary | Ternary;
type Predicate<T> = Nullary | Unary<T> | Binary<T> | Ternary<T>;

/**
* Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left.
Expand Down Expand Up @@ -96,7 +96,7 @@ type Predicate = Nullary | Unary | Binary | Ternary;
* var bool = anyBy( arr, isNegative );
* // returns true
*/
declare function anyBy( collection: Collection, predicate: Predicate, thisArg?: any ): boolean; // tslint-disable-line max-line-length
declare function anyBy<T = unknown>( collection: Collection<T>, predicate: Predicate<T>, thisArg?: ThisParameterType<Predicate<T>> ): boolean;


// EXPORTS //
Expand Down
12 changes: 6 additions & 6 deletions every-by-right/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

/// <reference types="@stdlib/types"/>

import { Collection } from '@stdlib/types/object';
import { Collection } from '@stdlib/types/array';

/**
* Checks whether an element in a collection passes a test.
Expand All @@ -35,7 +35,7 @@ type Nullary = () => boolean;
* @param value - collection value
* @returns boolean indicating whether an element in a collection passes a test
*/
type Unary = ( value: any ) => boolean;
type Unary<T> = ( value: T ) => boolean;

/**
* Checks whether an element in a collection passes a test.
Expand All @@ -44,7 +44,7 @@ type Unary = ( value: any ) => boolean;
* @param index - collection index
* @returns boolean indicating whether an element in a collection passes a test
*/
type Binary = ( value: any, index: number ) => boolean;
type Binary<T> = ( value: T, index: number ) => boolean;

/**
* Checks whether an element in a collection passes a test.
Expand All @@ -54,7 +54,7 @@ type Binary = ( value: any, index: number ) => boolean;
* @param collection - input collection
* @returns boolean indicating whether an element in a collection passes a test
*/
type Ternary = ( value: any, index: number, collection: Collection ) => boolean; // tslint-disable-line max-line-length
type Ternary<T> = ( value: T, index: number, collection: Collection<T> ) => boolean;

/**
* Checks whether an element in a collection passes a test.
Expand All @@ -64,7 +64,7 @@ type Ternary = ( value: any, index: number, collection: Collection ) => boolean;
* @param collection - input collection
* @returns boolean indicating whether an element in a collection passes a test
*/
type Predicate = Nullary | Unary | Binary | Ternary;
type Predicate<T> = Nullary | Unary<T> | Binary<T> | Ternary<T>;

/**
* Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left.
Expand Down Expand Up @@ -96,7 +96,7 @@ type Predicate = Nullary | Unary | Binary | Ternary;
* var bool = everyByRight( arr, isPositive );
* // returns true
*/
declare function everyByRight( collection: Collection, predicate: Predicate, thisArg?: any ): boolean; // tslint-disable-line max-line-length
declare function everyByRight<T = unknown>( collection: Collection<T>, predicate: Predicate<T>, thisArg?: ThisParameterType<Predicate<T>> ): boolean;


// EXPORTS //
Expand Down
12 changes: 6 additions & 6 deletions every-by/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

/// <reference types="@stdlib/types"/>

import { Collection } from '@stdlib/types/object';
import { Collection } from '@stdlib/types/array';

/**
* Checks whether an element in a collection passes a test.
Expand All @@ -35,7 +35,7 @@ type Nullary = () => boolean;
* @param value - collection value
* @returns boolean indicating whether an element in a collection passes a test
*/
type Unary = ( value: any ) => boolean;
type Unary<T> = ( value: T ) => boolean;

/**
* Checks whether an element in a collection passes a test.
Expand All @@ -44,7 +44,7 @@ type Unary = ( value: any ) => boolean;
* @param index - collection index
* @returns boolean indicating whether an element in a collection passes a test
*/
type Binary = ( value: any, index: number ) => boolean;
type Binary<T> = ( value: T, index: number ) => boolean;

/**
* Checks whether an element in a collection passes a test.
Expand All @@ -54,7 +54,7 @@ type Binary = ( value: any, index: number ) => boolean;
* @param collection - input collection
* @returns boolean indicating whether an element in a collection passes a test
*/
type Ternary = ( value: any, index: number, collection: Collection ) => boolean; // tslint-disable-line max-line-length
type Ternary<T> = ( value: T, index: number, collection: Collection<T> ) => boolean;

/**
* Checks whether an element in a collection passes a test.
Expand All @@ -64,7 +64,7 @@ type Ternary = ( value: any, index: number, collection: Collection ) => boolean;
* @param collection - input collection
* @returns boolean indicating whether an element in a collection passes a test
*/
type Predicate = Nullary | Unary | Binary | Ternary;
type Predicate<T> = Nullary | Unary<T> | Binary<T> | Ternary<T>;

/**
* Tests whether all elements in a collection pass a test implemented by a predicate function.
Expand Down Expand Up @@ -96,7 +96,7 @@ type Predicate = Nullary | Unary | Binary | Ternary;
* var bool = everyBy( arr, isPositive );
* // returns true
*/
declare function everyBy( collection: Collection, predicate: Predicate, thisArg?: any ): boolean; // tslint-disable-line max-line-length
declare function everyBy<T = unknown>( collection: Collection<T>, predicate: Predicate<T>, thisArg?: ThisParameterType<Predicate<T>> ): boolean;


// EXPORTS //
Expand Down
12 changes: 6 additions & 6 deletions none-by-right/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

/// <reference types="@stdlib/types"/>

import { Collection } from '@stdlib/types/object';
import { Collection } from '@stdlib/types/array';

/**
* Checks whether an element in a collection passes a test.
Expand All @@ -35,7 +35,7 @@ type Nullary = () => boolean;
* @param value - collection value
* @returns boolean indicating whether an element in a collection passes a test
*/
type Unary = ( value: any ) => boolean;
type Unary<T> = ( value: T ) => boolean;

/**
* Checks whether an element in a collection passes a test.
Expand All @@ -44,7 +44,7 @@ type Unary = ( value: any ) => boolean;
* @param index - collection index
* @returns boolean indicating whether an element in a collection passes a test
*/
type Binary = ( value: any, index: number ) => boolean;
type Binary<T> = ( value: T, index: number ) => boolean;

/**
* Checks whether an element in a collection passes a test.
Expand All @@ -54,7 +54,7 @@ type Binary = ( value: any, index: number ) => boolean;
* @param collection - input collection
* @returns boolean indicating whether an element in a collection passes a test
*/
type Ternary = ( value: any, index: number, collection: Collection ) => boolean;
type Ternary<T> = ( value: T, index: number, collection: Collection<T> ) => boolean;

/**
* Checks whether an element in a collection passes a test.
Expand All @@ -64,7 +64,7 @@ type Ternary = ( value: any, index: number, collection: Collection ) => boolean;
* @param collection - input collection
* @returns boolean indicating whether an element in a collection passes a test
*/
type Predicate = Nullary | Unary | Binary | Ternary;
type Predicate<T> = Nullary | Unary<T> | Binary<T> | Ternary<T>;

/**
* Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left.
Expand Down Expand Up @@ -96,7 +96,7 @@ type Predicate = Nullary | Unary | Binary | Ternary;
* var bool = noneByRight( arr, isPositive );
* // returns true
*/
declare function noneByRight( collection: Collection, predicate: Predicate, thisArg?: any ): boolean; // tslint-disable-line max-line-length
declare function noneByRight<T = unknown>( collection: Collection<T>, predicate: Predicate<T>, thisArg?: ThisParameterType<Predicate<T>> ): boolean;


// EXPORTS //
Expand Down
12 changes: 6 additions & 6 deletions none-by/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

/// <reference types="@stdlib/types"/>

import { Collection } from '@stdlib/types/object';
import { Collection } from '@stdlib/types/array';

/**
* Checks whether an element in a collection passes a test.
Expand All @@ -35,7 +35,7 @@ type Nullary = () => boolean;
* @param value - collection value
* @returns boolean indicating whether an element in a collection passes a test
*/
type Unary = ( value: any ) => boolean;
type Unary<T> = ( value: T ) => boolean;

/**
* Checks whether an element in a collection passes a test.
Expand All @@ -44,7 +44,7 @@ type Unary = ( value: any ) => boolean;
* @param index - collection index
* @returns boolean indicating whether an element in a collection passes a test
*/
type Binary = ( value: any, index: number ) => boolean;
type Binary<T> = ( value: T, index: number ) => boolean;

/**
* Checks whether an element in a collection passes a test.
Expand All @@ -54,7 +54,7 @@ type Binary = ( value: any, index: number ) => boolean;
* @param collection - input collection
* @returns boolean indicating whether an element in a collection passes a test
*/
type Ternary = ( value: any, index: number, collection: Collection ) => boolean;
type Ternary<T> = ( value: T, index: number, collection: Collection<T> ) => boolean;

/**
* Checks whether an element in a collection passes a test.
Expand All @@ -64,7 +64,7 @@ type Ternary = ( value: any, index: number, collection: Collection ) => boolean;
* @param collection - input collection
* @returns boolean indicating whether an element in a collection passes a test
*/
type Predicate = Nullary | Unary | Binary | Ternary;
type Predicate<T> = Nullary | Unary<T> | Binary<T> | Ternary<T>;

/**
* Tests whether all elements in a collection fail a test implemented by a predicate function.
Expand Down Expand Up @@ -95,7 +95,7 @@ type Predicate = Nullary | Unary | Binary | Ternary;
* var bool = noneBy( arr, isPositive );
* // returns true
*/
declare function noneBy( collection: Collection, predicate: Predicate, thisArg?: any ): boolean; // tslint-disable-line max-line-length
declare function noneBy<T = unknown>( collection: Collection<T>, predicate: Predicate<T>, thisArg?: ThisParameterType<Predicate<T>> ): boolean;


// EXPORTS //
Expand Down
12 changes: 6 additions & 6 deletions some-by-right/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

/// <reference types="@stdlib/types"/>

import { Collection } from '@stdlib/types/object';
import { Collection } from '@stdlib/types/array';

/**
* Checks whether an element in a collection passes a test.
Expand All @@ -35,7 +35,7 @@ type Nullary = () => boolean;
* @param value - collection value
* @returns boolean indicating whether an element in a collection passes a test
*/
type Unary = ( value: any ) => boolean;
type Unary<T> = ( value: T ) => boolean;

/**
* Checks whether an element in a collection passes a test.
Expand All @@ -44,7 +44,7 @@ type Unary = ( value: any ) => boolean;
* @param index - collection index
* @returns boolean indicating whether an element in a collection passes a test
*/
type Binary = ( value: any, index: number ) => boolean;
type Binary<T> = ( value: T, index: number ) => boolean;

/**
* Checks whether an element in a collection passes a test.
Expand All @@ -54,7 +54,7 @@ type Binary = ( value: any, index: number ) => boolean;
* @param collection - input collection
* @returns boolean indicating whether an element in a collection passes a test
*/
type Ternary = ( value: any, index: number, collection: Collection ) => boolean;
type Ternary<T> = ( value: T, index: number, collection: Collection<T> ) => boolean;

/**
* Checks whether an element in a collection passes a test.
Expand All @@ -64,7 +64,7 @@ type Ternary = ( value: any, index: number, collection: Collection ) => boolean;
* @param collection - input collection
* @returns boolean indicating whether an element in a collection passes a test
*/
type Predicate = Nullary | Unary | Binary | Ternary;
type Predicate<T> = Nullary | Unary<T> | Binary<T> | Ternary<T>;

/**
* Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left.
Expand Down Expand Up @@ -98,7 +98,7 @@ type Predicate = Nullary | Unary | Binary | Ternary;
* var bool = someByRight( arr, 2, isNegative );
* // returns true
*/
declare function someByRight( collection: Collection, n: number, predicate: Predicate, thisArg?: any ): boolean; // tslint-disable-line max-line-length
declare function someByRight<T = unknown>( collection: Collection<T>, n: number, predicate: Predicate<T>, thisArg?: ThisParameterType<Predicate<T>> ): boolean;


// EXPORTS //
Expand Down
Loading

0 comments on commit 58cbb30

Please sign in to comment.