Skip to content

Optional

Defined in: Plugin.ts:36

Marks a dependency as optional: the plugin starts without it and restarts whenever it appears or disappears. Read it with Effect.serviceOption.

  • Readonly<{ key: Key; }> & { _tag: "Optional"; } & Pipeable
Type Parameter
Key extends Context.Key<any, any>
new Optional<Key extends Key<any, any>>(args: {
key: Key;
}): Optional<Key>;

Defined in: ../../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/Data.d.ts:82

Parameter Type
args { key: Key; }
args.key Key

Optional<Key>

Data.TaggedClass("Optional")<{ readonly key: Key }>.constructor

Property Modifier Type Defined in
_tag readonly "Optional" ../../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/Data.d.ts:83
key readonly Key Plugin.ts:38