Skip to content

Commit 63da345

Browse files
committed
remove useless type parameters in exists functions
1 parent 98a6fee commit 63da345

File tree

6 files changed

+7
-6
lines changed

6 files changed

+7
-6
lines changed

docs/modules/Either.ts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1783,7 +1783,7 @@ Returns `false` if `Left` or returns the result of the application of the given
17831783
**Signature**
17841784
17851785
```ts
1786-
export declare const exists: <A>(predicate: Predicate<A>) => <E>(ma: Either<E, A>) => boolean
1786+
export declare const exists: <A>(predicate: Predicate<A>) => (ma: Either<unknown, A>) => boolean
17871787
```
17881788
17891789
**Example**

docs/modules/These.ts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ Added in v2.11.0
770770
**Signature**
771771

772772
```ts
773-
export declare const exists: <A>(predicate: Predicate<A>) => <E>(ma: These<E, A>) => boolean
773+
export declare const exists: <A>(predicate: Predicate<A>) => (ma: These<unknown, A>) => boolean
774774
```
775775

776776
Added in v2.11.0

src/Array.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2928,7 +2928,7 @@ export const some =
29282928
*
29292929
* @since 2.11.0
29302930
*/
2931-
export const exists = some
2931+
export const exists: <A>(predicate: Predicate<A>) => (as: Array<A>) => as is NEA.NonEmptyArray<A> = some
29322932

29332933
/**
29342934
* Places an element in between members of an `Array`, then folds the results using the provided `Monoid`.

src/Either.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1477,7 +1477,7 @@ export function elem<A>(E: Eq<A>): <E>(a: A, ma?: Either<E, A>) => boolean | ((m
14771477
*/
14781478
export const exists =
14791479
<A>(predicate: Predicate<A>) =>
1480-
<E>(ma: Either<E, A>): boolean =>
1480+
(ma: Either<unknown, A>): boolean =>
14811481
isLeft(ma) ? false : predicate(ma.right)
14821482

14831483
// -------------------------------------------------------------------------------------

src/ReadonlyArray.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2572,7 +2572,8 @@ export const some =
25722572
*
25732573
* @since 2.11.0
25742574
*/
2575-
export const exists = some
2575+
export const exists: <A>(predicate: Predicate<A>) => (as: ReadonlyArray<A>) => as is RNEA.ReadonlyNonEmptyArray<A> =
2576+
some
25762577

25772578
/**
25782579
* Places an element in between members of a `ReadonlyArray`, then folds the results using the provided `Monoid`.

src/These.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ export const elem =
703703
*/
704704
export const exists =
705705
<A>(predicate: Predicate<A>) =>
706-
<E>(ma: These<E, A>): boolean =>
706+
(ma: These<unknown, A>): boolean =>
707707
isLeft(ma) ? false : predicate(ma.right)
708708

709709
/**

0 commit comments

Comments
 (0)