Skip to content

Commit

Permalink
default proxy to false
Browse files Browse the repository at this point in the history
  • Loading branch information
mikearnaldi committed Sep 26, 2024
1 parent c6216bc commit 5cc112c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/effect/src/Effect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6514,16 +6514,16 @@ export const Service: {
<Self>(): {
<
const Id extends string,
Maker extends (Service.Maker<Service.ProhibitedType> & { proxy?: true }) | (Service.Maker<{}> & { proxy: false })
Maker extends (Service.Maker<Service.ProhibitedType> & { proxy: true }) | (Service.Maker<{}> & { proxy?: false })
>(
id: Id,
maker: Maker
): Service.ReturnWithMaker<Self, Id, Maker, Maker extends { proxy: false } ? false : true>
): Service.ReturnWithMaker<Self, Id, Maker, Maker extends { proxy: true } ? true : false>
}
} = function() {
return function() {
const [id, maker] = arguments
const proxy = "proxy" in maker ? maker["proxy"] : true
const proxy = "proxy" in maker ? maker["proxy"] : false
const limit = Error.stackTraceLimit
Error.stackTraceLimit = 2
const creationError = new Error()
Expand Down
1 change: 1 addition & 0 deletions packages/effect/test/Effect/service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class Postfix extends Effect.Service<Postfix>()("Postfix", {
const messages: Array<string> = []

class Logger extends Effect.Service<Logger>()("Logger", {
proxy: true,
effect: Effect.gen(function*() {
const { prefix } = yield* Prefix
const { postfix } = yield* Postfix
Expand Down

0 comments on commit 5cc112c

Please sign in to comment.