<A, B extends A>(refinement: Predicate.Refinement<NoInfer<A>, B>): (
elements: Iterable<A>
) => Effect<Array<B>>
<A>(predicate: Predicate.Predicate<NoInfer<A>>): (
elements: Iterable<A>
) => Effect<Array<A>>
<A, E, R>(
predicate: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>,
options?: { readonly concurrency?: Concurrency | undefined }
): (iterable: Iterable<A>) => Effect<Array<A>, E, R>
<A, B extends A>(
elements: Iterable<A>,
refinement: Predicate.Refinement<A, B>
): Effect<Array<B>>
<A>(elements: Iterable<A>, predicate: Predicate.Predicate<A>): Effect<
Array<A>
>
<A, E, R>(
iterable: Iterable<A>,
predicate: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>,
options?: { readonly concurrency?: Concurrency | undefined }
): Effect<Array<A>, E, R>Filters elements of an iterable using a predicate, refinement, or effectful predicate.
Example (Filtering success values)
import { Effect } from "effect"
// Sync predicate
const evens = Effect.filter([1, 2, 3, 4], (n) => n % 2 === 0)
// Effectful predicate
const checked = Effect.filter([1, 2, 3], (n) => Effect.succeed(n > 1))
// Use Effect.filterMapEffect for effectful Filter.Filter callbacksexport const const filter: {
<A, B extends A>(
refinement: Predicate.Refinement<
NoInfer<A>,
B
>
): (elements: Iterable<A>) => Effect<Array<B>>
<A>(
predicate: Predicate.Predicate<NoInfer<A>>
): (elements: Iterable<A>) => Effect<Array<A>>
<A, E, R>(
predicate: (
a: NoInfer<A>,
i: number
) => Effect<boolean, E, R>,
options?: {
readonly concurrency?:
| Concurrency
| undefined
}
): (
iterable: Iterable<A>
) => Effect<Array<A>, E, R>
<A, B extends A>(
elements: Iterable<A>,
refinement: Predicate.Refinement<A, B>
): Effect<Array<B>>
<A>(
elements: Iterable<A>,
predicate: Predicate.Predicate<A>
): Effect<Array<A>>
<A, E, R>(
iterable: Iterable<A>,
predicate: (
a: NoInfer<A>,
i: number
) => Effect<boolean, E, R>,
options?: {
readonly concurrency?:
| Concurrency
| undefined
}
): Effect<Array<A>, E, R>
}
Filters elements of an iterable using a predicate, refinement, or effectful
predicate.
Example (Filtering success values)
import { Effect } from "effect"
// Sync predicate
const evens = Effect.filter([1, 2, 3, 4], (n) => n % 2 === 0)
// Effectful predicate
const checked = Effect.filter([1, 2, 3], (n) => Effect.succeed(n > 1))
// Use Effect.filterMapEffect for effectful Filter.Filter callbacks
filter: {
<function (type parameter) A in <A, B extends A>(refinement: Predicate.Refinement<NoInfer<A>, B>): (elements: Iterable<A>) => Effect<Array<B>>A, function (type parameter) B in <A, B extends A>(refinement: Predicate.Refinement<NoInfer<A>, B>): (elements: Iterable<A>) => Effect<Array<B>>B extends function (type parameter) A in <A, B extends A>(refinement: Predicate.Refinement<NoInfer<A>, B>): (elements: Iterable<A>) => Effect<Array<B>>A>(
refinement: Predicate.Refinement<NoInfer<A>, B>refinement: import PredicatePredicate.interface Refinement<in A, out B extends A>A predicate that also narrows the input type when it returns true.
When to use
Use when you want a runtime check that refines A to B for TypeScript,
especially when composing type guards with
compose
or safely
checking unknown values.
Details
A refinement returns a type predicate (a is B). Use it with if or
filter to narrow types.
Example (Narrowing unknown values)
import { Predicate } from "effect"
const isString: Predicate.Refinement<unknown, string> = (u): u is string => typeof u === "string"
const data: unknown = "hello"
if (isString(data)) {
console.log(data.toUpperCase())
}
Type-level utilities for working with
Refinement
types.
When to use
Use when you need to extract input and output types from refinement
signatures while writing generic helpers over refinements.
Details
These utilities are type-only, create no runtime values, and the namespace is
erased at runtime.
Example (Extracting refinement types)
import { Predicate } from "effect"
type IsString = Predicate.Refinement<unknown, string>
type Input = Predicate.Refinement.In<IsString>
type Output = Predicate.Refinement.Out<IsString>
Refinement<type NoInfer<A> = [A][A extends any ? 0 : never]Prevents TypeScript from inferring a type parameter from a specific
position.
When to use
Use when a function parameter must match an inferred type without becoming
an inference source.
Details
The parameter using NoInfer must still match the inferred type.
Example (Controlling inference)
import type { Types } from "effect"
declare function withDefault<T>(value: T, fallback: Types.NoInfer<T>): T
// T is inferred as "a" | "b" from the first argument only
const result = withDefault<"a" | "b">("a", "b")
NoInfer<function (type parameter) A in <A, B extends A>(refinement: Predicate.Refinement<NoInfer<A>, B>): (elements: Iterable<A>) => Effect<Array<B>>A>, function (type parameter) B in <A, B extends A>(refinement: Predicate.Refinement<NoInfer<A>, B>): (elements: Iterable<A>) => Effect<Array<B>>B>
): (elements: Iterable<A>elements: interface Iterable<T, TReturn = any, TNext = any>Iterable<function (type parameter) A in <A, B extends A>(refinement: Predicate.Refinement<NoInfer<A>, B>): (elements: Iterable<A>) => Effect<Array<B>>A>) => interface Effect<out A, out E = never, out R = never>The Effect interface defines a value that lazily describes a workflow or
job. The workflow requires some context R, and may fail with an error of
type E, or succeed with a value of type A.
When to use
Use when you need to represent a lazy, composable workflow that can require
services, fail with a typed error, or succeed with a typed value.
Details
Effect values model resourceful interaction with the outside world,
including synchronous, asynchronous, concurrent, and parallel interaction.
They use a fiber-based concurrency model, with built-in support for
scheduling, fine-grained interruption, structured concurrency, and high
scalability.
To run an Effect value, you need a Runtime, which is a type that is
capable of executing Effect values.
Effect<interface Array<T>Array<function (type parameter) B in <A, B extends A>(refinement: Predicate.Refinement<NoInfer<A>, B>): (elements: Iterable<A>) => Effect<Array<B>>B>>
<function (type parameter) A in <A>(predicate: Predicate.Predicate<NoInfer<A>>): (elements: Iterable<A>) => Effect<Array<A>>A>(
predicate: Predicate.Predicate<NoInfer<A>>predicate: import PredicatePredicate.interface Predicate<in A>A function that decides whether a value of type A satisfies a condition.
When to use
Use when you want a reusable boolean check for A, especially when you plan
to combine checks with
and
/
or
or pass a predicate to arrays
and iterables.
Details
A predicate returns true or false and never throws by itself. It does not
narrow types unless you use Refinement.
Example (Defining a predicate)
import { Predicate } from "effect"
const isPositive: Predicate.Predicate<number> = (n) => n > 0
console.log(isPositive(1))
Type-level utilities for working with
Predicate
types.
When to use
Use when you need to extract input types from predicate signatures while
writing generic helpers over predicate types.
Details
These utilities are type-only, create no runtime values, and the namespace is
erased at runtime.
Example (Extracting predicate input)
import { Predicate } from "effect"
type IsString = Predicate.Predicate<string>
type Input = Predicate.Predicate.In<IsString>
Predicate<type NoInfer<A> = [A][A extends any ? 0 : never]Prevents TypeScript from inferring a type parameter from a specific
position.
When to use
Use when a function parameter must match an inferred type without becoming
an inference source.
Details
The parameter using NoInfer must still match the inferred type.
Example (Controlling inference)
import type { Types } from "effect"
declare function withDefault<T>(value: T, fallback: Types.NoInfer<T>): T
// T is inferred as "a" | "b" from the first argument only
const result = withDefault<"a" | "b">("a", "b")
NoInfer<function (type parameter) A in <A>(predicate: Predicate.Predicate<NoInfer<A>>): (elements: Iterable<A>) => Effect<Array<A>>A>>
): (elements: Iterable<A>elements: interface Iterable<T, TReturn = any, TNext = any>Iterable<function (type parameter) A in <A>(predicate: Predicate.Predicate<NoInfer<A>>): (elements: Iterable<A>) => Effect<Array<A>>A>) => interface Effect<out A, out E = never, out R = never>The Effect interface defines a value that lazily describes a workflow or
job. The workflow requires some context R, and may fail with an error of
type E, or succeed with a value of type A.
When to use
Use when you need to represent a lazy, composable workflow that can require
services, fail with a typed error, or succeed with a typed value.
Details
Effect values model resourceful interaction with the outside world,
including synchronous, asynchronous, concurrent, and parallel interaction.
They use a fiber-based concurrency model, with built-in support for
scheduling, fine-grained interruption, structured concurrency, and high
scalability.
To run an Effect value, you need a Runtime, which is a type that is
capable of executing Effect values.
Effect<interface Array<T>Array<function (type parameter) A in <A>(predicate: Predicate.Predicate<NoInfer<A>>): (elements: Iterable<A>) => Effect<Array<A>>A>>
<function (type parameter) A in <A, E, R>(predicate: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>, options?: {
readonly concurrency?: Concurrency | undefined;
}): (iterable: Iterable<A>) => Effect<Array<A>, E, R>
A, function (type parameter) E in <A, E, R>(predicate: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>, options?: {
readonly concurrency?: Concurrency | undefined;
}): (iterable: Iterable<A>) => Effect<Array<A>, E, R>
E, function (type parameter) R in <A, E, R>(predicate: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>, options?: {
readonly concurrency?: Concurrency | undefined;
}): (iterable: Iterable<A>) => Effect<Array<A>, E, R>
R>(
predicate: (
a: NoInfer<A>,
i: number
) => Effect<boolean, E, R>
predicate: (a: NoInfer<A>a: type NoInfer<A> = [A][A extends any ? 0 : never]Prevents TypeScript from inferring a type parameter from a specific
position.
When to use
Use when a function parameter must match an inferred type without becoming
an inference source.
Details
The parameter using NoInfer must still match the inferred type.
Example (Controlling inference)
import type { Types } from "effect"
declare function withDefault<T>(value: T, fallback: Types.NoInfer<T>): T
// T is inferred as "a" | "b" from the first argument only
const result = withDefault<"a" | "b">("a", "b")
NoInfer<function (type parameter) A in <A, E, R>(predicate: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>, options?: {
readonly concurrency?: Concurrency | undefined;
}): (iterable: Iterable<A>) => Effect<Array<A>, E, R>
A>, i: numberi: number) => interface Effect<out A, out E = never, out R = never>The Effect interface defines a value that lazily describes a workflow or
job. The workflow requires some context R, and may fail with an error of
type E, or succeed with a value of type A.
When to use
Use when you need to represent a lazy, composable workflow that can require
services, fail with a typed error, or succeed with a typed value.
Details
Effect values model resourceful interaction with the outside world,
including synchronous, asynchronous, concurrent, and parallel interaction.
They use a fiber-based concurrency model, with built-in support for
scheduling, fine-grained interruption, structured concurrency, and high
scalability.
To run an Effect value, you need a Runtime, which is a type that is
capable of executing Effect values.
Effect<boolean, function (type parameter) E in <A, E, R>(predicate: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>, options?: {
readonly concurrency?: Concurrency | undefined;
}): (iterable: Iterable<A>) => Effect<Array<A>, E, R>
E, function (type parameter) R in <A, E, R>(predicate: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>, options?: {
readonly concurrency?: Concurrency | undefined;
}): (iterable: Iterable<A>) => Effect<Array<A>, E, R>
R>,
options: {
readonly concurrency?: Concurrency | undefined
}
options?: { readonly concurrency?: Concurrency | undefinedconcurrency?: type Concurrency = number | "unbounded" | "inherit"Describes the concurrency level for Effect operations that run multiple
effects.
When to use
Use to type options that control how many effects may run at the same time.
Details
number — run at most N effects concurrently.
"unbounded" — run all effects concurrently with no limit.
"inherit" — inherit the concurrency from the surrounding context.
Example (Setting concurrency values)
import type { Types } from "effect"
const sequential: Types.Concurrency = 1
const limited: Types.Concurrency = 5
const unbounded: Types.Concurrency = "unbounded"
const inherit: Types.Concurrency = "inherit"
Concurrency | undefined }
): (iterable: Iterable<A>iterable: interface Iterable<T, TReturn = any, TNext = any>Iterable<function (type parameter) A in <A, E, R>(predicate: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>, options?: {
readonly concurrency?: Concurrency | undefined;
}): (iterable: Iterable<A>) => Effect<Array<A>, E, R>
A>) => interface Effect<out A, out E = never, out R = never>The Effect interface defines a value that lazily describes a workflow or
job. The workflow requires some context R, and may fail with an error of
type E, or succeed with a value of type A.
When to use
Use when you need to represent a lazy, composable workflow that can require
services, fail with a typed error, or succeed with a typed value.
Details
Effect values model resourceful interaction with the outside world,
including synchronous, asynchronous, concurrent, and parallel interaction.
They use a fiber-based concurrency model, with built-in support for
scheduling, fine-grained interruption, structured concurrency, and high
scalability.
To run an Effect value, you need a Runtime, which is a type that is
capable of executing Effect values.
Effect<interface Array<T>Array<function (type parameter) A in <A, E, R>(predicate: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>, options?: {
readonly concurrency?: Concurrency | undefined;
}): (iterable: Iterable<A>) => Effect<Array<A>, E, R>
A>, function (type parameter) E in <A, E, R>(predicate: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>, options?: {
readonly concurrency?: Concurrency | undefined;
}): (iterable: Iterable<A>) => Effect<Array<A>, E, R>
E, function (type parameter) R in <A, E, R>(predicate: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>, options?: {
readonly concurrency?: Concurrency | undefined;
}): (iterable: Iterable<A>) => Effect<Array<A>, E, R>
R>
<function (type parameter) A in <A, B extends A>(elements: Iterable<A>, refinement: Predicate.Refinement<A, B>): Effect<Array<B>>A, function (type parameter) B in <A, B extends A>(elements: Iterable<A>, refinement: Predicate.Refinement<A, B>): Effect<Array<B>>B extends function (type parameter) A in <A, B extends A>(elements: Iterable<A>, refinement: Predicate.Refinement<A, B>): Effect<Array<B>>A>(
elements: Iterable<A>elements: interface Iterable<T, TReturn = any, TNext = any>Iterable<function (type parameter) A in <A, B extends A>(elements: Iterable<A>, refinement: Predicate.Refinement<A, B>): Effect<Array<B>>A>,
refinement: Predicate.Refinement<A, B>refinement: import PredicatePredicate.interface Refinement<in A, out B extends A>A predicate that also narrows the input type when it returns true.
When to use
Use when you want a runtime check that refines A to B for TypeScript,
especially when composing type guards with
compose
or safely
checking unknown values.
Details
A refinement returns a type predicate (a is B). Use it with if or
filter to narrow types.
Example (Narrowing unknown values)
import { Predicate } from "effect"
const isString: Predicate.Refinement<unknown, string> = (u): u is string => typeof u === "string"
const data: unknown = "hello"
if (isString(data)) {
console.log(data.toUpperCase())
}
Type-level utilities for working with
Refinement
types.
When to use
Use when you need to extract input and output types from refinement
signatures while writing generic helpers over refinements.
Details
These utilities are type-only, create no runtime values, and the namespace is
erased at runtime.
Example (Extracting refinement types)
import { Predicate } from "effect"
type IsString = Predicate.Refinement<unknown, string>
type Input = Predicate.Refinement.In<IsString>
type Output = Predicate.Refinement.Out<IsString>
Refinement<function (type parameter) A in <A, B extends A>(elements: Iterable<A>, refinement: Predicate.Refinement<A, B>): Effect<Array<B>>A, function (type parameter) B in <A, B extends A>(elements: Iterable<A>, refinement: Predicate.Refinement<A, B>): Effect<Array<B>>B>
): interface Effect<out A, out E = never, out R = never>The Effect interface defines a value that lazily describes a workflow or
job. The workflow requires some context R, and may fail with an error of
type E, or succeed with a value of type A.
When to use
Use when you need to represent a lazy, composable workflow that can require
services, fail with a typed error, or succeed with a typed value.
Details
Effect values model resourceful interaction with the outside world,
including synchronous, asynchronous, concurrent, and parallel interaction.
They use a fiber-based concurrency model, with built-in support for
scheduling, fine-grained interruption, structured concurrency, and high
scalability.
To run an Effect value, you need a Runtime, which is a type that is
capable of executing Effect values.
Effect<interface Array<T>Array<function (type parameter) B in <A, B extends A>(elements: Iterable<A>, refinement: Predicate.Refinement<A, B>): Effect<Array<B>>B>>
<function (type parameter) A in <A>(elements: Iterable<A>, predicate: Predicate.Predicate<A>): Effect<Array<A>>A>(
elements: Iterable<A>elements: interface Iterable<T, TReturn = any, TNext = any>Iterable<function (type parameter) A in <A>(elements: Iterable<A>, predicate: Predicate.Predicate<A>): Effect<Array<A>>A>,
predicate: Predicate.Predicate<A>predicate: import PredicatePredicate.interface Predicate<in A>A function that decides whether a value of type A satisfies a condition.
When to use
Use when you want a reusable boolean check for A, especially when you plan
to combine checks with
and
/
or
or pass a predicate to arrays
and iterables.
Details
A predicate returns true or false and never throws by itself. It does not
narrow types unless you use Refinement.
Example (Defining a predicate)
import { Predicate } from "effect"
const isPositive: Predicate.Predicate<number> = (n) => n > 0
console.log(isPositive(1))
Type-level utilities for working with
Predicate
types.
When to use
Use when you need to extract input types from predicate signatures while
writing generic helpers over predicate types.
Details
These utilities are type-only, create no runtime values, and the namespace is
erased at runtime.
Example (Extracting predicate input)
import { Predicate } from "effect"
type IsString = Predicate.Predicate<string>
type Input = Predicate.Predicate.In<IsString>
Predicate<function (type parameter) A in <A>(elements: Iterable<A>, predicate: Predicate.Predicate<A>): Effect<Array<A>>A>
): interface Effect<out A, out E = never, out R = never>The Effect interface defines a value that lazily describes a workflow or
job. The workflow requires some context R, and may fail with an error of
type E, or succeed with a value of type A.
When to use
Use when you need to represent a lazy, composable workflow that can require
services, fail with a typed error, or succeed with a typed value.
Details
Effect values model resourceful interaction with the outside world,
including synchronous, asynchronous, concurrent, and parallel interaction.
They use a fiber-based concurrency model, with built-in support for
scheduling, fine-grained interruption, structured concurrency, and high
scalability.
To run an Effect value, you need a Runtime, which is a type that is
capable of executing Effect values.
Effect<interface Array<T>Array<function (type parameter) A in <A>(elements: Iterable<A>, predicate: Predicate.Predicate<A>): Effect<Array<A>>A>>
<function (type parameter) A in <A, E, R>(iterable: Iterable<A>, predicate: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>, options?: {
readonly concurrency?: Concurrency | undefined;
}): Effect<Array<A>, E, R>
A, function (type parameter) E in <A, E, R>(iterable: Iterable<A>, predicate: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>, options?: {
readonly concurrency?: Concurrency | undefined;
}): Effect<Array<A>, E, R>
E, function (type parameter) R in <A, E, R>(iterable: Iterable<A>, predicate: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>, options?: {
readonly concurrency?: Concurrency | undefined;
}): Effect<Array<A>, E, R>
R>(
iterable: Iterable<A>iterable: interface Iterable<T, TReturn = any, TNext = any>Iterable<function (type parameter) A in <A, E, R>(iterable: Iterable<A>, predicate: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>, options?: {
readonly concurrency?: Concurrency | undefined;
}): Effect<Array<A>, E, R>
A>,
predicate: (
a: NoInfer<A>,
i: number
) => Effect<boolean, E, R>
predicate: (a: NoInfer<A>a: type NoInfer<A> = [A][A extends any ? 0 : never]Prevents TypeScript from inferring a type parameter from a specific
position.
When to use
Use when a function parameter must match an inferred type without becoming
an inference source.
Details
The parameter using NoInfer must still match the inferred type.
Example (Controlling inference)
import type { Types } from "effect"
declare function withDefault<T>(value: T, fallback: Types.NoInfer<T>): T
// T is inferred as "a" | "b" from the first argument only
const result = withDefault<"a" | "b">("a", "b")
NoInfer<function (type parameter) A in <A, E, R>(iterable: Iterable<A>, predicate: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>, options?: {
readonly concurrency?: Concurrency | undefined;
}): Effect<Array<A>, E, R>
A>, i: numberi: number) => interface Effect<out A, out E = never, out R = never>The Effect interface defines a value that lazily describes a workflow or
job. The workflow requires some context R, and may fail with an error of
type E, or succeed with a value of type A.
When to use
Use when you need to represent a lazy, composable workflow that can require
services, fail with a typed error, or succeed with a typed value.
Details
Effect values model resourceful interaction with the outside world,
including synchronous, asynchronous, concurrent, and parallel interaction.
They use a fiber-based concurrency model, with built-in support for
scheduling, fine-grained interruption, structured concurrency, and high
scalability.
To run an Effect value, you need a Runtime, which is a type that is
capable of executing Effect values.
Effect<boolean, function (type parameter) E in <A, E, R>(iterable: Iterable<A>, predicate: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>, options?: {
readonly concurrency?: Concurrency | undefined;
}): Effect<Array<A>, E, R>
E, function (type parameter) R in <A, E, R>(iterable: Iterable<A>, predicate: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>, options?: {
readonly concurrency?: Concurrency | undefined;
}): Effect<Array<A>, E, R>
R>,
options: {
readonly concurrency?: Concurrency | undefined
}
options?: { readonly concurrency?: Concurrency | undefinedconcurrency?: type Concurrency = number | "unbounded" | "inherit"Describes the concurrency level for Effect operations that run multiple
effects.
When to use
Use to type options that control how many effects may run at the same time.
Details
number — run at most N effects concurrently.
"unbounded" — run all effects concurrently with no limit.
"inherit" — inherit the concurrency from the surrounding context.
Example (Setting concurrency values)
import type { Types } from "effect"
const sequential: Types.Concurrency = 1
const limited: Types.Concurrency = 5
const unbounded: Types.Concurrency = "unbounded"
const inherit: Types.Concurrency = "inherit"
Concurrency | undefined }
): interface Effect<out A, out E = never, out R = never>The Effect interface defines a value that lazily describes a workflow or
job. The workflow requires some context R, and may fail with an error of
type E, or succeed with a value of type A.
When to use
Use when you need to represent a lazy, composable workflow that can require
services, fail with a typed error, or succeed with a typed value.
Details
Effect values model resourceful interaction with the outside world,
including synchronous, asynchronous, concurrent, and parallel interaction.
They use a fiber-based concurrency model, with built-in support for
scheduling, fine-grained interruption, structured concurrency, and high
scalability.
To run an Effect value, you need a Runtime, which is a type that is
capable of executing Effect values.
Effect<interface Array<T>Array<function (type parameter) A in <A, E, R>(iterable: Iterable<A>, predicate: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>, options?: {
readonly concurrency?: Concurrency | undefined;
}): Effect<Array<A>, E, R>
A>, function (type parameter) E in <A, E, R>(iterable: Iterable<A>, predicate: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>, options?: {
readonly concurrency?: Concurrency | undefined;
}): Effect<Array<A>, E, R>
E, function (type parameter) R in <A, E, R>(iterable: Iterable<A>, predicate: (a: NoInfer<A>, i: number) => Effect<boolean, E, R>, options?: {
readonly concurrency?: Concurrency | undefined;
}): Effect<Array<A>, E, R>
R>
} = import internalinternal.const filter: {
<A, B extends A>(
refinement: Predicate.Refinement<
NoInfer<A>,
B
>
): (
elements: Iterable<A>
) => Effect.Effect<Array<B>>
<A>(
predicate: Predicate.Predicate<NoInfer<A>>
): (
elements: Iterable<A>
) => Effect.Effect<Array<A>>
<A, E, R>(
predicate: (
a: NoInfer<A>,
i: number
) => Effect.Effect<boolean, E, R>,
options?: {
readonly concurrency?:
| Concurrency
| undefined
}
): (
iterable: Iterable<A>
) => Effect.Effect<Array<A>, E, R>
<A, B extends A>(
elements: Iterable<A>,
refinement: Predicate.Refinement<A, B>
): Effect.Effect<Array<B>>
<A>(
elements: Iterable<A>,
predicate: Predicate.Predicate<A>
): Effect.Effect<Array<A>>
<A, E, R>(
iterable: Iterable<A>,
predicate: (
a: NoInfer<A>,
i: number
) => Effect.Effect<boolean, E, R>,
options?: {
readonly concurrency?:
| Concurrency
| undefined
}
): Effect.Effect<Array<A>, E, R>
}
filter