Skip to content

Commit

Permalink
avoid extending Tag.of
Browse files Browse the repository at this point in the history
  • Loading branch information
mikearnaldi authored and tim-smart committed Sep 27, 2024
1 parent bda6347 commit 720184e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/effect/src/Effect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6395,7 +6395,7 @@ export declare namespace Service {
* @category models
*/
export interface TagClass<Self, Id, Type> extends Context.Tag<Self, Self> {
of(_: Pick<Self, (keyof Type) & (keyof Self)>): Self
make(_: Type): Self

new(_: never): Type & {
readonly _tag: Id
Expand Down
2 changes: 1 addition & 1 deletion packages/effect/test/Effect/service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Logger extends Effect.Service<Logger>()("Logger", {
}),
dependencies: [Prefix, Postfix]
}) {
static Test = Layer.succeed(this, this.of({ info: () => Effect.void }))
static Test = Layer.succeed(this, Logger.make({ info: () => Effect.void }))
}

describe("Effect", () => {
Expand Down

0 comments on commit 720184e

Please sign in to comment.