effect 3.12.10 → 3.12.12

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.
Files changed (113) hide show
  1. package/README.md +38 -49
  2. package/dist/cjs/Channel.js.map +1 -1
  3. package/dist/cjs/Chunk.js +8 -1
  4. package/dist/cjs/Chunk.js.map +1 -1
  5. package/dist/cjs/Effect.js +26 -22
  6. package/dist/cjs/Effect.js.map +1 -1
  7. package/dist/cjs/Layer.js.map +1 -1
  8. package/dist/cjs/Match.js +659 -38
  9. package/dist/cjs/Match.js.map +1 -1
  10. package/dist/cjs/Reloadable.js.map +1 -1
  11. package/dist/cjs/STM.js.map +1 -1
  12. package/dist/cjs/Schedule.js +1074 -309
  13. package/dist/cjs/Schedule.js.map +1 -1
  14. package/dist/cjs/Schema.js +3 -1
  15. package/dist/cjs/Schema.js.map +1 -1
  16. package/dist/cjs/Stream.js.map +1 -1
  17. package/dist/cjs/internal/channel/channelExecutor.js +5 -1
  18. package/dist/cjs/internal/channel/channelExecutor.js.map +1 -1
  19. package/dist/cjs/internal/channel.js +1 -3
  20. package/dist/cjs/internal/channel.js.map +1 -1
  21. package/dist/cjs/internal/core-effect.js.map +1 -1
  22. package/dist/cjs/internal/effect/circular.js +3 -2
  23. package/dist/cjs/internal/effect/circular.js.map +1 -1
  24. package/dist/cjs/internal/fiberRuntime.js +6 -5
  25. package/dist/cjs/internal/fiberRuntime.js.map +1 -1
  26. package/dist/cjs/internal/layer.js.map +1 -1
  27. package/dist/cjs/internal/reloadable.js.map +1 -1
  28. package/dist/cjs/internal/schedule.js.map +1 -1
  29. package/dist/cjs/internal/sink.js.map +1 -1
  30. package/dist/cjs/internal/stm/stm.js.map +1 -1
  31. package/dist/cjs/internal/stream.js.map +1 -1
  32. package/dist/cjs/internal/version.js +1 -1
  33. package/dist/dts/Channel.d.ts +4 -4
  34. package/dist/dts/Channel.d.ts.map +1 -1
  35. package/dist/dts/Chunk.d.ts +26 -5
  36. package/dist/dts/Chunk.d.ts.map +1 -1
  37. package/dist/dts/Effect.d.ts +6 -6
  38. package/dist/dts/Effect.d.ts.map +1 -1
  39. package/dist/dts/Layer.d.ts +12 -12
  40. package/dist/dts/Layer.d.ts.map +1 -1
  41. package/dist/dts/Match.d.ts +731 -48
  42. package/dist/dts/Match.d.ts.map +1 -1
  43. package/dist/dts/Reloadable.d.ts +13 -13
  44. package/dist/dts/Reloadable.d.ts.map +1 -1
  45. package/dist/dts/STM.d.ts +4 -4
  46. package/dist/dts/STM.d.ts.map +1 -1
  47. package/dist/dts/Schedule.d.ts +2294 -633
  48. package/dist/dts/Schedule.d.ts.map +1 -1
  49. package/dist/dts/Schema.d.ts +10 -4
  50. package/dist/dts/Schema.d.ts.map +1 -1
  51. package/dist/dts/Stream.d.ts +8 -8
  52. package/dist/dts/Stream.d.ts.map +1 -1
  53. package/dist/dts/index.d.ts +25 -0
  54. package/dist/dts/index.d.ts.map +1 -1
  55. package/dist/dts/internal/stm/stm.d.ts +2 -2
  56. package/dist/dts/internal/stm/stm.d.ts.map +1 -1
  57. package/dist/esm/Channel.js.map +1 -1
  58. package/dist/esm/Chunk.js +8 -1
  59. package/dist/esm/Chunk.js.map +1 -1
  60. package/dist/esm/Effect.js +26 -22
  61. package/dist/esm/Effect.js.map +1 -1
  62. package/dist/esm/Layer.js.map +1 -1
  63. package/dist/esm/Match.js +665 -40
  64. package/dist/esm/Match.js.map +1 -1
  65. package/dist/esm/Reloadable.js.map +1 -1
  66. package/dist/esm/STM.js.map +1 -1
  67. package/dist/esm/Schedule.js +1074 -309
  68. package/dist/esm/Schedule.js.map +1 -1
  69. package/dist/esm/Schema.js +3 -1
  70. package/dist/esm/Schema.js.map +1 -1
  71. package/dist/esm/Stream.js.map +1 -1
  72. package/dist/esm/index.js +25 -0
  73. package/dist/esm/index.js.map +1 -1
  74. package/dist/esm/internal/channel/channelExecutor.js +5 -1
  75. package/dist/esm/internal/channel/channelExecutor.js.map +1 -1
  76. package/dist/esm/internal/channel.js +1 -3
  77. package/dist/esm/internal/channel.js.map +1 -1
  78. package/dist/esm/internal/core-effect.js.map +1 -1
  79. package/dist/esm/internal/effect/circular.js +3 -2
  80. package/dist/esm/internal/effect/circular.js.map +1 -1
  81. package/dist/esm/internal/fiberRuntime.js +6 -5
  82. package/dist/esm/internal/fiberRuntime.js.map +1 -1
  83. package/dist/esm/internal/layer.js.map +1 -1
  84. package/dist/esm/internal/reloadable.js.map +1 -1
  85. package/dist/esm/internal/schedule.js.map +1 -1
  86. package/dist/esm/internal/sink.js.map +1 -1
  87. package/dist/esm/internal/stm/stm.js.map +1 -1
  88. package/dist/esm/internal/stream.js.map +1 -1
  89. package/dist/esm/internal/version.js +1 -1
  90. package/package.json +1 -1
  91. package/src/Channel.ts +14 -17
  92. package/src/Chunk.ts +26 -5
  93. package/src/Effect.ts +43 -41
  94. package/src/Layer.ts +30 -39
  95. package/src/Match.ts +733 -49
  96. package/src/Reloadable.ts +17 -27
  97. package/src/STM.ts +10 -17
  98. package/src/Schedule.ts +2325 -653
  99. package/src/Schema.ts +5 -5
  100. package/src/Stream.ts +26 -33
  101. package/src/index.ts +25 -0
  102. package/src/internal/channel/channelExecutor.ts +5 -1
  103. package/src/internal/channel.ts +46 -42
  104. package/src/internal/core-effect.ts +84 -84
  105. package/src/internal/effect/circular.ts +3 -2
  106. package/src/internal/fiberRuntime.ts +7 -6
  107. package/src/internal/layer.ts +52 -52
  108. package/src/internal/reloadable.ts +25 -28
  109. package/src/internal/schedule.ts +29 -23
  110. package/src/internal/sink.ts +16 -15
  111. package/src/internal/stm/stm.ts +54 -46
  112. package/src/internal/stream.ts +100 -100
  113. package/src/internal/version.ts +1 -1
@@ -1,4 +1,4 @@
1
- let moduleVersion = "3.12.10";
1
+ let moduleVersion = "3.12.12";
2
2
  export const getCurrentVersion = () => moduleVersion;
3
3
  export const setCurrentVersion = version => {
4
4
  moduleVersion = version;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "effect",
3
- "version": "3.12.10",
3
+ "version": "3.12.12",
4
4
  "description": "The missing standard library for TypeScript, for writing production-grade software.",
5
5
  "license": "MIT",
6
6
  "repository": {
package/src/Channel.ts CHANGED
@@ -2456,12 +2456,9 @@ export const provideService: {
2456
2456
  * @since 2.0.0
2457
2457
  * @category context
2458
2458
  */
2459
- <T extends Context.Tag<any, any>>(
2460
- tag: T,
2461
- service: Context.Tag.Service<T>
2462
- ): <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
2459
+ <I, S>(tag: Context.Tag<I, S>, service: Types.NoInfer<S>): <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>(
2463
2460
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>
2464
- ) => Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Exclude<Env, Context.Tag.Identifier<T>>>
2461
+ ) => Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Exclude<Env, I>>
2465
2462
  /**
2466
2463
  * Provides the effect with the single service it requires. If the effect
2467
2464
  * requires more than one service use `provideContext` instead.
@@ -2469,11 +2466,11 @@ export const provideService: {
2469
2466
  * @since 2.0.0
2470
2467
  * @category context
2471
2468
  */
2472
- <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, T extends Context.Tag<any, any>>(
2469
+ <OutElem, InElem, OutErr, InErr, OutDone, InDone, Env, I, S>(
2473
2470
  self: Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>,
2474
- tag: T,
2475
- service: Context.Tag.Service<T>
2476
- ): Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Exclude<Env, Context.Tag.Identifier<T>>>
2471
+ tag: Context.Tag<I, S>,
2472
+ service: Types.NoInfer<S>
2473
+ ): Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Exclude<Env, I>>
2477
2474
  } = channel.provideService
2478
2475
 
2479
2476
  /**
@@ -2829,23 +2826,23 @@ export const updateService: {
2829
2826
  * @since 2.0.0
2830
2827
  * @category context
2831
2828
  */
2832
- <T extends Context.Tag<any, any>>(
2833
- tag: T,
2834
- f: (resource: Context.Tag.Service<T>) => Context.Tag.Service<T>
2829
+ <I, S>(
2830
+ tag: Context.Tag<I, S>,
2831
+ f: (resource: Types.NoInfer<S>) => Types.NoInfer<S>
2835
2832
  ): <OutElem, OutErr, InErr, OutDone, InDone, R>(
2836
2833
  self: Channel<OutElem, unknown, OutErr, InErr, OutDone, InDone, R>
2837
- ) => Channel<OutElem, unknown, OutErr, InErr, OutDone, InDone, T | R>
2834
+ ) => Channel<OutElem, unknown, OutErr, InErr, OutDone, InDone, I | R>
2838
2835
  /**
2839
2836
  * Updates a service in the context of this channel.
2840
2837
  *
2841
2838
  * @since 2.0.0
2842
2839
  * @category context
2843
2840
  */
2844
- <OutElem, OutErr, InErr, OutDone, InDone, R, T extends Context.Tag<any, any>>(
2841
+ <OutElem, OutErr, InErr, OutDone, InDone, R, I, S>(
2845
2842
  self: Channel<OutElem, unknown, OutErr, InErr, OutDone, InDone, R>,
2846
- tag: T,
2847
- f: (resource: Context.Tag.Service<T>) => Context.Tag.Service<T>
2848
- ): Channel<OutElem, unknown, OutErr, InErr, OutDone, InDone, R | T>
2843
+ tag: Context.Tag<I, S>,
2844
+ f: (resource: Types.NoInfer<S>) => Types.NoInfer<S>
2845
+ ): Channel<OutElem, unknown, OutErr, InErr, OutDone, InDone, I | R>
2849
2846
  } = channel.updateService
2850
2847
 
2851
2848
  /**
package/src/Chunk.ts CHANGED
@@ -1059,26 +1059,47 @@ export const flatMap: {
1059
1059
  })
1060
1060
 
1061
1061
  /**
1062
- * Applies the specified function to each element of the `List`.
1062
+ * Iterates over each element of a `Chunk` and applies a function to it.
1063
+ *
1064
+ * **Details**
1065
+ *
1066
+ * This function processes every element of the given `Chunk`, calling the
1067
+ * provided function `f` on each element. It does not return a new value;
1068
+ * instead, it is primarily used for side effects, such as logging or
1069
+ * accumulating data in an external variable.
1063
1070
  *
1064
1071
  * @since 2.0.0
1065
1072
  * @category combinators
1066
1073
  */
1067
1074
  export const forEach: {
1068
1075
  /**
1069
- * Applies the specified function to each element of the `List`.
1076
+ * Iterates over each element of a `Chunk` and applies a function to it.
1077
+ *
1078
+ * **Details**
1079
+ *
1080
+ * This function processes every element of the given `Chunk`, calling the
1081
+ * provided function `f` on each element. It does not return a new value;
1082
+ * instead, it is primarily used for side effects, such as logging or
1083
+ * accumulating data in an external variable.
1070
1084
  *
1071
1085
  * @since 2.0.0
1072
1086
  * @category combinators
1073
1087
  */
1074
- <A, B>(f: (a: A) => B): (self: Chunk<A>) => void
1088
+ <A, B>(f: (a: A, index: number) => B): (self: Chunk<A>) => void
1075
1089
  /**
1076
- * Applies the specified function to each element of the `List`.
1090
+ * Iterates over each element of a `Chunk` and applies a function to it.
1091
+ *
1092
+ * **Details**
1093
+ *
1094
+ * This function processes every element of the given `Chunk`, calling the
1095
+ * provided function `f` on each element. It does not return a new value;
1096
+ * instead, it is primarily used for side effects, such as logging or
1097
+ * accumulating data in an external variable.
1077
1098
  *
1078
1099
  * @since 2.0.0
1079
1100
  * @category combinators
1080
1101
  */
1081
- <A, B>(self: Chunk<A>, f: (a: A) => B): void
1102
+ <A, B>(self: Chunk<A>, f: (a: A, index: number) => B): void
1082
1103
  } = dual(2, <A, B>(self: Chunk<A>, f: (a: A) => B): void => toReadonlyArray(self).forEach(f))
1083
1104
 
1084
1105
  /**
package/src/Effect.ts CHANGED
@@ -15002,10 +15002,7 @@ export const provideService: {
15002
15002
  * @since 2.0.0
15003
15003
  * @category Context
15004
15004
  */
15005
- <T extends Context.Tag<any, any>>(
15006
- tag: T,
15007
- service: Context.Tag.Service<T>
15008
- ): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, Exclude<R, Context.Tag.Identifier<T>>>
15005
+ <I, S>(tag: Context.Tag<I, S>, service: NoInfer<S>): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, Exclude<R, I>>
15009
15006
  /**
15010
15007
  * Provides an implementation for a service in the context of an effect.
15011
15008
  *
@@ -15058,11 +15055,7 @@ export const provideService: {
15058
15055
  * @since 2.0.0
15059
15056
  * @category Context
15060
15057
  */
15061
- <A, E, R, T extends Context.Tag<any, any>>(
15062
- self: Effect<A, E, R>,
15063
- tag: T,
15064
- service: Context.Tag.Service<T>
15065
- ): Effect<A, E, Exclude<R, Context.Tag.Identifier<T>>>
15058
+ <A, E, R, I, S>(self: Effect<A, E, R>, tag: Context.Tag<I, S>, service: NoInfer<S>): Effect<A, E, Exclude<R, I>>
15066
15059
  } = effect.provideService
15067
15060
 
15068
15061
  /**
@@ -15102,10 +15095,10 @@ export const provideServiceEffect: {
15102
15095
  * @since 2.0.0
15103
15096
  * @category Context
15104
15097
  */
15105
- <T extends Context.Tag<any, any>, E1, R1>(
15106
- tag: T,
15107
- effect: Effect<Context.Tag.Service<T>, E1, R1>
15108
- ): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E1 | E, R1 | Exclude<R, Context.Tag.Identifier<T>>>
15098
+ <I, S, E1, R1>(
15099
+ tag: Context.Tag<I, S>,
15100
+ effect: Effect<NoInfer<S>, E1, R1>
15101
+ ): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E | E1, R1 | Exclude<R, I>>
15109
15102
  /**
15110
15103
  * Dynamically provides an implementation for a service using an effect.
15111
15104
  *
@@ -15124,11 +15117,11 @@ export const provideServiceEffect: {
15124
15117
  * @since 2.0.0
15125
15118
  * @category Context
15126
15119
  */
15127
- <A, E, R, T extends Context.Tag<any, any>, E1, R1>(
15120
+ <A, E, R, I, S, E1, R1>(
15128
15121
  self: Effect<A, E, R>,
15129
- tag: T,
15130
- effect: Effect<Context.Tag.Service<T>, E1, R1>
15131
- ): Effect<A, E | E1, R1 | Exclude<R, Context.Tag.Identifier<T>>>
15122
+ tag: Context.Tag<I, S>,
15123
+ effect: Effect<NoInfer<S>, E1, R1>
15124
+ ): Effect<A, E | E1, R1 | Exclude<R, I>>
15132
15125
  } = effect.provideServiceEffect
15133
15126
 
15134
15127
  /**
@@ -15279,10 +15272,10 @@ export const updateService: {
15279
15272
  * @since 2.0.0
15280
15273
  * @category Context
15281
15274
  */
15282
- <T extends Context.Tag<any, any>>(
15283
- tag: T,
15284
- f: (service: Context.Tag.Service<T>) => Context.Tag.Service<T>
15285
- ): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R | Context.Tag.Identifier<T>>
15275
+ <I, S>(
15276
+ tag: Context.Tag<I, S>,
15277
+ f: (service: NoInfer<S>) => NoInfer<S>
15278
+ ): <A, E, R>(self: Effect<A, E, R>) => Effect<A, E, R | I>
15286
15279
  /**
15287
15280
  * Updates a service in the context with a new implementation.
15288
15281
  *
@@ -15301,11 +15294,11 @@ export const updateService: {
15301
15294
  * @since 2.0.0
15302
15295
  * @category Context
15303
15296
  */
15304
- <A, E, R, T extends Context.Tag<any, any>>(
15297
+ <A, E, R, I, S>(
15305
15298
  self: Effect<A, E, R>,
15306
- tag: T,
15307
- f: (service: Context.Tag.Service<T>) => Context.Tag.Service<T>
15308
- ): Effect<A, E, R | Context.Tag.Identifier<T>>
15299
+ tag: Context.Tag<I, S>,
15300
+ f: (service: NoInfer<S>) => NoInfer<S>
15301
+ ): Effect<A, E, R | I>
15309
15302
  } = effect.updateService
15310
15303
 
15311
15304
  /**
@@ -27590,7 +27583,7 @@ export const fn:
27590
27583
  const errorDef = new Error()
27591
27584
  Error.stackTraceLimit = limit
27592
27585
  if (typeof nameOrBody !== "string") {
27593
- return function(this: any, ...args: Array<any>) {
27586
+ return defineLength(nameOrBody.length, function(this: any, ...args: Array<any>) {
27594
27587
  const limit = Error.stackTraceLimit
27595
27588
  Error.stackTraceLimit = 2
27596
27589
  const errorCall = new Error()
@@ -27607,12 +27600,12 @@ export const fn:
27607
27600
  errorDef,
27608
27601
  errorCall
27609
27602
  })
27610
- } as any
27603
+ }) as any
27611
27604
  }
27612
27605
  const name = nameOrBody
27613
27606
  const options = pipeables[0]
27614
- return (body: Function, ...pipeables: Array<any>) => {
27615
- return function(this: any, ...args: Array<any>) {
27607
+ return (body: Function, ...pipeables: Array<any>) =>
27608
+ defineLength(body.length, function(this: any, ...args: Array<any>) {
27616
27609
  const limit = Error.stackTraceLimit
27617
27610
  Error.stackTraceLimit = 2
27618
27611
  const errorCall = new Error()
@@ -27627,10 +27620,16 @@ export const fn:
27627
27620
  errorDef,
27628
27621
  errorCall
27629
27622
  })
27630
- }
27631
- }
27623
+ })
27632
27624
  }
27633
27625
 
27626
+ function defineLength<F extends Function>(length: number, fn: F) {
27627
+ return Object.defineProperty(fn, "length", {
27628
+ value: length,
27629
+ configurable: true
27630
+ })
27631
+ }
27632
+
27634
27633
  function fnApply(options: {
27635
27634
  readonly self: any
27636
27635
  readonly body: Function
@@ -27695,14 +27694,17 @@ function fnApply(options: {
27695
27694
  * @category Tracing
27696
27695
  */
27697
27696
  export const fnUntraced: fn.Gen = (body: Function, ...pipeables: Array<any>) =>
27698
- pipeables.length === 0
27699
- ? function(this: any, ...args: Array<any>) {
27700
- return core.fromIterator(() => body.apply(this, args))
27701
- }
27702
- : function(this: any, ...args: Array<any>) {
27703
- let effect = core.fromIterator(() => body.apply(this, args))
27704
- for (const x of pipeables) {
27705
- effect = x(effect)
27697
+ defineLength(
27698
+ body.length,
27699
+ pipeables.length === 0
27700
+ ? function(this: any, ...args: Array<any>) {
27701
+ return core.fromIterator(() => body.apply(this, args))
27706
27702
  }
27707
- return effect
27708
- }
27703
+ : function(this: any, ...args: Array<any>) {
27704
+ let effect = core.fromIterator(() => body.apply(this, args))
27705
+ for (const x of pipeables) {
27706
+ effect = x(effect)
27707
+ }
27708
+ return effect
27709
+ }
27710
+ )
package/src/Layer.ts CHANGED
@@ -352,19 +352,14 @@ export const effect: {
352
352
  * @since 2.0.0
353
353
  * @category constructors
354
354
  */
355
- <T extends Context.Tag<any, any>>(
356
- tag: T
357
- ): <E, R>(effect: Effect.Effect<Context.Tag.Service<T>, E, R>) => Layer<Context.Tag.Identifier<T>, E, R>
355
+ <I, S>(tag: Context.Tag<I, S>): <E, R>(effect: Effect.Effect<Types.NoInfer<S>, E, R>) => Layer<I, E, R>
358
356
  /**
359
357
  * Constructs a layer from the specified effect.
360
358
  *
361
359
  * @since 2.0.0
362
360
  * @category constructors
363
361
  */
364
- <T extends Context.Tag<any, any>, E, R>(
365
- tag: T,
366
- effect: Effect.Effect<Context.Tag.Service<T>, E, R>
367
- ): Layer<Context.Tag.Identifier<T>, E, R>
362
+ <I, S, E, R>(tag: Context.Tag<I, S>, effect: Effect.Effect<Types.NoInfer<S>, E, R>): Layer<I, E, R>
368
363
  } = internal.fromEffect
369
364
 
370
365
  /**
@@ -496,11 +491,11 @@ export const flatten: {
496
491
  */
497
492
  export const fresh: <A, E, R>(self: Layer<A, E, R>) => Layer<A, E, R> = internal.fresh
498
493
 
499
- const fromFunction: <A extends Context.Tag<any, any>, B extends Context.Tag<any, any>>(
500
- tagA: A,
501
- tagB: B,
502
- f: (a: Context.Tag.Service<A>) => Context.Tag.Service<B>
503
- ) => Layer<Context.Tag.Identifier<B>, never, Context.Tag.Identifier<A>> = internal.fromFunction
494
+ const fromFunction: <I1, S1, I2, S2>(
495
+ tagA: Context.Tag<I1, S1>,
496
+ tagB: Context.Tag<I2, S2>,
497
+ f: (a: Types.NoInfer<S1>) => Types.NoInfer<S2>
498
+ ) => Layer<I2, never, I1> = internal.fromFunction
504
499
 
505
500
  export {
506
501
  /**
@@ -762,11 +757,11 @@ export const project: {
762
757
  * @since 2.0.0
763
758
  * @category utils
764
759
  */
765
- <A extends Context.Tag<any, any>, B extends Context.Tag<any, any>>(
766
- tagA: A,
767
- tagB: B,
768
- f: (a: Context.Tag.Service<A>) => Context.Tag.Service<B>
769
- ): <RIn, E>(self: Layer<Context.Tag.Identifier<A>, E, RIn>) => Layer<Context.Tag.Identifier<B>, E, RIn>
760
+ <I1, S1, I2, S2>(
761
+ tagA: Context.Tag<I1, S1>,
762
+ tagB: Context.Tag<I2, S2>,
763
+ f: (a: Types.NoInfer<S1>) => Types.NoInfer<S2>
764
+ ): <RIn, E>(self: Layer<I1, E, RIn>) => Layer<I2, E, RIn>
770
765
  /**
771
766
  * Projects out part of one of the services output by this layer using the
772
767
  * specified function.
@@ -774,12 +769,12 @@ export const project: {
774
769
  * @since 2.0.0
775
770
  * @category utils
776
771
  */
777
- <RIn, E, A extends Context.Tag<any, any>, B extends Context.Tag<any, any>>(
778
- self: Layer<Context.Tag.Identifier<A>, E, RIn>,
779
- tagA: A,
780
- tagB: B,
781
- f: (a: Context.Tag.Service<A>) => Context.Tag.Service<B>
782
- ): Layer<Context.Tag.Identifier<B>, E, RIn>
772
+ <RIn, E, I1, S1, I2, S2>(
773
+ self: Layer<I1, E, RIn>,
774
+ tagA: Context.Tag<I1, S1>,
775
+ tagB: Context.Tag<I2, S2>,
776
+ f: (a: Types.NoInfer<S1>) => Types.NoInfer<S2>
777
+ ): Layer<I2, E, RIn>
783
778
  } = internal.project
784
779
 
785
780
  /**
@@ -903,19 +898,19 @@ export const scoped: {
903
898
  * @since 2.0.0
904
899
  * @category constructors
905
900
  */
906
- <T extends Context.Tag<any, any>>(tag: T): <E, R>(
907
- effect: Effect.Effect<Context.Tag.Service<T>, E, R>
908
- ) => Layer<Context.Tag.Identifier<T>, E, Exclude<R, Scope.Scope>>
901
+ <I, S>(
902
+ tag: Context.Tag<I, S>
903
+ ): <E, R>(effect: Effect.Effect<Types.NoInfer<S>, E, R>) => Layer<I, E, Exclude<R, Scope.Scope>>
909
904
  /**
910
905
  * Constructs a layer from the specified scoped effect.
911
906
  *
912
907
  * @since 2.0.0
913
908
  * @category constructors
914
909
  */
915
- <T extends Context.Tag<any, any>, E, R>(
916
- tag: T,
917
- effect: Effect.Effect<Context.Tag.Service<T>, E, R>
918
- ): Layer<Context.Tag.Identifier<T>, E, Exclude<R, Scope.Scope>>
910
+ <I, S, E, R>(
911
+ tag: Context.Tag<I, S>,
912
+ effect: Effect.Effect<Types.NoInfer<S>, E, R>
913
+ ): Layer<I, E, Exclude<R, Scope.Scope>>
919
914
  } = internal.scoped
920
915
 
921
916
  /**
@@ -945,9 +940,7 @@ export const scopedContext: <A, E, R>(
945
940
  * @since 2.0.0
946
941
  * @category constructors
947
942
  */
948
- export const service: <T extends Context.Tag<any, any>>(
949
- tag: T
950
- ) => Layer<Context.Tag.Identifier<T>, never, Context.Tag.Identifier<T>> = internal.service
943
+ export const service: <I, S>(tag: Context.Tag<I, S>) => Layer<I, never, I> = internal.service
951
944
 
952
945
  /**
953
946
  * Constructs a layer from the specified value.
@@ -962,14 +955,14 @@ export const succeed: {
962
955
  * @since 2.0.0
963
956
  * @category constructors
964
957
  */
965
- <T extends Context.Tag<any, any>>(tag: T): (resource: Context.Tag.Service<T>) => Layer<Context.Tag.Identifier<T>>
958
+ <I, S>(tag: Context.Tag<I, S>): (resource: Types.NoInfer<S>) => Layer<I>
966
959
  /**
967
960
  * Constructs a layer from the specified value.
968
961
  *
969
962
  * @since 2.0.0
970
963
  * @category constructors
971
964
  */
972
- <T extends Context.Tag<any, any>>(tag: T, resource: Context.Tag.Service<T>): Layer<Context.Tag.Identifier<T>>
965
+ <I, S>(tag: Context.Tag<I, S>, resource: Types.NoInfer<S>): Layer<I>
973
966
  } = internal.succeed
974
967
 
975
968
  /**
@@ -1003,16 +996,14 @@ export const sync: {
1003
996
  * @since 2.0.0
1004
997
  * @category constructors
1005
998
  */
1006
- <T extends Context.Tag<any, any>>(
1007
- tag: T
1008
- ): (evaluate: LazyArg<Context.Tag.Service<T>>) => Layer<Context.Tag.Identifier<T>>
999
+ <I, S>(tag: Context.Tag<I, S>): (evaluate: LazyArg<Types.NoInfer<S>>) => Layer<I>
1009
1000
  /**
1010
1001
  * Lazily constructs a layer from the specified value.
1011
1002
  *
1012
1003
  * @since 2.0.0
1013
1004
  * @category constructors
1014
1005
  */
1015
- <T extends Context.Tag<any, any>>(tag: T, evaluate: LazyArg<Context.Tag.Service<T>>): Layer<Context.Tag.Identifier<T>>
1006
+ <I, S>(tag: Context.Tag<I, S>, evaluate: LazyArg<Types.NoInfer<S>>): Layer<I>
1016
1007
  } = internal.sync
1017
1008
 
1018
1009
  /**