Skip to content

Commit 59e8f38

Browse files
committed
Update predicate types and add missing semicolon
1 parent ed524c8 commit 59e8f38

File tree

9 files changed

+38
-80
lines changed

9 files changed

+38
-80
lines changed

lib/node_modules/@stdlib/utils/async/any-by-right/docs/types/index.ts

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,20 +70,13 @@ type Binary = ( error: Error | null, result: boolean ) => void;
7070
*/
7171
type Callback = Nullary | Unary | Binary;
7272

73-
/**
74-
* Checks whether an element in a collection passes a test.
75-
*
76-
* @param next - callback which should be called once the predicate function has finished processing a collection value
77-
*/
78-
type UnaryPredicate = () => boolean;
79-
8073
/**
8174
* Checks whether an element in a collection passes a test.
8275
*
8376
* @param value - collection value
8477
* @param next - callback which should be called once the predicate function has finished processing a collection value
8578
*/
86-
type BinaryPredicate = ( value: any, next: Callback ) => boolean;
79+
type BinaryPredicate = ( value: any, next: Callback ) => void;
8780

8881
/**
8982
* Checks whether an element in a collection passes a test.
@@ -92,7 +85,7 @@ type BinaryPredicate = ( value: any, next: Callback ) => boolean;
9285
* @param index - collection index
9386
* @param next - callback which should be called once the `predicate` function has finished processing a collection `value`
9487
*/
95-
type TertiaryPredicate = ( value: any, index: number, next: Callback ) => boolean;
88+
type TertiaryPredicate = ( value: any, index: number, next: Callback ) => void;
9689

9790
/**
9891
* Checks whether an element in a collection passes a test.
@@ -102,16 +95,17 @@ type TertiaryPredicate = ( value: any, index: number, next: Callback ) => boolea
10295
* @param collection - input collection
10396
* @param next - callback which should be called once the `predicate` function has finished processing a collection `value`
10497
*/
105-
type QuaternaryPredicate = ( value: any, index: number, collection: Collection, next: Callback ) => boolean; // tslint-disable-line max-line-length
98+
type QuaternaryPredicate = ( value: any, index: number, collection: Collection, next: Callback ) => void; // tslint-disable-line max-line-length
10699

107100
/**
108101
* Checks whether an element in a collection passes a test.
109102
*
110103
* @param value - collection value
111104
* @param index - collection index
112105
* @param collection - input collection
106+
* @param next - callback which should be called once the `predicate` function has finished processing a collection `value`
113107
*/
114-
type Predicate = UnaryPredicate | BinaryPredicate | TertiaryPredicate | QuaternaryPredicate; // tslint-disable-line max-line-length
108+
type Predicate = BinaryPredicate | TertiaryPredicate | QuaternaryPredicate;
115109

116110
/**
117111
* Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left.

lib/node_modules/@stdlib/utils/async/any-by/docs/types/index.ts

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,20 +70,13 @@ type Binary = ( error: Error | null, result: boolean ) => void;
7070
*/
7171
type Callback = Nullary | Unary | Binary;
7272

73-
/**
74-
* Checks whether an element in a collection passes a test.
75-
*
76-
* @param next - callback which should be called once the predicate function has finished processing a collection value
77-
*/
78-
type UnaryPredicate = () => boolean;
79-
8073
/**
8174
* Checks whether an element in a collection passes a test.
8275
*
8376
* @param value - collection value
8477
* @param next - callback which should be called once the predicate function has finished processing a collection value
8578
*/
86-
type BinaryPredicate = ( value: any, next: Callback ) => boolean;
79+
type BinaryPredicate = ( value: any, next: Callback ) => void;
8780

8881
/**
8982
* Checks whether an element in a collection passes a test.
@@ -92,7 +85,7 @@ type BinaryPredicate = ( value: any, next: Callback ) => boolean;
9285
* @param index - collection index
9386
* @param next - callback which should be called once the `predicate` function has finished processing a collection `value`
9487
*/
95-
type TertiaryPredicate = ( value: any, index: number, next: Callback ) => boolean;
88+
type TertiaryPredicate = ( value: any, index: number, next: Callback ) => void;
9689

9790
/**
9891
* Checks whether an element in a collection passes a test.
@@ -102,16 +95,17 @@ type TertiaryPredicate = ( value: any, index: number, next: Callback ) => boolea
10295
* @param collection - input collection
10396
* @param next - callback which should be called once the `predicate` function has finished processing a collection `value`
10497
*/
105-
type QuaternaryPredicate = ( value: any, index: number, collection: Collection, next: Callback ) => boolean; // tslint-disable-line max-line-length
98+
type QuaternaryPredicate = ( value: any, index: number, collection: Collection, next: Callback ) => void; // tslint-disable-line max-line-length
10699

107100
/**
108101
* Checks whether an element in a collection passes a test.
109102
*
110103
* @param value - collection value
111104
* @param index - collection index
112105
* @param collection - input collection
106+
* @param next - callback which should be called once the `predicate` function has finished processing a collection `value`
113107
*/
114-
type Predicate = UnaryPredicate | BinaryPredicate | TertiaryPredicate | QuaternaryPredicate; // tslint-disable-line max-line-length
108+
type Predicate = BinaryPredicate | TertiaryPredicate | QuaternaryPredicate;
115109

116110
/**
117111
* Tests whether at least one element in a collection passes a test implemented by a predicate function.

lib/node_modules/@stdlib/utils/async/bifurcate-by/docs/types/index.ts

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -75,20 +75,13 @@ type Binary = ( error: Error | null, result: Array<Array<any>> ) => void;
7575
*/
7676
type Callback = Nullary | Unary | Binary;
7777

78-
/**
79-
* Checks whether an element in a collection passes a test.
80-
*
81-
* @param next - callback which should be called once the predicate function has finished processing a collection value
82-
*/
83-
type UnaryPredicate = () => boolean;
84-
8578
/**
8679
* Checks whether an element in a collection passes a test.
8780
*
8881
* @param value - collection value
8982
* @param next - callback which should be called once the predicate function has finished processing a collection value
9083
*/
91-
type BinaryPredicate = ( value: any, next: Callback ) => boolean;
84+
type BinaryPredicate = ( value: any, next: Callback ) => void;
9285

9386
/**
9487
* Checks whether an element in a collection passes a test.
@@ -97,7 +90,7 @@ type BinaryPredicate = ( value: any, next: Callback ) => boolean;
9790
* @param index - collection index
9891
* @param next - callback which should be called once the `predicate` function has finished processing a collection `value`
9992
*/
100-
type TertiaryPredicate = ( value: any, index: number, next: Callback ) => boolean;
93+
type TertiaryPredicate = ( value: any, index: number, next: Callback ) => void;
10194

10295
/**
10396
* Checks whether an element in a collection passes a test.
@@ -107,16 +100,17 @@ type TertiaryPredicate = ( value: any, index: number, next: Callback ) => boolea
107100
* @param collection - input collection
108101
* @param next - callback which should be called once the `predicate` function has finished processing a collection `value`
109102
*/
110-
type QuaternaryPredicate = ( value: any, index: number, collection: Collection, next: Callback ) => boolean; // tslint-disable-line max-line-length
103+
type QuaternaryPredicate = ( value: any, index: number, collection: Collection, next: Callback ) => void; // tslint-disable-line max-line-length
111104

112105
/**
113106
* Checks whether an element in a collection passes a test.
114107
*
115108
* @param value - collection value
116109
* @param index - collection index
117110
* @param collection - input collection
111+
* @param next - callback which should be called once the `predicate` function has finished processing a collection `value`
118112
*/
119-
type Predicate = UnaryPredicate | BinaryPredicate | TertiaryPredicate | QuaternaryPredicate; // tslint-disable-line max-line-length
113+
type Predicate = BinaryPredicate | TertiaryPredicate | QuaternaryPredicate;
120114

121115
/**
122116
* Tests whether at least one element in a collection passes a test implemented by a predicate function, iterating from right to left.

lib/node_modules/@stdlib/utils/async/every-by-right/docs/types/index.ts

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,20 +70,13 @@ type Binary = ( error: Error | null, result: boolean ) => void;
7070
*/
7171
type Callback = Nullary | Unary | Binary;
7272

73-
/**
74-
* Checks whether an element in a collection passes a test.
75-
*
76-
* @param next - callback which should be called once the predicate function has finished processing a collection value
77-
*/
78-
type UnaryPredicate = () => boolean;
79-
8073
/**
8174
* Checks whether an element in a collection passes a test.
8275
*
8376
* @param value - collection value
8477
* @param next - callback which should be called once the predicate function has finished processing a collection value
8578
*/
86-
type BinaryPredicate = ( value: any, next: Callback ) => boolean;
79+
type BinaryPredicate = ( value: any, next: Callback ) => void;
8780

8881
/**
8982
* Checks whether an element in a collection passes a test.
@@ -92,7 +85,7 @@ type BinaryPredicate = ( value: any, next: Callback ) => boolean;
9285
* @param index - collection index
9386
* @param next - callback which should be called once the `predicate` function has finished processing a collection `value`
9487
*/
95-
type TertiaryPredicate = ( value: any, index: number, next: Callback ) => boolean;
88+
type TertiaryPredicate = ( value: any, index: number, next: Callback ) => void;
9689

9790
/**
9891
* Checks whether an element in a collection passes a test.
@@ -102,16 +95,17 @@ type TertiaryPredicate = ( value: any, index: number, next: Callback ) => boolea
10295
* @param collection - input collection
10396
* @param next - callback which should be called once the `predicate` function has finished processing a collection `value`
10497
*/
105-
type QuaternaryPredicate = ( value: any, index: number, collection: Collection, next: Callback ) => boolean; // tslint-disable-line max-line-length
98+
type QuaternaryPredicate = ( value: any, index: number, collection: Collection, next: Callback ) => void; // tslint-disable-line max-line-length
10699

107100
/**
108101
* Checks whether an element in a collection passes a test.
109102
*
110103
* @param value - collection value
111104
* @param index - collection index
112105
* @param collection - input collection
106+
* @param next - callback which should be called once the `predicate` function has finished processing a collection `value`
113107
*/
114-
type Predicate = UnaryPredicate | BinaryPredicate | TertiaryPredicate | QuaternaryPredicate; // tslint-disable-line max-line-length
108+
type Predicate = BinaryPredicate | TertiaryPredicate | QuaternaryPredicate;
115109

116110
/**
117111
* Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left.
@@ -178,7 +172,7 @@ interface EveryByRightAsync {
178172
*
179173
* everyByRightAsync( files, predicate, done );
180174
*/
181-
( collection: Collection, options: Options, predicate: Predicate, done: Callback ): void // tslint-disable-line max-line-length
175+
( collection: Collection, options: Options, predicate: Predicate, done: Callback ): void; // tslint-disable-line max-line-length
182176

183177
/**
184178
* Tests whether all elements in a collection pass a test implemented by a predicate function, iterating from right to left.

lib/node_modules/@stdlib/utils/async/every-by/docs/types/index.ts

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,20 +70,13 @@ type Binary = ( error: Error | null, result: boolean ) => void;
7070
*/
7171
type Callback = Nullary | Unary | Binary;
7272

73-
/**
74-
* Checks whether an element in a collection passes a test.
75-
*
76-
* @param next - callback which should be called once the predicate function has finished processing a collection value
77-
*/
78-
type UnaryPredicate = () => boolean;
79-
8073
/**
8174
* Checks whether an element in a collection passes a test.
8275
*
8376
* @param value - collection value
8477
* @param next - callback which should be called once the predicate function has finished processing a collection value
8578
*/
86-
type BinaryPredicate = ( value: any, next: Callback ) => boolean;
79+
type BinaryPredicate = ( value: any, next: Callback ) => void;
8780

8881
/**
8982
* Checks whether an element in a collection passes a test.
@@ -92,7 +85,7 @@ type BinaryPredicate = ( value: any, next: Callback ) => boolean;
9285
* @param index - collection index
9386
* @param next - callback which should be called once the `predicate` function has finished processing a collection `value`
9487
*/
95-
type TertiaryPredicate = ( value: any, index: number, next: Callback ) => boolean;
88+
type TertiaryPredicate = ( value: any, index: number, next: Callback ) => void;
9689

9790
/**
9891
* Checks whether an element in a collection passes a test.
@@ -102,16 +95,17 @@ type TertiaryPredicate = ( value: any, index: number, next: Callback ) => boolea
10295
* @param collection - input collection
10396
* @param next - callback which should be called once the `predicate` function has finished processing a collection `value`
10497
*/
105-
type QuaternaryPredicate = ( value: any, index: number, collection: Collection, next: Callback ) => boolean; // tslint-disable-line max-line-length
98+
type QuaternaryPredicate = ( value: any, index: number, collection: Collection, next: Callback ) => void; // tslint-disable-line max-line-length
10699

107100
/**
108101
* Checks whether an element in a collection passes a test.
109102
*
110103
* @param value - collection value
111104
* @param index - collection index
112105
* @param collection - input collection
106+
* @param next - callback which should be called once the `predicate` function has finished processing a collection `value`
113107
*/
114-
type Predicate = UnaryPredicate | BinaryPredicate | TertiaryPredicate | QuaternaryPredicate; // tslint-disable-line max-line-length
108+
type Predicate = BinaryPredicate | TertiaryPredicate | QuaternaryPredicate;
115109

116110
/**
117111
* Tests whether all elements in a collection pass a test implemented by a predicate function.

lib/node_modules/@stdlib/utils/async/for-each-right/docs/types/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ interface ForEachRightAsync {
160160
*
161161
* forEachRightAsync( files, read, done );
162162
*/
163-
( collection: Collection, options: Options, fcn: Fcn, done: Callback ): void // tslint-disable-line max-line-length
163+
( collection: Collection, options: Options, fcn: Fcn, done: Callback ): void; // tslint-disable-line max-line-length
164164

165165
/**
166166
* Invokes a function once for each element in a collection.

lib/node_modules/@stdlib/utils/async/for-each/docs/types/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ interface ForEachAsync {
160160
*
161161
* forEachAsync( files, read, done );
162162
*/
163-
( collection: Collection, options: Options, fcn: Fcn, done: Callback ): void // tslint-disable-line max-line-length
163+
( collection: Collection, options: Options, fcn: Fcn, done: Callback ): void; // tslint-disable-line max-line-length
164164

165165
/**
166166
* Invokes a function once for each element in a collection.

lib/node_modules/@stdlib/utils/async/none-by-right/docs/types/index.ts

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,20 +70,13 @@ type Binary = ( error: Error | null, result: boolean ) => void;
7070
*/
7171
type Callback = Nullary | Unary | Binary;
7272

73-
/**
74-
* Checks whether an element in a collection passes a test.
75-
*
76-
* @param next - callback which should be called once the predicate function has finished processing a collection value
77-
*/
78-
type UnaryPredicate = () => boolean;
79-
8073
/**
8174
* Checks whether an element in a collection passes a test.
8275
*
8376
* @param value - collection value
8477
* @param next - callback which should be called once the predicate function has finished processing a collection value
8578
*/
86-
type BinaryPredicate = ( value: any, next: Callback ) => boolean;
79+
type BinaryPredicate = ( value: any, next: Callback ) => void;
8780

8881
/**
8982
* Checks whether an element in a collection passes a test.
@@ -92,7 +85,7 @@ type BinaryPredicate = ( value: any, next: Callback ) => boolean;
9285
* @param index - collection index
9386
* @param next - callback which should be called once the `predicate` function has finished processing a collection `value`
9487
*/
95-
type TertiaryPredicate = ( value: any, index: number, next: Callback ) => boolean;
88+
type TertiaryPredicate = ( value: any, index: number, next: Callback ) => void;
9689

9790
/**
9891
* Checks whether an element in a collection passes a test.
@@ -102,16 +95,17 @@ type TertiaryPredicate = ( value: any, index: number, next: Callback ) => boolea
10295
* @param collection - input collection
10396
* @param next - callback which should be called once the `predicate` function has finished processing a collection `value`
10497
*/
105-
type QuaternaryPredicate = ( value: any, index: number, collection: Collection, next: Callback ) => boolean; // tslint-disable-line max-line-length
98+
type QuaternaryPredicate = ( value: any, index: number, collection: Collection, next: Callback ) => void; // tslint-disable-line max-line-length
10699

107100
/**
108101
* Checks whether an element in a collection passes a test.
109102
*
110103
* @param value - collection value
111104
* @param index - collection index
112105
* @param collection - input collection
106+
* @param next - callback which should be called once the `predicate` function has finished processing a collection `value`
113107
*/
114-
type Predicate = UnaryPredicate | BinaryPredicate | TertiaryPredicate | QuaternaryPredicate; // tslint-disable-line max-line-length
108+
type Predicate = BinaryPredicate | TertiaryPredicate | QuaternaryPredicate;
115109

116110
/**
117111
* Tests whether all elements in a collection fail a test implemented by a predicate function, iterating from right to left.

lib/node_modules/@stdlib/utils/async/none-by/docs/types/index.ts

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,20 +70,13 @@ type Binary = ( error: Error | null, result: boolean ) => void;
7070
*/
7171
type Callback = Nullary | Unary | Binary;
7272

73-
/**
74-
* Checks whether an element in a collection passes a test.
75-
*
76-
* @param next - callback which should be called once the predicate function has finished processing a collection value
77-
*/
78-
type UnaryPredicate = () => boolean;
79-
8073
/**
8174
* Checks whether an element in a collection passes a test.
8275
*
8376
* @param value - collection value
8477
* @param next - callback which should be called once the predicate function has finished processing a collection value
8578
*/
86-
type BinaryPredicate = ( value: any, next: Callback ) => boolean;
79+
type BinaryPredicate = ( value: any, next: Callback ) => void;
8780

8881
/**
8982
* Checks whether an element in a collection passes a test.
@@ -92,7 +85,7 @@ type BinaryPredicate = ( value: any, next: Callback ) => boolean;
9285
* @param index - collection index
9386
* @param next - callback which should be called once the `predicate` function has finished processing a collection `value`
9487
*/
95-
type TertiaryPredicate = ( value: any, index: number, next: Callback ) => boolean;
88+
type TertiaryPredicate = ( value: any, index: number, next: Callback ) => void;
9689

9790
/**
9891
* Checks whether an element in a collection passes a test.
@@ -102,16 +95,17 @@ type TertiaryPredicate = ( value: any, index: number, next: Callback ) => boolea
10295
* @param collection - input collection
10396
* @param next - callback which should be called once the `predicate` function has finished processing a collection `value`
10497
*/
105-
type QuaternaryPredicate = ( value: any, index: number, collection: Collection, next: Callback ) => boolean; // tslint-disable-line max-line-length
98+
type QuaternaryPredicate = ( value: any, index: number, collection: Collection, next: Callback ) => void; // tslint-disable-line max-line-length
10699

107100
/**
108101
* Checks whether an element in a collection passes a test.
109102
*
110103
* @param value - collection value
111104
* @param index - collection index
112105
* @param collection - input collection
106+
* @param next - callback which should be called once the `predicate` function has finished processing a collection `value`
113107
*/
114-
type Predicate = UnaryPredicate | BinaryPredicate | TertiaryPredicate | QuaternaryPredicate; // tslint-disable-line max-line-length
108+
type Predicate = BinaryPredicate | TertiaryPredicate | QuaternaryPredicate;
115109

116110
/**
117111
* Tests whether all elements in a collection fail a test implemented by a predicate function.

0 commit comments

Comments
 (0)