Skip to content
Source
Sign inSign up

10_reference.ts

10 lines281 Bytes

1/**
2 * @title Context.Reference
3 *
4 * For defining configuration values, feature flags, or any other service that has a default value.
5 */
6import { Context } from "effect"
7​
8export const FeatureFlag = Context.Reference<boolean>("myapp/FeatureFlag", {
9 defaultValue: () => false
10})