effect 3.10.7 → 3.10.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9147,6 +9147,16 @@ export declare namespace Tag {
9147
9147
  };
9148
9148
  }
9149
9149
  /**
9150
+ * @example
9151
+ * import { Effect, Layer } from "effect"
9152
+ *
9153
+ * class MapTag extends Effect.Tag("MapTag")<MapTag, Map<string, string>>() {
9154
+ * static Live = Layer.effect(
9155
+ * this,
9156
+ * Effect.sync(() => new Map())
9157
+ * )
9158
+ * }
9159
+ *
9150
9160
  * @since 2.0.0
9151
9161
  * @category context
9152
9162
  */
@@ -9154,6 +9164,27 @@ export declare const Tag: <const Id extends string>(id: Id) => <Self, Type exten
9154
9164
  use: <X>(body: (_: Type) => X) => X extends Effect<infer A, infer E, infer R> ? Effect<A, E, R | Self> : Effect<X, never, Self>;
9155
9165
  };
9156
9166
  /**
9167
+ * @example
9168
+ * import { Effect } from 'effect';
9169
+ *
9170
+ * class Prefix extends Effect.Service<Prefix>()("Prefix", {
9171
+ * sync: () => ({ prefix: "PRE" })
9172
+ * }) {}
9173
+ *
9174
+ * class Logger extends Effect.Service<Logger>()("Logger", {
9175
+ * accessors: true,
9176
+ * effect: Effect.gen(function* () {
9177
+ * const { prefix } = yield* Prefix
9178
+ * return {
9179
+ * info: (message: string) =>
9180
+ * Effect.sync(() => {
9181
+ * console.log(`[${prefix}][${message}]`)
9182
+ * })
9183
+ * }
9184
+ * }),
9185
+ * dependencies: [Prefix.Default]
9186
+ * }) {}
9187
+ *
9157
9188
  * @since 3.9.0
9158
9189
  * @category context
9159
9190
  * @experimental might be up for breaking changes
@@ -9247,7 +9278,9 @@ export declare namespace Service {
9247
9278
  };
9248
9279
  readonly use: <X>(body: (_: Self) => X) => X extends Effect<infer A, infer E, infer R> ? Effect<A, E, R | Self> : Effect<X, never, Self>;
9249
9280
  readonly make: (_: MakeService<Make>) => Self;
9250
- } & Context.Tag<Self, Self> & (MakeAccessors<Make> extends true ? Tag.Proxy<Self, MakeService<Make>> : {}) & (MakeDeps<Make> extends never ? {
9281
+ } & Context.Tag<Self, Self> & {
9282
+ key: Key;
9283
+ } & (MakeAccessors<Make> extends true ? Tag.Proxy<Self, MakeService<Make>> : {}) & (MakeDeps<Make> extends never ? {
9251
9284
  readonly Default: Layer.Layer<Self, MakeError<Make>, MakeContext<Make>>;
9252
9285
  } : {
9253
9286
  readonly DefaultWithoutDependencies: Layer.Layer<Self, MakeError<Make>, MakeContext<Make>>;