effect 4.0.0-beta.85 → 4.0.0-beta.87

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 (263) hide show
  1. package/dist/ChannelSchema.d.ts +8 -8
  2. package/dist/ChannelSchema.d.ts.map +1 -1
  3. package/dist/Config.d.ts +2 -2
  4. package/dist/Config.d.ts.map +1 -1
  5. package/dist/Config.js +10 -3
  6. package/dist/Config.js.map +1 -1
  7. package/dist/Cron.d.ts.map +1 -1
  8. package/dist/Cron.js +4 -0
  9. package/dist/Cron.js.map +1 -1
  10. package/dist/Schema.d.ts +749 -393
  11. package/dist/Schema.d.ts.map +1 -1
  12. package/dist/Schema.js +95 -65
  13. package/dist/Schema.js.map +1 -1
  14. package/dist/SchemaAST.d.ts.map +1 -1
  15. package/dist/SchemaAST.js +20 -29
  16. package/dist/SchemaAST.js.map +1 -1
  17. package/dist/SchemaParser.d.ts +24 -24
  18. package/dist/SchemaParser.d.ts.map +1 -1
  19. package/dist/SchemaParser.js +43 -39
  20. package/dist/SchemaParser.js.map +1 -1
  21. package/dist/SchemaRepresentation.d.ts +300 -300
  22. package/dist/SchemaTransformation.d.ts +2 -2
  23. package/dist/SchemaTransformation.d.ts.map +1 -1
  24. package/dist/SchemaTransformation.js +5 -8
  25. package/dist/SchemaTransformation.js.map +1 -1
  26. package/dist/internal/effect.js +6 -7
  27. package/dist/internal/effect.js.map +1 -1
  28. package/dist/internal/matcher.js +0 -2
  29. package/dist/internal/matcher.js.map +1 -1
  30. package/dist/internal/schema/representation.js +1 -5
  31. package/dist/internal/schema/representation.js.map +1 -1
  32. package/dist/internal/schema/schema.js.map +1 -1
  33. package/dist/testing/TestSchema.d.ts +9 -9
  34. package/dist/testing/TestSchema.d.ts.map +1 -1
  35. package/dist/testing/TestSchema.js +3 -2
  36. package/dist/testing/TestSchema.js.map +1 -1
  37. package/dist/unstable/ai/AnthropicStructuredOutput.d.ts +2 -2
  38. package/dist/unstable/ai/AnthropicStructuredOutput.d.ts.map +1 -1
  39. package/dist/unstable/ai/AnthropicStructuredOutput.js.map +1 -1
  40. package/dist/unstable/ai/Chat.d.ts +1 -1
  41. package/dist/unstable/ai/Chat.d.ts.map +1 -1
  42. package/dist/unstable/ai/LanguageModel.d.ts +4 -4
  43. package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
  44. package/dist/unstable/ai/McpSchema.d.ts +13 -6
  45. package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
  46. package/dist/unstable/ai/McpSchema.js.map +1 -1
  47. package/dist/unstable/ai/McpServer.d.ts +4 -4
  48. package/dist/unstable/ai/McpServer.d.ts.map +1 -1
  49. package/dist/unstable/ai/McpServer.js.map +1 -1
  50. package/dist/unstable/ai/OpenAiStructuredOutput.d.ts +2 -2
  51. package/dist/unstable/ai/OpenAiStructuredOutput.d.ts.map +1 -1
  52. package/dist/unstable/ai/OpenAiStructuredOutput.js.map +1 -1
  53. package/dist/unstable/ai/Response.d.ts +2 -2
  54. package/dist/unstable/ai/Response.d.ts.map +1 -1
  55. package/dist/unstable/ai/Response.js.map +1 -1
  56. package/dist/unstable/ai/Tool.d.ts +26 -26
  57. package/dist/unstable/ai/Tool.d.ts.map +1 -1
  58. package/dist/unstable/ai/Tool.js.map +1 -1
  59. package/dist/unstable/cli/Argument.d.ts +8 -7
  60. package/dist/unstable/cli/Argument.d.ts.map +1 -1
  61. package/dist/unstable/cli/Argument.js.map +1 -1
  62. package/dist/unstable/cli/Flag.d.ts +8 -7
  63. package/dist/unstable/cli/Flag.d.ts.map +1 -1
  64. package/dist/unstable/cli/Flag.js.map +1 -1
  65. package/dist/unstable/cli/Param.d.ts +1806 -168
  66. package/dist/unstable/cli/Param.d.ts.map +1 -1
  67. package/dist/unstable/cli/Param.js +0 -70
  68. package/dist/unstable/cli/Param.js.map +1 -1
  69. package/dist/unstable/cli/Primitive.d.ts +3 -4
  70. package/dist/unstable/cli/Primitive.d.ts.map +1 -1
  71. package/dist/unstable/cli/Primitive.js.map +1 -1
  72. package/dist/unstable/cli/internal/ansi.d.ts.map +1 -1
  73. package/dist/unstable/cli/internal/ansi.js +0 -22
  74. package/dist/unstable/cli/internal/ansi.js.map +1 -1
  75. package/dist/unstable/cli/internal/config.d.ts +48 -0
  76. package/dist/unstable/cli/internal/config.d.ts.map +1 -1
  77. package/dist/unstable/cli/internal/config.js +0 -6
  78. package/dist/unstable/cli/internal/config.js.map +1 -1
  79. package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts +3 -3
  80. package/dist/unstable/cluster/Reply.d.ts +2 -2
  81. package/dist/unstable/cluster/Reply.d.ts.map +1 -1
  82. package/dist/unstable/cluster/Reply.js.map +1 -1
  83. package/dist/unstable/devtools/DevToolsSchema.js.map +1 -1
  84. package/dist/unstable/encoding/Msgpack.d.ts +6 -6
  85. package/dist/unstable/encoding/Msgpack.d.ts.map +1 -1
  86. package/dist/unstable/encoding/Msgpack.js.map +1 -1
  87. package/dist/unstable/encoding/Ndjson.d.ts +8 -8
  88. package/dist/unstable/encoding/Ndjson.d.ts.map +1 -1
  89. package/dist/unstable/encoding/Sse.d.ts +1 -1
  90. package/dist/unstable/encoding/Sse.d.ts.map +1 -1
  91. package/dist/unstable/encoding/Sse.js.map +1 -1
  92. package/dist/unstable/eventlog/EventLogMessage.d.ts +22 -22
  93. package/dist/unstable/eventlog/EventLogMessage.d.ts.map +1 -1
  94. package/dist/unstable/eventlog/EventLogRemote.d.ts +15 -15
  95. package/dist/unstable/http/HttpBody.d.ts +1 -1
  96. package/dist/unstable/http/HttpBody.d.ts.map +1 -1
  97. package/dist/unstable/http/HttpClientRequest.d.ts +1 -1
  98. package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
  99. package/dist/unstable/http/HttpIncomingMessage.d.ts +1 -1
  100. package/dist/unstable/http/HttpIncomingMessage.d.ts.map +1 -1
  101. package/dist/unstable/http/HttpIncomingMessage.js.map +1 -1
  102. package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
  103. package/dist/unstable/http/HttpMiddleware.js +12 -3
  104. package/dist/unstable/http/HttpMiddleware.js.map +1 -1
  105. package/dist/unstable/httpapi/HttpApi.d.ts +1 -1
  106. package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
  107. package/dist/unstable/httpapi/HttpApiClient.d.ts +2 -2
  108. package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
  109. package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
  110. package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +32 -32
  111. package/dist/unstable/httpapi/HttpApiEndpoint.d.ts.map +1 -1
  112. package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
  113. package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +1 -1
  114. package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
  115. package/dist/unstable/httpapi/HttpApiSchema.d.ts +13 -6
  116. package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
  117. package/dist/unstable/httpapi/HttpApiSchema.js +0 -13
  118. package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
  119. package/dist/unstable/httpapi/OpenApi.js.map +1 -1
  120. package/dist/unstable/observability/internal/otlpProtobuf.js +0 -68
  121. package/dist/unstable/observability/internal/otlpProtobuf.js.map +1 -1
  122. package/dist/unstable/observability/internal/protobuf.js +0 -28
  123. package/dist/unstable/observability/internal/protobuf.js.map +1 -1
  124. package/dist/unstable/persistence/KeyValueStore.d.ts +2 -2
  125. package/dist/unstable/persistence/KeyValueStore.d.ts.map +1 -1
  126. package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
  127. package/dist/unstable/persistence/Persistable.d.ts +6 -6
  128. package/dist/unstable/persistence/Persistable.d.ts.map +1 -1
  129. package/dist/unstable/persistence/PersistedQueue.d.ts +3 -3
  130. package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
  131. package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
  132. package/dist/unstable/persistence/Persistence.d.ts +5 -5
  133. package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
  134. package/dist/unstable/reactivity/AsyncResult.d.ts +2 -2
  135. package/dist/unstable/reactivity/AsyncResult.d.ts.map +1 -1
  136. package/dist/unstable/reactivity/Atom.d.ts +1 -1
  137. package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
  138. package/dist/unstable/reactivity/AtomHttpApi.d.ts +1 -1
  139. package/dist/unstable/reactivity/AtomHttpApi.d.ts.map +1 -1
  140. package/dist/unstable/rpc/Rpc.d.ts +3 -4
  141. package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
  142. package/dist/unstable/rpc/Rpc.js +1 -1
  143. package/dist/unstable/rpc/Rpc.js.map +1 -1
  144. package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
  145. package/dist/unstable/rpc/RpcClient.js +25 -4
  146. package/dist/unstable/rpc/RpcClient.js.map +1 -1
  147. package/dist/unstable/rpc/RpcMessage.d.ts +7 -0
  148. package/dist/unstable/rpc/RpcMessage.d.ts.map +1 -1
  149. package/dist/unstable/rpc/RpcMessage.js +20 -0
  150. package/dist/unstable/rpc/RpcMessage.js.map +1 -1
  151. package/dist/unstable/rpc/RpcMiddleware.d.ts +2 -2
  152. package/dist/unstable/rpc/RpcMiddleware.d.ts.map +1 -1
  153. package/dist/unstable/rpc/RpcSchema.d.ts +10 -3
  154. package/dist/unstable/rpc/RpcSchema.d.ts.map +1 -1
  155. package/dist/unstable/rpc/RpcSchema.js.map +1 -1
  156. package/dist/unstable/rpc/RpcWorker.d.ts +3 -3
  157. package/dist/unstable/rpc/RpcWorker.d.ts.map +1 -1
  158. package/dist/unstable/schema/Model.d.ts +2 -2
  159. package/dist/unstable/schema/Model.d.ts.map +1 -1
  160. package/dist/unstable/schema/Model.js.map +1 -1
  161. package/dist/unstable/schema/VariantSchema.d.ts +16 -2
  162. package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
  163. package/dist/unstable/schema/VariantSchema.js.map +1 -1
  164. package/dist/unstable/sql/SqlConnection.d.ts +1 -0
  165. package/dist/unstable/sql/SqlConnection.d.ts.map +1 -1
  166. package/dist/unstable/sql/SqlConnection.js.map +1 -1
  167. package/dist/unstable/sql/SqlModel.js.map +1 -1
  168. package/dist/unstable/sql/SqlResolver.d.ts +4 -4
  169. package/dist/unstable/sql/SqlResolver.d.ts.map +1 -1
  170. package/dist/unstable/sql/SqlResolver.js.map +1 -1
  171. package/dist/unstable/sql/SqlSchema.d.ts +5 -5
  172. package/dist/unstable/sql/SqlSchema.d.ts.map +1 -1
  173. package/dist/unstable/sql/Statement.d.ts +1 -0
  174. package/dist/unstable/sql/Statement.d.ts.map +1 -1
  175. package/dist/unstable/sql/Statement.js +3 -0
  176. package/dist/unstable/sql/Statement.js.map +1 -1
  177. package/dist/unstable/workflow/Activity.d.ts +2 -2
  178. package/dist/unstable/workflow/Activity.d.ts.map +1 -1
  179. package/dist/unstable/workflow/DurableDeferred.d.ts +18 -18
  180. package/dist/unstable/workflow/DurableDeferred.d.ts.map +1 -1
  181. package/dist/unstable/workflow/Workflow.d.ts +3 -3
  182. package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
  183. package/dist/unstable/workflow/Workflow.js.map +1 -1
  184. package/dist/unstable/workflow/WorkflowEngine.d.ts +3 -3
  185. package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
  186. package/package.json +1 -1
  187. package/src/ChannelSchema.ts +9 -9
  188. package/src/Config.ts +12 -5
  189. package/src/Cron.ts +4 -0
  190. package/src/Schema.ts +968 -689
  191. package/src/SchemaAST.ts +25 -35
  192. package/src/SchemaParser.ts +85 -77
  193. package/src/SchemaTransformation.ts +5 -6
  194. package/src/internal/effect.ts +6 -22
  195. package/src/internal/matcher.ts +0 -5
  196. package/src/internal/schema/arbitrary.ts +1 -1
  197. package/src/internal/schema/representation.ts +1 -5
  198. package/src/internal/schema/schema.ts +1 -1
  199. package/src/testing/TestSchema.ts +14 -13
  200. package/src/unstable/ai/AnthropicStructuredOutput.ts +2 -2
  201. package/src/unstable/ai/Chat.ts +1 -1
  202. package/src/unstable/ai/LanguageModel.ts +7 -7
  203. package/src/unstable/ai/McpSchema.ts +16 -14
  204. package/src/unstable/ai/McpServer.ts +7 -7
  205. package/src/unstable/ai/OpenAiStructuredOutput.ts +2 -2
  206. package/src/unstable/ai/Response.ts +9 -5
  207. package/src/unstable/ai/Tool.ts +49 -47
  208. package/src/unstable/cli/Argument.ts +9 -8
  209. package/src/unstable/cli/Flag.ts +9 -8
  210. package/src/unstable/cli/Param.ts +6 -146
  211. package/src/unstable/cli/Primitive.ts +5 -6
  212. package/src/unstable/cli/internal/ansi.ts +0 -33
  213. package/src/unstable/cli/internal/config.ts +0 -8
  214. package/src/unstable/cli/internal/parser.ts +2 -2
  215. package/src/unstable/cluster/MessageStorage.ts +1 -1
  216. package/src/unstable/cluster/Reply.ts +6 -2
  217. package/src/unstable/devtools/DevToolsSchema.ts +1 -1
  218. package/src/unstable/encoding/Msgpack.ts +9 -7
  219. package/src/unstable/encoding/Ndjson.ts +10 -10
  220. package/src/unstable/encoding/Sse.ts +1 -1
  221. package/src/unstable/eventlog/Event.ts +3 -3
  222. package/src/unstable/http/HttpBody.ts +1 -1
  223. package/src/unstable/http/HttpClientRequest.ts +1 -1
  224. package/src/unstable/http/HttpIncomingMessage.ts +1 -1
  225. package/src/unstable/http/HttpMiddleware.ts +12 -3
  226. package/src/unstable/httpapi/HttpApi.ts +1 -1
  227. package/src/unstable/httpapi/HttpApiBuilder.ts +9 -5
  228. package/src/unstable/httpapi/HttpApiClient.ts +10 -10
  229. package/src/unstable/httpapi/HttpApiEndpoint.ts +45 -33
  230. package/src/unstable/httpapi/HttpApiMiddleware.ts +2 -2
  231. package/src/unstable/httpapi/HttpApiSchema.ts +16 -43
  232. package/src/unstable/httpapi/OpenApi.ts +5 -5
  233. package/src/unstable/observability/internal/otlpProtobuf.ts +0 -75
  234. package/src/unstable/observability/internal/protobuf.ts +0 -42
  235. package/src/unstable/persistence/KeyValueStore.ts +2 -2
  236. package/src/unstable/persistence/Persistable.ts +7 -7
  237. package/src/unstable/persistence/PersistedQueue.ts +3 -3
  238. package/src/unstable/persistence/Persistence.ts +5 -5
  239. package/src/unstable/reactivity/AsyncResult.ts +4 -4
  240. package/src/unstable/reactivity/Atom.ts +1 -1
  241. package/src/unstable/reactivity/AtomHttpApi.ts +1 -1
  242. package/src/unstable/rpc/Rpc.ts +7 -8
  243. package/src/unstable/rpc/RpcClient.ts +26 -4
  244. package/src/unstable/rpc/RpcMessage.ts +19 -0
  245. package/src/unstable/rpc/RpcMiddleware.ts +2 -2
  246. package/src/unstable/rpc/RpcSchema.ts +12 -9
  247. package/src/unstable/rpc/RpcWorker.ts +3 -3
  248. package/src/unstable/schema/Model.ts +2 -2
  249. package/src/unstable/schema/VariantSchema.ts +19 -17
  250. package/src/unstable/sql/SqlConnection.ts +5 -0
  251. package/src/unstable/sql/SqlModel.ts +2 -2
  252. package/src/unstable/sql/SqlResolver.ts +6 -6
  253. package/src/unstable/sql/SqlSchema.ts +5 -5
  254. package/src/unstable/sql/Statement.ts +11 -0
  255. package/src/unstable/workflow/Activity.ts +6 -6
  256. package/src/unstable/workflow/DurableDeferred.ts +33 -33
  257. package/src/unstable/workflow/Workflow.ts +5 -5
  258. package/src/unstable/workflow/WorkflowEngine.ts +10 -10
  259. package/dist/internal/concurrency.d.ts +0 -2
  260. package/dist/internal/concurrency.d.ts.map +0 -1
  261. package/dist/internal/concurrency.js +0 -29
  262. package/dist/internal/concurrency.js.map +0 -1
  263. package/src/internal/concurrency.ts +0 -52
@@ -67,28 +67,28 @@ export class Persistence extends Context.Service<Persistence, {
67
67
  * @since 4.0.0
68
68
  */
69
69
  export interface PersistenceStore {
70
- readonly get: <A extends Schema.Top, E extends Schema.Top>(
70
+ readonly get: <A extends Schema.Constraint, E extends Schema.Constraint>(
71
71
  key: Persistable.Persistable<A, E>
72
72
  ) => Effect.Effect<
73
73
  Exit.Exit<A["Type"], E["Type"]> | undefined,
74
74
  PersistenceError | Schema.SchemaError,
75
75
  A["DecodingServices"] | E["DecodingServices"]
76
76
  >
77
- readonly getMany: <A extends Schema.Top, E extends Schema.Top>(
77
+ readonly getMany: <A extends Schema.Constraint, E extends Schema.Constraint>(
78
78
  keys: Iterable<Persistable.Persistable<A, E>>
79
79
  ) => Effect.Effect<
80
80
  Array<Exit.Exit<A["Type"], E["Type"]> | undefined>,
81
81
  PersistenceError | Schema.SchemaError,
82
82
  A["DecodingServices"] | E["DecodingServices"]
83
83
  >
84
- readonly set: <A extends Schema.Top, E extends Schema.Top>(
84
+ readonly set: <A extends Schema.Constraint, E extends Schema.Constraint>(
85
85
  key: Persistable.Persistable<A, E>,
86
86
  value: Exit.Exit<A["Type"], E["Type"]>
87
87
  ) => Effect.Effect<void, PersistenceError | Schema.SchemaError, A["EncodingServices"] | E["EncodingServices"]>
88
- readonly setMany: <A extends Schema.Top, E extends Schema.Top>(
88
+ readonly setMany: <A extends Schema.Constraint, E extends Schema.Constraint>(
89
89
  entries: Iterable<readonly [Persistable.Persistable<A, E>, Exit.Exit<A["Type"], E["Type"]>]>
90
90
  ) => Effect.Effect<void, PersistenceError | Schema.SchemaError, A["EncodingServices"] | E["EncodingServices"]>
91
- readonly remove: <A extends Schema.Top, E extends Schema.Top>(
91
+ readonly remove: <A extends Schema.Constraint, E extends Schema.Constraint>(
92
92
  key: Persistable.Persistable<A, E>
93
93
  ) => Effect.Effect<void, PersistenceError>
94
94
  readonly clear: Effect.Effect<void, PersistenceError>
@@ -1063,8 +1063,8 @@ class BuilderImpl<Out, A, E> {
1063
1063
  * @since 4.0.0
1064
1064
  */
1065
1065
  export interface Schema<
1066
- Success extends Schema_.Top,
1067
- Error extends Schema_.Top
1066
+ Success extends Schema_.Constraint,
1067
+ Error extends Schema_.Constraint
1068
1068
  > extends
1069
1069
  Schema_.declareConstructor<
1070
1070
  AsyncResult<Success["Type"], Error["Type"]>,
@@ -1083,8 +1083,8 @@ export interface Schema<
1083
1083
  * @since 4.0.0
1084
1084
  */
1085
1085
  export const Schema = <
1086
- A extends Schema_.Top = Schema_.Never,
1087
- E extends Schema_.Top = Schema_.Never
1086
+ A extends Schema_.Constraint = Schema_.Never,
1087
+ E extends Schema_.Constraint = Schema_.Never
1088
1088
  >(
1089
1089
  options: {
1090
1090
  readonly success?: A | undefined
@@ -2947,7 +2947,7 @@ export type SerializableTypeId = "~effect-atom/atom/Atom/Serializable"
2947
2947
  * @category Serializable
2948
2948
  * @since 4.0.0
2949
2949
  */
2950
- export interface Serializable<S extends Schema.Top> {
2950
+ export interface Serializable<S extends Schema.Constraint> {
2951
2951
  readonly [SerializableTypeId]: {
2952
2952
  readonly key: string
2953
2953
  readonly encode: (value: S["Type"]) => S["Encoded"]
@@ -343,7 +343,7 @@ type ResponseByMode<Success, ResponseMode extends HttpApiEndpoint.ClientResponse
343
343
  : Success
344
344
 
345
345
  type ErrorByMode<
346
- Error extends Schema.Top,
346
+ Error extends Schema.Constraint,
347
347
  Middleware,
348
348
  ResponseMode extends HttpApiEndpoint.ClientResponseMode
349
349
  > =
@@ -51,7 +51,6 @@ export const isRpc = (u: unknown): u is Rpc<any, any, any> => Predicate.hasPrope
51
51
  * @since 4.0.0
52
52
  */
53
53
  export interface DefectSchema extends Schema.Top {
54
- readonly Type: unknown
55
54
  make(input: null, options?: Schema.MakeOptions): unknown
56
55
  make(input: undefined, options?: Schema.MakeOptions): unknown
57
56
  make(input: {}, options?: Schema.MakeOptions): unknown
@@ -807,7 +806,7 @@ const Proto = {
807
806
  middlewares: this.middlewares
808
807
  })
809
808
  },
810
- setPayload(this: AnyWithProps, payloadSchema: Schema.Struct<any> | Schema.Struct.Fields) {
809
+ setPayload(this: AnyWithProps, payloadSchema: Schema.Struct<Schema.Struct.Fields> | Schema.Struct.Fields) {
811
810
  return makeProto({
812
811
  _tag: this._tag,
813
812
  payloadSchema: Schema.isSchema(payloadSchema) ? payloadSchema as any : Schema.Struct(payloadSchema as any),
@@ -876,7 +875,7 @@ const makeProto = <
876
875
  readonly payloadSchema: Payload
877
876
  readonly successSchema: Success
878
877
  readonly errorSchema: Error
879
- readonly defectSchema: Schema.Top
878
+ readonly defectSchema: Schema.Constraint
880
879
  readonly annotations: Context.Context<never>
881
880
  readonly middlewares: ReadonlySet<Middleware>
882
881
  }): Rpc<Tag, Payload, Success, Error, Middleware, Requires> => {
@@ -971,7 +970,7 @@ export const make = <
971
970
  * }
972
971
  *
973
972
  * // The type definition for the transformed success schema.
974
- * export interface Paginated<S extends Schema.Top> extends
973
+ * export interface Paginated<S extends Schema.Constraint> extends
975
974
  * Schema.Struct<{
976
975
  * readonly offset: Schema.Number
977
976
  * readonly total: Schema.Number
@@ -1071,8 +1070,8 @@ export declare namespace Custom {
1071
1070
  * @since 4.0.0
1072
1071
  */
1073
1072
  export interface Out<
1074
- Success extends Schema.Top,
1075
- Error extends Schema.Top
1073
+ Success extends Schema.Constraint,
1074
+ Error extends Schema.Constraint
1076
1075
  > {
1077
1076
  readonly success: Success
1078
1077
  readonly error: Error
@@ -1097,8 +1096,8 @@ export declare namespace Custom {
1097
1096
  */
1098
1097
  export type Kind<
1099
1098
  Def extends Custom,
1100
- Success extends Schema.Top,
1101
- Error extends Schema.Top
1099
+ Success extends Schema.Constraint,
1100
+ Error extends Schema.Constraint
1102
1101
  > = (Def & {
1103
1102
  readonly success: Success
1104
1103
  readonly error: Error
@@ -43,7 +43,7 @@ import * as Rpc from "./Rpc.ts"
43
43
  import { RpcClientDefect, RpcClientError } from "./RpcClientError.ts"
44
44
  import type * as RpcGroup from "./RpcGroup.ts"
45
45
  import type { FromClient, FromClientEncoded, FromServer, FromServerEncoded, Request } from "./RpcMessage.ts"
46
- import { constPing, RequestId } from "./RpcMessage.ts"
46
+ import { constPing, isTerminalResponse, RequestId } from "./RpcMessage.ts"
47
47
  import type * as RpcMiddleware from "./RpcMiddleware.ts"
48
48
  import * as RpcSchema from "./RpcSchema.ts"
49
49
  import * as RpcSerialization from "./RpcSerialization.ts"
@@ -901,6 +901,8 @@ export const makeProtocolHttp = (client: HttpClient.HttpClient): Effect.Effect<
901
901
  })
902
902
  const emptyResponseError = (request: FromClientEncoded) =>
903
903
  protocolDefect("Received empty HTTP response from RPC server", request)
904
+ const incompleteResponseError = (request: FromClientEncoded) =>
905
+ protocolDefect("HTTP response ended before RPC request completed", request)
904
906
 
905
907
  const send = Effect.fnUntraced(function*(clientId: number, request: FromClientEncoded) {
906
908
  if (request._tag !== "Request") {
@@ -928,15 +930,27 @@ export const makeProtocolHttp = (client: HttpClient.HttpClient): Effect.Effect<
928
930
  if (responses.length === 0) {
929
931
  return yield* emptyResponseError(request)
930
932
  }
933
+ let completed = false
931
934
  let i = 0
932
- return yield* Effect.whileLoop({
935
+ yield* Effect.whileLoop({
933
936
  while: () => i < responses.length,
934
- body: () => writeResponse(clientId, responses[i++]),
937
+ body: () => {
938
+ const response = responses[i++]
939
+ if (isTerminalResponse(response)) {
940
+ completed = true
941
+ }
942
+ return writeResponse(clientId, response)
943
+ },
935
944
  step: constVoid
936
945
  })
946
+ if (!completed) {
947
+ return yield* incompleteResponseError(request)
948
+ }
949
+ return
937
950
  }
938
951
 
939
952
  let hasResponse = false
953
+ let completed = false
940
954
  yield* Stream.runForEachArray(response.stream, (chunk) =>
941
955
  Effect.try({
942
956
  try: () => chunk.flatMap(parser.decode) as Array<FromServerEncoded>,
@@ -948,7 +962,13 @@ export const makeProtocolHttp = (client: HttpClient.HttpClient): Effect.Effect<
948
962
  let i = 0
949
963
  return Effect.whileLoop({
950
964
  while: () => i < responses.length,
951
- body: () => writeResponse(clientId, responses[i++]),
965
+ body: () => {
966
+ const response = responses[i++]
967
+ if (isTerminalResponse(response)) {
968
+ completed = true
969
+ }
970
+ return writeResponse(clientId, response)
971
+ },
952
972
  step: constVoid
953
973
  })
954
974
  })
@@ -957,6 +977,8 @@ export const makeProtocolHttp = (client: HttpClient.HttpClient): Effect.Effect<
957
977
  )
958
978
  if (!hasResponse) {
959
979
  return yield* emptyResponseError(request)
980
+ } else if (!completed) {
981
+ return yield* incompleteResponseError(request)
960
982
  }
961
983
  })
962
984
 
@@ -400,3 +400,22 @@ export interface Pong {
400
400
  * @since 4.0.0
401
401
  */
402
402
  export const constPong: Pong = { _tag: "Pong" }
403
+
404
+ /**
405
+ * Checks if the response type is terminal.
406
+ *
407
+ * @category guards
408
+ * @since 4.0.0
409
+ */
410
+ export const isTerminalResponse = (response: FromServerEncoded): boolean => {
411
+ switch (response._tag) {
412
+ case "Exit":
413
+ case "Defect":
414
+ case "ClientProtocolError": {
415
+ return true
416
+ }
417
+ default: {
418
+ return false
419
+ }
420
+ }
421
+ }
@@ -142,7 +142,7 @@ export interface ServiceClass<
142
142
  Self,
143
143
  Name extends string,
144
144
  Provides,
145
- E extends Schema.Top,
145
+ E extends Schema.Constraint,
146
146
  ClientError,
147
147
  Requires,
148
148
  RequiredForClient extends boolean
@@ -193,7 +193,7 @@ export type ApplyServices<A, R> = Exclude<R, Provides<A>> | Requires<A>
193
193
  * @since 4.0.0
194
194
  */
195
195
  export type ErrorSchema<A> = A extends { readonly [TypeId]: { readonly error: infer E } }
196
- ? E extends Schema.Top ? E : never
196
+ ? E extends Schema.Constraint ? E : never
197
197
  : never
198
198
 
199
199
  /**
@@ -26,12 +26,12 @@ const StreamSchemaTypeId = "~effect/rpc/RpcSchema/StreamSchema"
26
26
  * @category streams
27
27
  * @since 4.0.0
28
28
  */
29
- export function isStreamSchema(schema: Schema.Top): schema is Stream<Schema.Top, Schema.Top> {
29
+ export function isStreamSchema(schema: Schema.Constraint): schema is Stream<Schema.Top, Schema.Top> {
30
30
  return Predicate.hasProperty(schema, StreamSchemaTypeId)
31
31
  }
32
32
 
33
33
  /** @internal */
34
- export function getStreamSchemas(schema: Schema.Top): Option.Option<{
34
+ export function getStreamSchemas(schema: Schema.Constraint): Option.Option<{
35
35
  readonly success: Schema.Top
36
36
  readonly error: Schema.Top
37
37
  }> {
@@ -50,17 +50,20 @@ export function getStreamSchemas(schema: Schema.Top): Option.Option<{
50
50
  * @category streams
51
51
  * @since 4.0.0
52
52
  */
53
- export interface Stream<A extends Schema.Top, E extends Schema.Top> extends
54
- Schema.Bottom<
55
- Stream_.Stream<A["Type"], E["Type"]>,
56
- Stream_.Stream<A["Encoded"], E["Encoded"]>,
57
- A["DecodingServices"] | E["DecodingServices"],
58
- A["EncodingServices"] | E["EncodingServices"],
53
+ export interface Stream<A extends Schema.Constraint, E extends Schema.Constraint> extends
54
+ Schema.BottomLazy<
59
55
  SchemaAST.Declaration,
60
56
  Stream<A, E>
61
57
  >
62
58
  {
59
+ readonly "Type": Stream_.Stream<A["Type"], E["Type"]>
60
+ readonly "Encoded": Stream_.Stream<A["Encoded"], E["Encoded"]>
61
+ readonly "DecodingServices": A["DecodingServices"] | E["DecodingServices"]
62
+ readonly "EncodingServices": A["EncodingServices"] | E["EncodingServices"]
63
63
  readonly "Rebuild": Stream<A, E>
64
+ readonly "~type.make.in": Stream_.Stream<A["Type"], E["Type"]>
65
+ readonly "~type.make": Stream_.Stream<A["Type"], E["Type"]>
66
+ readonly "Iso": Stream_.Stream<A["Type"], E["Type"]>
64
67
  readonly [StreamSchemaTypeId]: typeof StreamSchemaTypeId
65
68
  readonly success: A
66
69
  readonly error: E
@@ -75,7 +78,7 @@ const schema = Schema.declare(Stream_.isStream)
75
78
  * @category streams
76
79
  * @since 4.0.0
77
80
  */
78
- export function Stream<A extends Schema.Top, E extends Schema.Top>(success: A, error: E): Stream<A, E> {
81
+ export function Stream<A extends Schema.Constraint, E extends Schema.Constraint>(success: A, error: E): Stream<A, E> {
79
82
  return Schema.make(schema.ast, { [StreamSchemaTypeId]: StreamSchemaTypeId, success, error })
80
83
  }
81
84
 
@@ -64,7 +64,7 @@ const ProtocolTag = Context.Service<Protocol, Protocol["Service"]>(
64
64
  * @category initial message
65
65
  * @since 4.0.0
66
66
  */
67
- export const makeInitialMessage = <S extends Schema.Top, E, R2>(
67
+ export const makeInitialMessage = <S extends Schema.Constraint, E, R2>(
68
68
  schema: S,
69
69
  effect: Effect.Effect<S["Type"], E, R2>
70
70
  ): Effect.Effect<
@@ -89,7 +89,7 @@ export const makeInitialMessage = <S extends Schema.Top, E, R2>(
89
89
  * @category initial message
90
90
  * @since 4.0.0
91
91
  */
92
- export const layerInitialMessage = <S extends Schema.Top, R2>(
92
+ export const layerInitialMessage = <S extends Schema.Constraint, R2>(
93
93
  schema: S,
94
94
  build: Effect.Effect<S["Type"], never, R2>
95
95
  ): Layer.Layer<InitialMessage, never, S["EncodingServices"] | R2> =>
@@ -108,7 +108,7 @@ export const layerInitialMessage = <S extends Schema.Top, R2>(
108
108
  * @category initial message
109
109
  * @since 4.0.0
110
110
  */
111
- export const initialMessage = <S extends Schema.Top>(
111
+ export const initialMessage = <S extends Schema.Constraint>(
112
112
  schema: S
113
113
  ): Effect.Effect<S["Type"], NoSuchElementError | Schema.SchemaError, Protocol | S["DecodingServices"]> =>
114
114
  ProtocolTag.pipe(
@@ -298,7 +298,7 @@ export const Sensitive = <S extends Schema.Top>(schema: S): Sensitive<S> =>
298
298
  * @category optional
299
299
  * @since 4.0.0
300
300
  */
301
- export interface optionalOption<S extends Schema.Top>
301
+ export interface optionalOption<S extends Schema.Constraint>
302
302
  extends Schema.decodeTo<Schema.Option<Schema.toType<S>>, Schema.optionalKey<Schema.NullOr<S>>>
303
303
  {}
304
304
 
@@ -309,7 +309,7 @@ export interface optionalOption<S extends Schema.Top>
309
309
  * @category optional
310
310
  * @since 4.0.0
311
311
  */
312
- export const optionalOption = <S extends Schema.Top>(schema: S): optionalOption<S> =>
312
+ export const optionalOption = <S extends Schema.Constraint>(schema: S): optionalOption<S> =>
313
313
  Schema.optionalKey(Schema.NullOr(schema)).pipe(
314
314
  Schema.decodeTo(
315
315
  Schema.Option(Schema.toType(schema)),
@@ -262,17 +262,10 @@ export interface Class<
262
262
  readonly fields: Schema.Struct.Fields
263
263
  }
264
264
  > extends
265
- Schema.Bottom<
266
- Self,
267
- S["Encoded"],
268
- S["DecodingServices"],
269
- S["EncodingServices"],
265
+ Schema.BottomLazy<
270
266
  SchemaAST.Declaration,
271
267
  Schema.decodeTo<Schema.declareConstructor<Self, S["Encoded"], readonly [S], S["Iso"]>, S>,
272
- S["~type.make.in"],
273
- S["Iso"],
274
268
  readonly [S],
275
- Self,
276
269
  S["~type.mutability"],
277
270
  S["~type.optionality"],
278
271
  S["~type.constructor.default"],
@@ -281,6 +274,14 @@ export interface Class<
281
274
  >,
282
275
  Struct<Struct_.Simplify<Fields>>
283
276
  {
277
+ readonly "Type": Self
278
+ readonly "Encoded": S["Encoded"]
279
+ readonly "DecodingServices": S["DecodingServices"]
280
+ readonly "EncodingServices": S["EncodingServices"]
281
+ readonly "~type.make.in": S["~type.make.in"]
282
+ readonly "~type.make": Self
283
+ readonly "Iso": S["Iso"]
284
+
284
285
  new(
285
286
  props: S["~type.make.in"],
286
287
  options?: {
@@ -528,24 +529,25 @@ export const Override = <A>(value: A): A & Brand<"Override"> => value as any
528
529
  * @since 4.0.0
529
530
  */
530
531
  export interface Overrideable<S extends Schema.Top & Schema.WithoutConstructorDefault> extends
531
- Schema.Bottom<
532
- S["Type"] & Brand<"Override">,
533
- S["Encoded"],
534
- S["DecodingServices"],
535
- S["EncodingServices"],
532
+ Schema.BottomLazy<
536
533
  S["ast"],
537
534
  Overrideable<S>,
538
- S["~type.make.in"],
539
- (S["Type"] & Brand<"Override">) | undefined,
540
535
  S["~type.parameters"],
541
- (S["Type"] & Brand<"Override">) | undefined,
542
536
  S["~type.mutability"],
543
537
  "required",
544
538
  "with-default",
545
539
  S["~encoded.mutability"],
546
540
  S["~encoded.optionality"]
547
541
  >
548
- {}
542
+ {
543
+ readonly "Type": S["Type"] & Brand<"Override">
544
+ readonly "Encoded": S["Encoded"]
545
+ readonly "DecodingServices": S["DecodingServices"]
546
+ readonly "EncodingServices": S["EncodingServices"]
547
+ readonly "~type.make.in": S["~type.make.in"]
548
+ readonly "~type.make": (S["Type"] & Brand<"Override">) | undefined
549
+ readonly "Iso": (S["Type"] & Brand<"Override">) | undefined
550
+ }
549
551
 
550
552
  /**
551
553
  * Wraps a schema with an effectful constructor default while allowing explicit
@@ -50,6 +50,11 @@ export interface Connection {
50
50
  params: ReadonlyArray<unknown>
51
51
  ) => Effect<ReadonlyArray<ReadonlyArray<unknown>>, SqlError>
52
52
 
53
+ readonly executeValuesUnprepared: (
54
+ sql: string,
55
+ params: ReadonlyArray<unknown>
56
+ ) => Effect<ReadonlyArray<ReadonlyArray<unknown>>, SqlError>
57
+
53
58
  readonly executeUnprepared: (
54
59
  sql: string,
55
60
  params: ReadonlyArray<unknown>,
@@ -77,7 +77,7 @@ export const makeRepository = <
77
77
  > =>
78
78
  Effect.gen(function*() {
79
79
  const sql = yield* SqlClient
80
- const idSchema = Model.fields[options.idColumn] as Schema.Top
80
+ const idSchema = Model.fields[options.idColumn]
81
81
  const idColumn = options.idColumn as string
82
82
  const softDeleteColumn = options.softDeleteColumn as string | undefined
83
83
  const withSoftDeleteFilter = (where: any) =>
@@ -274,7 +274,7 @@ export const makeResolvers = <
274
274
  > =>
275
275
  Effect.gen(function*() {
276
276
  const sql = yield* SqlClient
277
- const idSchema = Model.fields[options.idColumn] as Schema.Top
277
+ const idSchema = Model.fields[options.idColumn]
278
278
  const idColumn = options.idColumn as string
279
279
  const softDeleteColumn = options.softDeleteColumn as string | undefined
280
280
  const withSoftDeleteFilter = (where: any) =>
@@ -110,7 +110,7 @@ export const SqlRequest = <In, A, E, R>(payload: In): SqlRequest<In, A, E, R> =>
110
110
  * @category resolvers
111
111
  * @since 4.0.0
112
112
  */
113
- export const ordered = <Req extends Schema.Top, Res extends Schema.Top, _, E, R>(
113
+ export const ordered = <Req extends Schema.Constraint, Res extends Schema.Constraint, _, E, R>(
114
114
  options: {
115
115
  readonly Request: Req
116
116
  readonly Result: Res
@@ -158,7 +158,7 @@ export const ordered = <Req extends Schema.Top, Res extends Schema.Top, _, E, R>
158
158
  * @category resolvers
159
159
  * @since 4.0.0
160
160
  */
161
- export const grouped = <Req extends Schema.Top, Res extends Schema.Top, K, Row, E, R>(
161
+ export const grouped = <Req extends Schema.Constraint, Res extends Schema.Constraint, K, Row, E, R>(
162
162
  options: {
163
163
  readonly Request: Req
164
164
  readonly RequestGroupKey: (request: Req["Type"]) => K
@@ -227,7 +227,7 @@ export const grouped = <Req extends Schema.Top, Res extends Schema.Top, K, Row,
227
227
  * @category resolvers
228
228
  * @since 4.0.0
229
229
  */
230
- export const findById = <Id extends Schema.Top, Res extends Schema.Top, Row, E, R>(
230
+ export const findById = <Id extends Schema.Constraint, Res extends Schema.Constraint, Row, E, R>(
231
231
  options: {
232
232
  readonly Id: Id
233
233
  readonly Result: Res
@@ -284,7 +284,7 @@ export const findById = <Id extends Schema.Top, Res extends Schema.Top, Row, E,
284
284
  })
285
285
  }
286
286
 
287
- const void_ = <Req extends Schema.Top, _, E, R>(
287
+ const void_ = <Req extends Schema.Constraint, _, E, R>(
288
288
  options: {
289
289
  readonly Request: Req
290
290
  readonly execute: (
@@ -334,7 +334,7 @@ const constNoSuchElement = Exit.fail(new Cause.NoSuchElementError())
334
334
 
335
335
  const partitionRequests = function*<In, A, E, R, InE>(
336
336
  requests: Arr.NonEmptyArray<Request.Entry<SqlRequest<In, A, E, R>>>,
337
- schema: Schema.Codec<In, InE, R, R>
337
+ schema: Schema.ConstraintCodec<In, InE, R, R>
338
338
  ) {
339
339
  const len = requests.length
340
340
  const inputs = Arr.empty<InE>()
@@ -359,7 +359,7 @@ const partitionRequests = function*<In, A, E, R, InE>(
359
359
 
360
360
  const partitionRequestsById = function*<In, A, E, R, InE>(
361
361
  requests: ReadonlyArray<Request.Entry<SqlRequest<In, A, E, R>>>,
362
- schema: Schema.Codec<In, InE, R, R>
362
+ schema: Schema.ConstraintCodec<In, InE, R, R>
363
363
  ) {
364
364
  const len = requests.length
365
365
  const inputs = Arr.empty<InE>()
@@ -30,7 +30,7 @@ import * as Schema from "../../Schema.ts"
30
30
  * @category constructors
31
31
  * @since 4.0.0
32
32
  */
33
- export const findAll = <Req extends Schema.Top, Res extends Schema.Top, E, R>(
33
+ export const findAll = <Req extends Schema.Constraint, Res extends Schema.Constraint, E, R>(
34
34
  options: {
35
35
  readonly Request: Req
36
36
  readonly Result: Res
@@ -62,7 +62,7 @@ export const findAll = <Req extends Schema.Top, Res extends Schema.Top, E, R>(
62
62
  * @category constructors
63
63
  * @since 4.0.0
64
64
  */
65
- export const findNonEmpty = <Req extends Schema.Top, Res extends Schema.Top, E, R>(
65
+ export const findNonEmpty = <Req extends Schema.Constraint, Res extends Schema.Constraint, E, R>(
66
66
  options: {
67
67
  readonly Request: Req
68
68
  readonly Result: Res
@@ -83,7 +83,7 @@ export const findNonEmpty = <Req extends Schema.Top, Res extends Schema.Top, E,
83
83
  : Effect.fail(new Cause.NoSuchElementError()))
84
84
  }
85
85
 
86
- const void_ = <Req extends Schema.Top, E, R>(
86
+ const void_ = <Req extends Schema.Constraint, E, R>(
87
87
  options: {
88
88
  readonly Request: Req
89
89
  readonly execute: (request: Req["Encoded"]) => Effect.Effect<unknown, E, R>
@@ -112,7 +112,7 @@ export {
112
112
  * @category constructors
113
113
  * @since 4.0.0
114
114
  */
115
- export const findOne = <Req extends Schema.Top, Res extends Schema.Top, E, R>(
115
+ export const findOne = <Req extends Schema.Constraint, Res extends Schema.Constraint, E, R>(
116
116
  options: {
117
117
  readonly Request: Req
118
118
  readonly Result: Res
@@ -145,7 +145,7 @@ export const findOne = <Req extends Schema.Top, Res extends Schema.Top, E, R>(
145
145
  * @category constructors
146
146
  * @since 4.0.0
147
147
  */
148
- export const findOneOption = <Req extends Schema.Top, Res extends Schema.Top, E, R>(
148
+ export const findOneOption = <Req extends Schema.Constraint, Res extends Schema.Constraint, E, R>(
149
149
  options: {
150
150
  readonly Request: Req
151
151
  readonly Result: Res
@@ -72,6 +72,7 @@ export interface Statement<A> extends Fragment, Effect.Effect<ReadonlyArray<A>,
72
72
  readonly withoutTransform: Effect.Effect<ReadonlyArray<A>, SqlError>
73
73
  readonly stream: Stream.Stream<A, SqlError>
74
74
  readonly values: Effect.Effect<ReadonlyArray<ReadonlyArray<unknown>>, SqlError>
75
+ readonly valuesUnprepared: Effect.Effect<ReadonlyArray<ReadonlyArray<unknown>>, SqlError>
75
76
  readonly unprepared: Effect.Effect<ReadonlyArray<A>, SqlError>
76
77
  readonly compile: (withoutTransform?: boolean | undefined) => readonly [
77
78
  sql: string,
@@ -1368,6 +1369,16 @@ const StatementProto: Omit<
1368
1369
  return this.withConnection("executeValues", (connection, sql, params) => connection.executeValues(sql, params))
1369
1370
  },
1370
1371
 
1372
+ get valuesUnprepared(): Effect.Effect<
1373
+ ReadonlyArray<ReadonlyArray<unknown>>,
1374
+ SqlError
1375
+ > {
1376
+ return this.withConnection(
1377
+ "executeValuesUnprepared",
1378
+ (connection, sql, params) => connection.executeValuesUnprepared(sql, params)
1379
+ )
1380
+ },
1381
+
1371
1382
  get unprepared(): Effect.Effect<ReadonlyArray<any>, SqlError> {
1372
1383
  const self = this as StatementImpl<any>
1373
1384
  return self.withConnection(
@@ -34,8 +34,8 @@ const TypeId = "~effect/workflow/Activity"
34
34
  * @since 4.0.0
35
35
  */
36
36
  export interface Activity<
37
- Success extends Schema.Top = Schema.Void,
38
- Error extends Schema.Top = Schema.Never,
37
+ Success extends Schema.Constraint = Schema.Void,
38
+ Error extends Schema.Constraint = Schema.Never,
39
39
  R = never
40
40
  > extends
41
41
  Effect.Effect<
@@ -122,8 +122,8 @@ export interface AnyWithProps {
122
122
  */
123
123
  export const make = <
124
124
  R,
125
- Success extends Schema.Top = Schema.Void,
126
- Error extends Schema.Top = Schema.Never
125
+ Success extends Schema.Constraint = Schema.Void,
126
+ Error extends Schema.Constraint = Schema.Never
127
127
  >(options: {
128
128
  readonly name: string
129
129
  readonly success?: Success | undefined
@@ -312,8 +312,8 @@ const InstanceTag = Context.Service<WorkflowInstance, WorkflowInstance["Service"
312
312
 
313
313
  const makeExecute = Effect.fnUntraced(function*<
314
314
  R,
315
- Success extends Schema.Top = typeof Schema.Void,
316
- Error extends Schema.Top = typeof Schema.Never
315
+ Success extends Schema.Constraint = typeof Schema.Void,
316
+ Error extends Schema.Constraint = typeof Schema.Never
317
317
  >(activity: Activity<Success, Error, R>) {
318
318
  const engine = yield* EngineTag
319
319
  const instance = yield* InstanceTag