effect-io-ai

Package: effect
Module: Context

Context.getOrElse

Get a service from the context that corresponds to the given tag, or use the fallback value.

Signature

declare const getOrElse: { <S, I, B>(tag: Tag<I, S>, orElse: LazyArg<B>): <Services>(self: Context<Services>) => S | B; <Services, S, I, B>(self: Context<Services>, tag: Tag<I, S>, orElse: LazyArg<B>): S | B; }

Source

Since v3.7.0