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.
Extends
Section titled “Extends”Readonly<{key:Key; }> & {_tag:"Optional"; } &Pipeable
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
Key extends Context.Key<any, any> |
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”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
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
args |
{ key: Key; } |
args.key |
Key |
Returns
Section titled “Returns”Optional<Key>
Inherited from
Section titled “Inherited from”Data.TaggedClass("Optional")<{ readonly key: Key }>.constructor
Properties
Section titled “Properties”| 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 |