effect 4.0.0-beta.64 → 4.0.0-beta.66

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 (252) hide show
  1. package/dist/Cause.d.ts +4 -4
  2. package/dist/Cause.d.ts.map +1 -1
  3. package/dist/Config.d.ts +1 -2
  4. package/dist/Config.d.ts.map +1 -1
  5. package/dist/Config.js +7 -6
  6. package/dist/Config.js.map +1 -1
  7. package/dist/Context.d.ts +3 -4
  8. package/dist/Context.d.ts.map +1 -1
  9. package/dist/Context.js +10 -8
  10. package/dist/Context.js.map +1 -1
  11. package/dist/DateTime.d.ts +1 -1
  12. package/dist/DateTime.d.ts.map +1 -1
  13. package/dist/DateTime.js +2 -2
  14. package/dist/DateTime.js.map +1 -1
  15. package/dist/Effect.d.ts +337 -412
  16. package/dist/Effect.d.ts.map +1 -1
  17. package/dist/Effect.js +5 -32
  18. package/dist/Effect.js.map +1 -1
  19. package/dist/Effectable.d.ts +1 -1
  20. package/dist/Effectable.d.ts.map +1 -1
  21. package/dist/Effectable.js +1 -1
  22. package/dist/Effectable.js.map +1 -1
  23. package/dist/ExecutionPlan.d.ts +2 -3
  24. package/dist/ExecutionPlan.d.ts.map +1 -1
  25. package/dist/ExecutionPlan.js +1 -1
  26. package/dist/ExecutionPlan.js.map +1 -1
  27. package/dist/FiberHandle.d.ts +2 -2
  28. package/dist/FiberHandle.js +2 -2
  29. package/dist/FiberMap.d.ts +2 -2
  30. package/dist/FiberMap.js +2 -2
  31. package/dist/FiberSet.d.ts +1 -1
  32. package/dist/FiberSet.js +1 -1
  33. package/dist/Layer.js +1 -1
  34. package/dist/Layer.js.map +1 -1
  35. package/dist/LayerMap.d.ts.map +1 -1
  36. package/dist/LayerMap.js +3 -3
  37. package/dist/LayerMap.js.map +1 -1
  38. package/dist/ManagedRuntime.d.ts +1 -1
  39. package/dist/ManagedRuntime.js +1 -1
  40. package/dist/Option.d.ts +11 -7
  41. package/dist/Option.d.ts.map +1 -1
  42. package/dist/Option.js +74 -0
  43. package/dist/Option.js.map +1 -1
  44. package/dist/Result.d.ts +11 -3
  45. package/dist/Result.d.ts.map +1 -1
  46. package/dist/Result.js.map +1 -1
  47. package/dist/Schedule.js +1 -1
  48. package/dist/Schedule.js.map +1 -1
  49. package/dist/Schema.d.ts +12 -12
  50. package/dist/Schema.d.ts.map +1 -1
  51. package/dist/Schema.js +6 -4
  52. package/dist/Schema.js.map +1 -1
  53. package/dist/SchemaGetter.js +2 -2
  54. package/dist/SchemaGetter.js.map +1 -1
  55. package/dist/SchemaRepresentation.d.ts +2 -2
  56. package/dist/Stream.d.ts +3 -3
  57. package/dist/Stream.js +1 -1
  58. package/dist/TxRef.js +1 -1
  59. package/dist/TxRef.js.map +1 -1
  60. package/dist/internal/concurrency.js +2 -2
  61. package/dist/internal/concurrency.js.map +1 -1
  62. package/dist/internal/core.js +8 -20
  63. package/dist/internal/core.js.map +1 -1
  64. package/dist/internal/effect.js +20 -19
  65. package/dist/internal/effect.js.map +1 -1
  66. package/dist/internal/executionPlan.js +2 -2
  67. package/dist/internal/executionPlan.js.map +1 -1
  68. package/dist/internal/option.js +5 -8
  69. package/dist/internal/option.js.map +1 -1
  70. package/dist/internal/result.js +5 -8
  71. package/dist/internal/result.js.map +1 -1
  72. package/dist/unstable/ai/LanguageModel.d.ts +5 -5
  73. package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
  74. package/dist/unstable/ai/LanguageModel.js +1 -1
  75. package/dist/unstable/ai/LanguageModel.js.map +1 -1
  76. package/dist/unstable/ai/McpServer.js +2 -2
  77. package/dist/unstable/ai/McpServer.js.map +1 -1
  78. package/dist/unstable/ai/Model.d.ts +5 -1
  79. package/dist/unstable/ai/Model.d.ts.map +1 -1
  80. package/dist/unstable/ai/Model.js +4 -4
  81. package/dist/unstable/ai/Model.js.map +1 -1
  82. package/dist/unstable/ai/Toolkit.d.ts +1 -3
  83. package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
  84. package/dist/unstable/ai/Toolkit.js +28 -31
  85. package/dist/unstable/ai/Toolkit.js.map +1 -1
  86. package/dist/unstable/cli/Command.d.ts +25 -5
  87. package/dist/unstable/cli/Command.d.ts.map +1 -1
  88. package/dist/unstable/cli/Command.js.map +1 -1
  89. package/dist/unstable/cli/GlobalFlag.d.ts +1 -1
  90. package/dist/unstable/cli/GlobalFlag.d.ts.map +1 -1
  91. package/dist/unstable/cli/Param.js +1 -1
  92. package/dist/unstable/cli/Param.js.map +1 -1
  93. package/dist/unstable/cli/Prompt.d.ts +1 -2
  94. package/dist/unstable/cli/Prompt.d.ts.map +1 -1
  95. package/dist/unstable/cli/Prompt.js +8 -10
  96. package/dist/unstable/cli/Prompt.js.map +1 -1
  97. package/dist/unstable/cli/internal/command.d.ts +2 -6
  98. package/dist/unstable/cli/internal/command.d.ts.map +1 -1
  99. package/dist/unstable/cli/internal/command.js +7 -9
  100. package/dist/unstable/cli/internal/command.js.map +1 -1
  101. package/dist/unstable/cluster/ClusterWorkflowEngine.js +1 -1
  102. package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
  103. package/dist/unstable/cluster/Entity.js +3 -3
  104. package/dist/unstable/cluster/Entity.js.map +1 -1
  105. package/dist/unstable/cluster/MessageStorage.js +1 -1
  106. package/dist/unstable/cluster/MessageStorage.js.map +1 -1
  107. package/dist/unstable/cluster/ShardingConfig.js +1 -1
  108. package/dist/unstable/cluster/ShardingConfig.js.map +1 -1
  109. package/dist/unstable/eventlog/EventLogMessage.d.ts +4 -4
  110. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js +2 -1
  111. package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js.map +1 -1
  112. package/dist/unstable/http/HttpBody.js +2 -2
  113. package/dist/unstable/http/HttpBody.js.map +1 -1
  114. package/dist/unstable/http/HttpClient.js +1 -1
  115. package/dist/unstable/http/HttpClient.js.map +1 -1
  116. package/dist/unstable/http/HttpClientRequest.js +2 -2
  117. package/dist/unstable/http/HttpClientRequest.js.map +1 -1
  118. package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
  119. package/dist/unstable/http/HttpMiddleware.js +18 -21
  120. package/dist/unstable/http/HttpMiddleware.js.map +1 -1
  121. package/dist/unstable/http/HttpPlatform.js +1 -1
  122. package/dist/unstable/http/HttpPlatform.js.map +1 -1
  123. package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
  124. package/dist/unstable/http/HttpRouter.js +4 -4
  125. package/dist/unstable/http/HttpRouter.js.map +1 -1
  126. package/dist/unstable/http/HttpServer.js +1 -1
  127. package/dist/unstable/http/HttpServer.js.map +1 -1
  128. package/dist/unstable/http/HttpServerRequest.js +11 -11
  129. package/dist/unstable/http/HttpServerRequest.js.map +1 -1
  130. package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
  131. package/dist/unstable/http/HttpServerResponse.js +5 -5
  132. package/dist/unstable/http/HttpServerResponse.js.map +1 -1
  133. package/dist/unstable/http/Multipart.js +1 -1
  134. package/dist/unstable/http/Multipart.js.map +1 -1
  135. package/dist/unstable/httpapi/HttpApiBuilder.js +3 -3
  136. package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
  137. package/dist/unstable/httpapi/HttpApiClient.js +1 -1
  138. package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
  139. package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +2 -0
  140. package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
  141. package/dist/unstable/httpapi/HttpApiMiddleware.js +2 -1
  142. package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
  143. package/dist/unstable/httpapi/HttpApiTest.d.ts +3 -1
  144. package/dist/unstable/httpapi/HttpApiTest.d.ts.map +1 -1
  145. package/dist/unstable/httpapi/HttpApiTest.js +2 -2
  146. package/dist/unstable/httpapi/HttpApiTest.js.map +1 -1
  147. package/dist/unstable/persistence/RateLimiter.js +1 -1
  148. package/dist/unstable/persistence/RateLimiter.js.map +1 -1
  149. package/dist/unstable/process/ChildProcess.d.ts +2 -45
  150. package/dist/unstable/process/ChildProcess.d.ts.map +1 -1
  151. package/dist/unstable/process/ChildProcess.js +51 -7
  152. package/dist/unstable/process/ChildProcess.js.map +1 -1
  153. package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
  154. package/dist/unstable/reactivity/Atom.js +4 -4
  155. package/dist/unstable/reactivity/Atom.js.map +1 -1
  156. package/dist/unstable/rpc/RpcClient.js +1 -1
  157. package/dist/unstable/rpc/RpcClient.js.map +1 -1
  158. package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
  159. package/dist/unstable/rpc/RpcServer.js +1 -1
  160. package/dist/unstable/rpc/RpcServer.js.map +1 -1
  161. package/dist/unstable/rpc/RpcWorker.js +1 -1
  162. package/dist/unstable/rpc/RpcWorker.js.map +1 -1
  163. package/dist/unstable/socket/Socket.d.ts.map +1 -1
  164. package/dist/unstable/socket/Socket.js +1 -1
  165. package/dist/unstable/socket/Socket.js.map +1 -1
  166. package/dist/unstable/sql/Migrator.d.ts.map +1 -1
  167. package/dist/unstable/sql/Migrator.js +3 -2
  168. package/dist/unstable/sql/Migrator.js.map +1 -1
  169. package/dist/unstable/sql/SqlError.d.ts +23 -3
  170. package/dist/unstable/sql/SqlError.d.ts.map +1 -1
  171. package/dist/unstable/sql/SqlError.js +62 -2
  172. package/dist/unstable/sql/SqlError.js.map +1 -1
  173. package/dist/unstable/workflow/Activity.js +1 -1
  174. package/dist/unstable/workflow/Activity.js.map +1 -1
  175. package/dist/unstable/workflow/DurableQueue.d.ts +122 -0
  176. package/dist/unstable/workflow/DurableQueue.d.ts.map +1 -0
  177. package/dist/unstable/workflow/DurableQueue.js +182 -0
  178. package/dist/unstable/workflow/DurableQueue.js.map +1 -0
  179. package/dist/unstable/workflow/Workflow.js +1 -1
  180. package/dist/unstable/workflow/Workflow.js.map +1 -1
  181. package/dist/unstable/workflow/index.d.ts +4 -0
  182. package/dist/unstable/workflow/index.d.ts.map +1 -1
  183. package/dist/unstable/workflow/index.js +4 -0
  184. package/dist/unstable/workflow/index.js.map +1 -1
  185. package/package.json +1 -1
  186. package/src/Cause.ts +4 -4
  187. package/src/Config.ts +8 -8
  188. package/src/Context.ts +13 -14
  189. package/src/DateTime.ts +2 -2
  190. package/src/Effect.ts +340 -431
  191. package/src/Effectable.ts +2 -2
  192. package/src/ExecutionPlan.ts +3 -4
  193. package/src/FiberHandle.ts +2 -2
  194. package/src/FiberMap.ts +2 -2
  195. package/src/FiberSet.ts +1 -1
  196. package/src/Layer.ts +1 -1
  197. package/src/LayerMap.ts +3 -4
  198. package/src/ManagedRuntime.ts +1 -1
  199. package/src/Option.ts +14 -7
  200. package/src/Result.ts +14 -3
  201. package/src/Schedule.ts +1 -1
  202. package/src/Schema.ts +26 -24
  203. package/src/SchemaGetter.ts +3 -3
  204. package/src/Stream.ts +4 -4
  205. package/src/TxRef.ts +1 -1
  206. package/src/internal/concurrency.ts +2 -2
  207. package/src/internal/core.ts +12 -23
  208. package/src/internal/effect.ts +25 -29
  209. package/src/internal/executionPlan.ts +2 -2
  210. package/src/internal/option.ts +5 -8
  211. package/src/internal/result.ts +5 -8
  212. package/src/unstable/ai/LanguageModel.ts +12 -19
  213. package/src/unstable/ai/McpServer.ts +2 -2
  214. package/src/unstable/ai/Model.ts +15 -12
  215. package/src/unstable/ai/Toolkit.ts +30 -38
  216. package/src/unstable/cli/Command.ts +32 -13
  217. package/src/unstable/cli/GlobalFlag.ts +1 -1
  218. package/src/unstable/cli/Param.ts +1 -1
  219. package/src/unstable/cli/Prompt.ts +9 -13
  220. package/src/unstable/cli/internal/command.ts +12 -14
  221. package/src/unstable/cluster/ClusterWorkflowEngine.ts +1 -1
  222. package/src/unstable/cluster/Entity.ts +3 -3
  223. package/src/unstable/cluster/MessageStorage.ts +1 -1
  224. package/src/unstable/cluster/ShardingConfig.ts +1 -1
  225. package/src/unstable/eventlog/SqlEventLogServerUnencrypted.ts +4 -1
  226. package/src/unstable/http/HttpBody.ts +2 -2
  227. package/src/unstable/http/HttpClient.ts +1 -1
  228. package/src/unstable/http/HttpClientRequest.ts +2 -2
  229. package/src/unstable/http/HttpMiddleware.ts +4 -5
  230. package/src/unstable/http/HttpPlatform.ts +1 -1
  231. package/src/unstable/http/HttpRouter.ts +4 -5
  232. package/src/unstable/http/HttpServer.ts +1 -1
  233. package/src/unstable/http/HttpServerRequest.ts +11 -11
  234. package/src/unstable/http/HttpServerResponse.ts +5 -5
  235. package/src/unstable/http/Multipart.ts +1 -1
  236. package/src/unstable/httpapi/HttpApiBuilder.ts +4 -4
  237. package/src/unstable/httpapi/HttpApiClient.ts +1 -1
  238. package/src/unstable/httpapi/HttpApiMiddleware.ts +2 -1
  239. package/src/unstable/httpapi/HttpApiTest.ts +5 -2
  240. package/src/unstable/persistence/RateLimiter.ts +1 -1
  241. package/src/unstable/process/ChildProcess.ts +11 -14
  242. package/src/unstable/reactivity/Atom.ts +4 -4
  243. package/src/unstable/rpc/RpcClient.ts +1 -1
  244. package/src/unstable/rpc/RpcServer.ts +1 -2
  245. package/src/unstable/rpc/RpcWorker.ts +2 -2
  246. package/src/unstable/socket/Socket.ts +1 -1
  247. package/src/unstable/sql/Migrator.ts +5 -2
  248. package/src/unstable/sql/SqlError.ts +72 -1
  249. package/src/unstable/workflow/Activity.ts +1 -1
  250. package/src/unstable/workflow/DurableQueue.ts +343 -0
  251. package/src/unstable/workflow/Workflow.ts +1 -1
  252. package/src/unstable/workflow/index.ts +5 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "effect",
3
3
  "type": "module",
4
- "version": "4.0.0-beta.64",
4
+ "version": "4.0.0-beta.66",
5
5
  "license": "MIT",
6
6
  "description": "The missing standard library for TypeScript, for writing production-grade software.",
7
7
  "homepage": "https://effect.website",
package/src/Cause.ts CHANGED
@@ -1161,7 +1161,7 @@ export const pretty: <E>(cause: Cause<E>) => string = effect.causePretty
1161
1161
  /**
1162
1162
  * Base interface for error classes that can be yielded directly inside
1163
1163
  * `Effect.gen` (via `Symbol.iterator`) or converted to a failing Effect
1164
- * via `.asEffect()`.
1164
+ * via ``.
1165
1165
  *
1166
1166
  * All built-in error classes in this module ({@link NoSuchElementError},
1167
1167
  * {@link TimeoutError}, {@link IllegalArgumentError},
@@ -1183,9 +1183,9 @@ export const pretty: <E>(cause: Cause<E>) => string = effect.causePretty
1183
1183
  * @since 2.0.0
1184
1184
  * @category errors
1185
1185
  */
1186
- export interface YieldableError extends Error, Pipeable {
1187
- [Symbol.iterator](): Effect.EffectIterator<this>
1188
- asEffect(): Effect.Effect<never, this, never>
1186
+ export interface YieldableError extends Error, Pipeable, Inspectable {
1187
+ readonly [Effect.TypeId]: Effect.Variance<never, this, never>
1188
+ [Symbol.iterator](): Effect.EffectIterator<Effect.Effect<never, this, never>>
1189
1189
  }
1190
1190
 
1191
1191
  /**
package/src/Config.ts CHANGED
@@ -74,11 +74,10 @@
74
74
  import type { Path, SourceError } from "./ConfigProvider.ts"
75
75
  import * as ConfigProvider from "./ConfigProvider.ts"
76
76
  import * as Effect from "./Effect.ts"
77
+ import * as Effectable from "./Effectable.ts"
77
78
  import { dual } from "./Function.ts"
78
- import { PipeInspectableProto, YieldableProto } from "./internal/core.ts"
79
79
  import * as LogLevel_ from "./LogLevel.ts"
80
80
  import * as Option from "./Option.ts"
81
- import type { Pipeable } from "./Pipeable.ts"
82
81
  import * as Predicate from "./Predicate.ts"
83
82
  import * as Rec from "./Record.ts"
84
83
  import * as Schema from "./Schema.ts"
@@ -159,18 +158,19 @@ export class ConfigError {
159
158
  *
160
159
  * @since 4.0.0
161
160
  */
162
- export interface Config<out T> extends Pipeable, Effect.Yieldable<Config<T>, T, ConfigError> {
161
+ export interface Config<out T> extends Effect.Effect<T, ConfigError> {
163
162
  readonly [TypeId]: typeof TypeId
164
163
  readonly parse: (provider: ConfigProvider.ConfigProvider) => Effect.Effect<T, ConfigError>
165
164
  }
166
165
 
167
166
  const Proto = {
168
- ...PipeInspectableProto,
169
- ...YieldableProto,
167
+ ...Effectable.Prototype<Config<any>>({
168
+ label: "Config",
169
+ evaluate(fiber) {
170
+ return this.parse(fiber.getRef(ConfigProvider.ConfigProvider))
171
+ }
172
+ }),
170
173
  [TypeId]: TypeId,
171
- asEffect(this: Config<unknown>) {
172
- return Effect.flatMap(ConfigProvider.ConfigProvider.asEffect(), (provider) => this.parse(provider))
173
- },
174
174
  toJSON(this: Config<unknown>) {
175
175
  return {
176
176
  _id: "Config"
package/src/Context.ts CHANGED
@@ -10,12 +10,13 @@
10
10
  *
11
11
  * @since 4.0.0
12
12
  */
13
- import type { Effect, EffectIterator, Yieldable } from "./Effect.ts"
13
+ import type { Effect, EffectIterator } from "./Effect.ts"
14
+ import * as Effectable from "./Effectable.ts"
14
15
  import * as Equal from "./Equal.ts"
15
- import { constant, dual, type LazyArg } from "./Function.ts"
16
+ import { dual, type LazyArg } from "./Function.ts"
16
17
  import * as Hash from "./Hash.ts"
17
18
  import type { Inspectable } from "./Inspectable.ts"
18
- import { exitSucceed, PipeInspectableProto, withFiber, YieldableProto } from "./internal/core.ts"
19
+ import { exitSucceed, PipeInspectableProto, withFiber } from "./internal/core.ts"
19
20
  import type { ErrorWithStackTraceLimit } from "./internal/tracer.ts"
20
21
  import * as Option from "./Option.ts"
21
22
  import type { Pipeable } from "./Pipeable.ts"
@@ -40,13 +41,12 @@ export const ServiceTypeId: ServiceTypeId = "~effect/Context/Service"
40
41
  * @since 4.0.0
41
42
  * @category Models
42
43
  */
43
- export interface Key<out Identifier, out Shape> extends Pipeable, Inspectable {
44
+ export interface Key<out Identifier, out Shape> extends Effect<Shape, never, Identifier> {
44
45
  readonly [ServiceTypeId]: ServiceTypeId
45
46
  readonly Service: Shape
46
47
  readonly Identifier: Identifier
47
48
  readonly key: string
48
49
  readonly stack?: string | undefined
49
- asEffect(): Effect<Shape, never, Identifier>
50
50
  }
51
51
 
52
52
  /**
@@ -66,9 +66,7 @@ export interface Key<out Identifier, out Shape> extends Pipeable, Inspectable {
66
66
  * @since 4.0.0
67
67
  * @category Models
68
68
  */
69
- export interface Service<in out Identifier, in out Shape>
70
- extends Key<Identifier, Shape>, Yieldable<Service<Identifier, Shape>, Shape, never, Identifier>
71
- {
69
+ export interface Service<in out Identifier, in out Shape> extends Key<Identifier, Shape> {
72
70
  of(this: void, self: Shape): Shape
73
71
  context(self: Shape): Context<Identifier>
74
72
  use<A, E, R>(f: (service: Shape) => Effect<A, E, R>): Effect<A, E, R | Identifier>
@@ -244,6 +242,7 @@ export const Service: {
244
242
  function KeyClass() {}
245
243
  const self = KeyClass as any as Types.Mutable<Reference<any>>
246
244
  Object.setPrototypeOf(self, ServiceProto)
245
+ // @effect-diagnostics-next-line floatingEffect:off
247
246
  Object.defineProperty(self, "stack", {
248
247
  get() {
249
248
  return err.stack
@@ -270,8 +269,12 @@ export const Service: {
270
269
 
271
270
  const ServiceProto: any = {
272
271
  [ServiceTypeId]: ServiceTypeId,
273
- ...PipeInspectableProto,
274
- ...YieldableProto,
272
+ ...Effectable.Prototype<Service<never, any>>({
273
+ label: "Service",
274
+ evaluate(fiber) {
275
+ return exitSucceed(get(fiber.context, this))
276
+ }
277
+ }),
275
278
  toJSON<I, A>(this: Service<I, A>) {
276
279
  return {
277
280
  _id: "Service",
@@ -279,10 +282,6 @@ const ServiceProto: any = {
279
282
  stack: this.stack
280
283
  }
281
284
  },
282
- asEffect(this: any) {
283
- const fn = this.asEffect = constant(withFiber((fiber) => exitSucceed(get(fiber.context, this))))
284
- return fn()
285
- },
286
285
  of<Service>(this: void, self: Service): Service {
287
286
  return self
288
287
  },
package/src/DateTime.ts CHANGED
@@ -2164,7 +2164,7 @@ export const setPartsUtc: {
2164
2164
  *
2165
2165
  * const program = Effect.gen(function*() {
2166
2166
  * // Access the current time zone service
2167
- * const zone = yield* DateTime.CurrentTimeZone.asEffect()
2167
+ * const zone = yield* DateTime.CurrentTimeZone
2168
2168
  * console.log(DateTime.zoneToString(zone))
2169
2169
  * })
2170
2170
  *
@@ -2199,7 +2199,7 @@ export class CurrentTimeZone extends Context.Service<CurrentTimeZone, TimeZone>(
2199
2199
  * ```
2200
2200
  */
2201
2201
  export const setZoneCurrent = (self: DateTime): Effect.Effect<Zoned, never, CurrentTimeZone> =>
2202
- Effect.map(CurrentTimeZone.asEffect(), (zone) => setZone(self, zone))
2202
+ Effect.map(CurrentTimeZone, (zone) => setZone(self, zone))
2203
2203
 
2204
2204
  /**
2205
2205
  * Provide the `CurrentTimeZone` to an effect.