effect-io-ai

Package: effect
Module: Context

Context.Service.Any

Type that matches any Context service key regardless of its identifier or service shape.

Example (Typing any service key)

import { Context } from "effect"

// Any represents any possible service type
const services: Array<Context.Service.Any> = [
  Context.Service<{ log: (msg: string) => void }>("Logger"),
  Context.Service<{ query: (sql: string) => string }>("Database")
]

Signature

type Any = Key<never, any> | Key<any, any>

Source

Since v4.0.0