effect-io-ai

Package: effect
Module: Layer

Layer.ensureRequirementsType

A no-op type constraint that enforces the requirements channel of a Layer conforms to the specified requirements type RIn.

Example

import { Layer } from "effect"

// Ensure that the layer does not have any requirements.
const program = Layer.succeed(MyService, new MyServiceImpl()).pipe(Layer.ensureRequirementsType<never>())

Signature

declare const ensureRequirementsType: <RIn>() => <ROut, E, RIn2 extends RIn>(layer: Layer<ROut, E, RIn2>) => Layer<ROut, E, RIn2>

Source

Since v3.20.0