跳到內容

make

本頁內容尚未翻譯。

const make: {
<Inject, E, Background>(
options: Options<Inject> & {
apply: () => Effect.Effect<
void | Update<void, Background, Required<Inject>>,
E,
NoInfer<Requirements<Inject>> | Tasks<Background>
>
config?: undefined
},
): Definition<void, void, SchemaError | E | Background>
<S, Inject, E, Background>(
options: Options<Inject> & {
apply: (
config: S["Type"],
) => Effect.Effect<
void | Update<S["Type"], Background, Required<Inject>>,
E,
NoInfer<Requirements<Inject>> | Tasks<Background>
>
config: S & {
DecodingServices: NoInfer<Requirements<Inject>> | Tasks<Background>
}
},
): Definition<S["Type"], S["Encoded"], SchemaError | E | Background>
}

Defined in: Plugin.ts:151

Defines a plugin. apply may only require what inject declares as required; anything else is a type error.

<Inject extends readonly Dependency[] = readonly [], E = never, Background = never>(options: Options<Inject> & {
apply: () => Effect.Effect<
| void
| Update<void, Background, Required<Inject>>, E,
| NoInfer<Requirements<Inject>>
| Tasks<Background>>;
config?: undefined;
}): Definition<void, void, SchemaError | E | Background>;
Type Parameter Default type
Inject extends readonly Dependency[] readonly []
E never
Background never
Parameter Type
options Options<Inject> & { apply: () => Effect.Effect< | void | Update<void, Background, Required<Inject>>, E, | NoInfer<Requirements<Inject>> | Tasks<Background>>; config?: undefined; }

Definition<void, void, SchemaError | E | Background>

<S extends Top, Inject extends readonly Dependency[] = readonly [], E = never, Background = never>(options: Options<Inject> & {
apply: (config: S["Type"]) => Effect.Effect<
| void
| Update<S["Type"], Background, Required<Inject>>, E,
| NoInfer<Requirements<Inject>>
| Tasks<Background>>;
config: S & {
DecodingServices: | NoInfer<Requirements<Inject>>
| Tasks<Background>;
};
}): Definition<S["Type"], S["Encoded"], SchemaError | E | Background>;
Type Parameter Default type
S extends Top -
Inject extends readonly Dependency[] readonly []
E never
Background never
Parameter Type
options Options<Inject> & { apply: (config: S["Type"]) => Effect.Effect< | void | Update<S["Type"], Background, Required<Inject>>, E, | NoInfer<Requirements<Inject>> | Tasks<Background>>; config: S & { DecodingServices: | NoInfer<Requirements<Inject>> | Tasks<Background>; }; }

Definition<S["Type"], S["Encoded"], SchemaError | E | Background>