spana-test 0.19.0 → 0.20.0

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/README.md +4 -3
  2. package/dist/agent/index.js +15 -15
  3. package/dist/api/app.d.ts +1 -0
  4. package/dist/api/app.d.ts.map +1 -1
  5. package/dist/api/expect.d.ts +25 -11
  6. package/dist/api/expect.d.ts.map +1 -1
  7. package/dist/{app-LGNFQMU7.js → app-ZSRJ3VFR.js} +3 -3
  8. package/dist/{appium-2PJWZXJI.js → appium-LOAWWZXA.js} +9 -9
  9. package/dist/build-info-KFFGVWDQ.js +9 -0
  10. package/dist/build-info.d.ts +5 -0
  11. package/dist/build-info.d.ts.map +1 -0
  12. package/dist/build-info.json +4 -0
  13. package/dist/channels/cdp-client.d.ts +36 -1
  14. package/dist/channels/cdp-client.d.ts.map +1 -1
  15. package/dist/channels/dom-channel.d.ts +14 -2
  16. package/dist/channels/dom-channel.d.ts.map +1 -1
  17. package/dist/{chunk-7K24Q7V3.js → chunk-26XIUSVS.js} +129 -29
  18. package/dist/chunk-26XIUSVS.js.map +1 -0
  19. package/dist/{chunk-E67QUGT3.js → chunk-2SDRH7ST.js} +7 -14
  20. package/dist/chunk-2SDRH7ST.js.map +1 -0
  21. package/dist/{chunk-NR4QAM5W.js → chunk-2TK77LXY.js} +18 -16
  22. package/dist/chunk-2TK77LXY.js.map +1 -0
  23. package/dist/{chunk-AP5SGSO7.js → chunk-42D5LOGH.js} +8 -8
  24. package/dist/{chunk-6X2SK2XO.js → chunk-5NZPLX2Y.js} +4 -5
  25. package/dist/chunk-5NZPLX2Y.js.map +1 -0
  26. package/dist/{chunk-CQ67PB3R.js → chunk-6GLL6SMP.js} +2 -2
  27. package/dist/{chunk-44U3F2RY.js → chunk-7GDO4XAI.js} +214 -6
  28. package/dist/chunk-7GDO4XAI.js.map +1 -0
  29. package/dist/{chunk-IJWAAODK.js → chunk-7QJY2HJO.js} +2 -2
  30. package/dist/{chunk-DNWVDGKS.js → chunk-GBV3XDWM.js} +8 -8
  31. package/dist/{chunk-C7HZJIGQ.js → chunk-HX2PKESI.js} +2 -2
  32. package/dist/{chunk-NC32K762.js → chunk-QNCTEV2P.js} +14 -14
  33. package/dist/{chunk-FLPPA2XY.js → chunk-VWOTHDSE.js} +9 -4
  34. package/dist/chunk-VWOTHDSE.js.map +1 -0
  35. package/dist/chunk-XLHJCJ4O.js +15 -0
  36. package/dist/chunk-XLHJCJ4O.js.map +1 -0
  37. package/dist/{chunk-G4ZUJCEN.js → chunk-XORHAB3R.js} +101 -47
  38. package/dist/chunk-XORHAB3R.js.map +1 -0
  39. package/dist/{chunk-C2YM5GNF.js → chunk-XUKBM64A.js} +3 -3
  40. package/dist/{chunk-FZ7EMXIM.js → chunk-XZQGSUV7.js} +10 -8
  41. package/dist/chunk-XZQGSUV7.js.map +1 -0
  42. package/dist/{chunk-3ONT32BO.js → chunk-ZVUIG6A4.js} +30 -24
  43. package/dist/{chunk-3ONT32BO.js.map → chunk-ZVUIG6A4.js.map} +1 -1
  44. package/dist/cli.js +16 -15
  45. package/dist/cli.js.map +1 -1
  46. package/dist/{config-loader-MX232REU.js → config-loader-IDIKOQ4T.js} +3 -3
  47. package/dist/{console-OHKVJLW3.js → console-Z7F7X3WY.js} +40 -39
  48. package/dist/console-Z7F7X3WY.js.map +1 -0
  49. package/dist/{doctor-command-YTT5SMQW.js → doctor-command-2PSDOREK.js} +7 -7
  50. package/dist/{driver-X4FWTDNU.js → driver-TNQ6HSID.js} +6 -6
  51. package/dist/{driver-AN3I4H6O.js → driver-TTJVCWCD.js} +7 -7
  52. package/dist/drivers/appium/android.d.ts +1 -1
  53. package/dist/drivers/appium/ios.d.ts +1 -1
  54. package/dist/drivers/cdp-browser.d.ts +1 -1
  55. package/dist/drivers/cdp-browser.d.ts.map +1 -1
  56. package/dist/drivers/device-controls.d.ts +1 -1
  57. package/dist/drivers/electrobun.d.ts +1 -1
  58. package/dist/drivers/electron.d.ts +1 -1
  59. package/dist/drivers/playwright.d.ts +2 -1
  60. package/dist/drivers/playwright.d.ts.map +1 -1
  61. package/dist/drivers/raw-driver.d.ts +2 -1
  62. package/dist/drivers/uiautomator2/driver.d.ts +1 -1
  63. package/dist/drivers/wasm.d.ts +1 -1
  64. package/dist/drivers/wda/driver.d.ts +1 -1
  65. package/dist/{electrobun-OUTYOM5G.js → electrobun-6ZJ6QFVQ.js} +5 -5
  66. package/dist/errors.d.ts +12 -12
  67. package/dist/index.d.ts +2 -1
  68. package/dist/index.d.ts.map +1 -1
  69. package/dist/index.js +49 -45
  70. package/dist/index.js.map +1 -1
  71. package/dist/{json-QVHG6I3O.js → json-RNYQ54R7.js} +8 -7
  72. package/dist/json-RNYQ54R7.js.map +1 -0
  73. package/dist/{local-UWIYOREU.js → local-E6FJI3QK.js} +5 -5
  74. package/dist/mcp/server.d.ts.map +1 -1
  75. package/dist/{playwright-KBWUBU5S.js → playwright-LS35WXQ6.js} +6 -6
  76. package/dist/report/console.d.ts +2 -0
  77. package/dist/report/console.d.ts.map +1 -1
  78. package/dist/report/json.d.ts +5 -1
  79. package/dist/report/json.d.ts.map +1 -1
  80. package/dist/runtime/local.d.ts.map +1 -1
  81. package/dist/runtime/web-server.d.ts.map +1 -1
  82. package/dist/schemas/config.d.ts +39 -484
  83. package/dist/schemas/config.d.ts.map +1 -1
  84. package/dist/schemas/device.d.ts +1 -1
  85. package/dist/schemas/element.d.ts +1 -1
  86. package/dist/schemas/selector.d.ts +1 -1
  87. package/dist/{server-CWCMC244.js → server-A6Y6ZMET.js} +2 -2
  88. package/dist/{server-BS3O4WVU.js → server-D3HOIPQE.js} +16 -16
  89. package/dist/{session-YWYRRXXR.js → session-2VIEKA6A.js} +16 -16
  90. package/dist/session-2VIEKA6A.js.map +1 -0
  91. package/dist/smart/auto-wait.d.ts +1 -1
  92. package/dist/smart/channel-resolver.d.ts +1 -1
  93. package/dist/smart/channel-resolver.d.ts.map +1 -1
  94. package/dist/smart/coordinator.d.ts +6 -2
  95. package/dist/smart/coordinator.d.ts.map +1 -1
  96. package/dist/smart/hierarchy-cache.d.ts +1 -1
  97. package/dist/studio/context.d.ts +1 -1
  98. package/dist/studio/effect-handler.d.ts +3 -1
  99. package/dist/{studio-command-XJDGLNAJ.js → studio-command-SPHIXFIW.js} +2 -2
  100. package/dist/{test-command-3IRGNEPB.js → test-command-OYMJNT23.js} +19 -19
  101. package/dist/vendor/effect/Array.d.ts +841 -0
  102. package/dist/vendor/effect/BigDecimal.d.ts +227 -0
  103. package/dist/vendor/effect/Brand.d.ts +71 -0
  104. package/dist/vendor/effect/ByteSize.d.ts +218 -0
  105. package/dist/vendor/effect/Cache.d.ts +104 -0
  106. package/dist/vendor/effect/Cause.d.ts +242 -0
  107. package/dist/vendor/effect/Channel.d.ts +1004 -0
  108. package/dist/vendor/effect/Chunk.d.ts +499 -0
  109. package/dist/vendor/effect/Clock.d.ts +31 -0
  110. package/dist/vendor/effect/Combiner.d.ts +23 -0
  111. package/dist/vendor/effect/Context.d.ts +167 -0
  112. package/dist/vendor/effect/Cron.d.ts +79 -0
  113. package/dist/vendor/effect/Data.d.ts +146 -0
  114. package/dist/vendor/effect/DateTime.d.ts +554 -0
  115. package/dist/vendor/effect/Deferred.d.ts +135 -0
  116. package/dist/vendor/effect/Differ.d.ts +8 -0
  117. package/dist/vendor/effect/Duration.d.ts +270 -0
  118. package/dist/vendor/effect/Effect.d.ts +2606 -0
  119. package/dist/vendor/effect/Equal.d.ts +20 -0
  120. package/dist/vendor/effect/Equivalence.d.ts +55 -0
  121. package/dist/vendor/effect/ExecutionPlan.d.ts +131 -0
  122. package/dist/vendor/effect/Exit.d.ts +114 -0
  123. package/dist/vendor/effect/Fiber.d.ts +90 -0
  124. package/dist/vendor/effect/FileSystem.d.ts +227 -0
  125. package/dist/vendor/effect/Filter.d.ts +133 -0
  126. package/dist/vendor/effect/Formatter.d.ts +13 -0
  127. package/dist/vendor/effect/Function.d.ts +91 -0
  128. package/dist/vendor/effect/Graph.d.ts +638 -0
  129. package/dist/vendor/effect/HKT.d.ts +30 -0
  130. package/dist/vendor/effect/Hash.d.ts +31 -0
  131. package/dist/vendor/effect/HashMap.d.ts +225 -0
  132. package/dist/vendor/effect/HashSet.d.ts +122 -0
  133. package/dist/vendor/effect/Inspectable.d.ts +25 -0
  134. package/dist/vendor/effect/JsonPatch.d.ts +26 -0
  135. package/dist/vendor/effect/JsonSchema.d.ts +43 -0
  136. package/dist/vendor/effect/LICENSE +21 -0
  137. package/dist/vendor/effect/Latch.d.ts +48 -0
  138. package/dist/vendor/effect/Layer.d.ts +273 -0
  139. package/dist/vendor/effect/LogLevel.d.ts +46 -0
  140. package/dist/vendor/effect/Logger.d.ts +106 -0
  141. package/dist/vendor/effect/ManagedRuntime.d.ts +52 -0
  142. package/dist/vendor/effect/Metric.d.ts +266 -0
  143. package/dist/vendor/effect/MutableHashMap.d.ts +80 -0
  144. package/dist/vendor/effect/MutableList.d.ts +52 -0
  145. package/dist/vendor/effect/MutableRef.d.ts +76 -0
  146. package/dist/vendor/effect/NonEmptyIterable.d.ts +9 -0
  147. package/dist/vendor/effect/Optic.d.ts +155 -0
  148. package/dist/vendor/effect/Option.d.ts +380 -0
  149. package/dist/vendor/effect/Order.d.ts +110 -0
  150. package/dist/vendor/effect/Ordering.d.ts +24 -0
  151. package/dist/vendor/effect/Path.d.ts +44 -0
  152. package/dist/vendor/effect/Pipeable.d.ts +38 -0
  153. package/dist/vendor/effect/PlatformError.d.ts +63 -0
  154. package/dist/vendor/effect/Predicate.d.ts +227 -0
  155. package/dist/vendor/effect/PrimaryKey.d.ts +11 -0
  156. package/dist/vendor/effect/PubSub.d.ts +229 -0
  157. package/dist/vendor/effect/Pull.d.ts +54 -0
  158. package/dist/vendor/effect/Queue.d.ts +212 -0
  159. package/dist/vendor/effect/Rational.d.ts +212 -0
  160. package/dist/vendor/effect/Record.d.ts +247 -0
  161. package/dist/vendor/effect/Redactable.d.ts +14 -0
  162. package/dist/vendor/effect/Redacted.d.ts +34 -0
  163. package/dist/vendor/effect/Reducer.d.ts +13 -0
  164. package/dist/vendor/effect/References.d.ts +53 -0
  165. package/dist/vendor/effect/Request.d.ts +106 -0
  166. package/dist/vendor/effect/RequestResolver.d.ts +159 -0
  167. package/dist/vendor/effect/Result.d.ts +285 -0
  168. package/dist/vendor/effect/Schedule.d.ts +172 -0
  169. package/dist/vendor/effect/Scheduler.d.ts +45 -0
  170. package/dist/vendor/effect/Schema.d.ts +3205 -0
  171. package/dist/vendor/effect/SchemaAST.d.ts +356 -0
  172. package/dist/vendor/effect/SchemaGetter.d.ts +181 -0
  173. package/dist/vendor/effect/SchemaIssue.d.ts +147 -0
  174. package/dist/vendor/effect/SchemaParser.d.ts +57 -0
  175. package/dist/vendor/effect/SchemaRepresentation.d.ts +563 -0
  176. package/dist/vendor/effect/SchemaTransformation.d.ts +155 -0
  177. package/dist/vendor/effect/Scope.d.ts +69 -0
  178. package/dist/vendor/effect/SemVer.d.ts +209 -0
  179. package/dist/vendor/effect/SemVerRange.d.ts +74 -0
  180. package/dist/vendor/effect/Semaphore.d.ts +87 -0
  181. package/dist/vendor/effect/Sink.d.ts +337 -0
  182. package/dist/vendor/effect/StandardSchema.d.ts +112 -0
  183. package/dist/vendor/effect/Stream.d.ts +1762 -0
  184. package/dist/vendor/effect/Struct.d.ts +162 -0
  185. package/dist/vendor/effect/Take.d.ts +8 -0
  186. package/dist/vendor/effect/Tracer.d.ts +150 -0
  187. package/dist/vendor/effect/TxRef.d.ts +40 -0
  188. package/dist/vendor/effect/Types.d.ts +139 -0
  189. package/dist/vendor/effect/Unify.d.ts +50 -0
  190. package/dist/vendor/effect/Utils.d.ts +31 -0
  191. package/dist/vendor/effect/crypto/Aead.d.ts +72 -0
  192. package/dist/vendor/effect/crypto/Cipher.d.ts +54 -0
  193. package/dist/vendor/effect/crypto/CryptoError.d.ts +81 -0
  194. package/dist/vendor/effect/crypto/Digest.d.ts +32 -0
  195. package/dist/vendor/effect/crypto/KeyAgreement.d.ts +80 -0
  196. package/dist/vendor/effect/crypto/KeyFormat.d.ts +82 -0
  197. package/dist/vendor/effect/crypto/KeyWrap.d.ts +97 -0
  198. package/dist/vendor/effect/crypto/Mac.d.ts +56 -0
  199. package/dist/vendor/effect/crypto/SecureRandom.d.ts +63 -0
  200. package/dist/vendor/effect/crypto/Signature.d.ts +122 -0
  201. package/dist/vendor/effect/crypto/WebCrypto.d.ts +18 -0
  202. package/dist/vendor/effect/http/Cookies.d.ts +185 -0
  203. package/dist/vendor/effect/http/Headers.d.ts +144 -0
  204. package/dist/vendor/effect/http/UrlParams.d.ts +122 -0
  205. package/dist/vendor/effect/internal/schemaError.d.ts +3 -0
  206. package/dist/vendor/effect/net/Dns.d.ts +166 -0
  207. package/dist/vendor/effect/net/Host.d.ts +80 -0
  208. package/dist/vendor/effect/net/IpInterface.d.ts +65 -0
  209. package/dist/vendor/effect/net/IpNetwork.d.ts +89 -0
  210. package/dist/vendor/effect/net/NetAddress.d.ts +350 -0
  211. package/dist/vendor/effect/persistence/KeyValueStore.d.ts +138 -0
  212. package/dist/vendor/effect/persistence/Persistable.d.ts +56 -0
  213. package/dist/vendor/effect/persistence/Persistence.d.ts +83 -0
  214. package/dist/vendor/effect/persistence/Redis.d.ts +98 -0
  215. package/dist/vendor/effect/reactivity/Reactivity.d.ts +59 -0
  216. package/dist/vendor/effect/sql/SqlClient.d.ts +121 -0
  217. package/dist/vendor/effect/sql/SqlConnection.d.ts +26 -0
  218. package/dist/vendor/effect/sql/SqlError.d.ts +186 -0
  219. package/dist/vendor/effect/sql/Statement.d.ts +225 -0
  220. package/native/win32-x64/spana_native.dll +0 -0
  221. package/package.json +4 -3
  222. package/dist/chunk-44U3F2RY.js.map +0 -1
  223. package/dist/chunk-6X2SK2XO.js.map +0 -1
  224. package/dist/chunk-7K24Q7V3.js.map +0 -1
  225. package/dist/chunk-E67QUGT3.js.map +0 -1
  226. package/dist/chunk-FLPPA2XY.js.map +0 -1
  227. package/dist/chunk-FZ7EMXIM.js.map +0 -1
  228. package/dist/chunk-G4ZUJCEN.js.map +0 -1
  229. package/dist/chunk-NR4QAM5W.js.map +0 -1
  230. package/dist/console-OHKVJLW3.js.map +0 -1
  231. package/dist/json-QVHG6I3O.js.map +0 -1
  232. /package/dist/{app-LGNFQMU7.js.map → app-ZSRJ3VFR.js.map} +0 -0
  233. /package/dist/{appium-2PJWZXJI.js.map → appium-LOAWWZXA.js.map} +0 -0
  234. /package/dist/{config-loader-MX232REU.js.map → build-info-KFFGVWDQ.js.map} +0 -0
  235. /package/dist/{chunk-AP5SGSO7.js.map → chunk-42D5LOGH.js.map} +0 -0
  236. /package/dist/{chunk-CQ67PB3R.js.map → chunk-6GLL6SMP.js.map} +0 -0
  237. /package/dist/{chunk-IJWAAODK.js.map → chunk-7QJY2HJO.js.map} +0 -0
  238. /package/dist/{chunk-DNWVDGKS.js.map → chunk-GBV3XDWM.js.map} +0 -0
  239. /package/dist/{chunk-C7HZJIGQ.js.map → chunk-HX2PKESI.js.map} +0 -0
  240. /package/dist/{chunk-NC32K762.js.map → chunk-QNCTEV2P.js.map} +0 -0
  241. /package/dist/{chunk-C2YM5GNF.js.map → chunk-XUKBM64A.js.map} +0 -0
  242. /package/dist/{driver-AN3I4H6O.js.map → config-loader-IDIKOQ4T.js.map} +0 -0
  243. /package/dist/{doctor-command-YTT5SMQW.js.map → doctor-command-2PSDOREK.js.map} +0 -0
  244. /package/dist/{driver-X4FWTDNU.js.map → driver-TNQ6HSID.js.map} +0 -0
  245. /package/dist/{electrobun-OUTYOM5G.js.map → driver-TTJVCWCD.js.map} +0 -0
  246. /package/dist/{local-UWIYOREU.js.map → electrobun-6ZJ6QFVQ.js.map} +0 -0
  247. /package/dist/{playwright-KBWUBU5S.js.map → local-E6FJI3QK.js.map} +0 -0
  248. /package/dist/{server-CWCMC244.js.map → playwright-LS35WXQ6.js.map} +0 -0
  249. /package/dist/{session-YWYRRXXR.js.map → server-A6Y6ZMET.js.map} +0 -0
  250. /package/dist/{server-BS3O4WVU.js.map → server-D3HOIPQE.js.map} +0 -0
  251. /package/dist/{studio-command-XJDGLNAJ.js.map → studio-command-SPHIXFIW.js.map} +0 -0
  252. /package/dist/{test-command-3IRGNEPB.js.map → test-command-OYMJNT23.js.map} +0 -0
@@ -0,0 +1,273 @@
1
+
2
+ import type { NonEmptyReadonlyArray } from "./Array.ts";
3
+ import type * as Cause from "./Cause.ts";
4
+ import type * as Channel from "./Channel.ts";
5
+ import * as Context from "./Context.ts";
6
+ import type { Effect } from "./Effect.ts";
7
+ import type * as Exit from "./Exit.ts";
8
+ import type { LazyArg } from "./Function.ts";
9
+ import { type Pipeable } from "./Pipeable.ts";
10
+ import * as Scope from "./Scope.ts";
11
+ import type * as Stream from "./Stream.ts";
12
+ import * as Tracer from "./Tracer.ts";
13
+ import type * as Types from "./Types.ts";
14
+ import type * as Unify from "./Unify.ts";
15
+ declare const TypeId = "~effect/Layer";
16
+
17
+ export interface Layer<in ROut, out E = never, out RIn = never> extends Variance<ROut, E, RIn>, Pipeable {
18
+ [Unify.typeSymbol]?: unknown;
19
+ [Unify.unifySymbol]?: LayerUnify<this>;
20
+ [Unify.ignoreSymbol]?: LayerUnifyIgnore;
21
+ }
22
+
23
+ export interface LayerUnify<A extends {
24
+ [Unify.typeSymbol]?: any;
25
+ }> {
26
+ Layer?: () => A[Unify.typeSymbol] extends Layer<any, any, any> | infer _ ? Layer<Success<Extract<A[Unify.typeSymbol], Any>>, Error<Extract<A[Unify.typeSymbol], Any>>, Services<Extract<A[Unify.typeSymbol], Any>>> : never;
27
+ }
28
+
29
+ export interface LayerUnifyIgnore {
30
+ }
31
+
32
+ export interface Variance<in ROut, out E, out RIn> {
33
+ readonly [TypeId]: {
34
+ readonly _ROut: Types.Contravariant<ROut>;
35
+ readonly _E: Types.Covariant<E>;
36
+ readonly _RIn: Types.Covariant<RIn>;
37
+ };
38
+ }
39
+
40
+ export interface Any {
41
+ readonly [TypeId]: {
42
+ readonly _ROut: any;
43
+ readonly _E: any;
44
+ readonly _RIn: any;
45
+ };
46
+ }
47
+
48
+ export type Services<T extends Any> = T extends infer L ? L extends Layer<infer _ROut, infer _E, infer _RIn> ? _RIn : never : never;
49
+
50
+ export type Error<T extends Any> = T extends Layer<infer _ROut, infer _E, infer _RIn> ? _E : never;
51
+
52
+ export type Success<T extends Any> = T extends Layer<infer _ROut, infer _E, infer _RIn> ? _ROut : never;
53
+ declare const MemoMapTypeId = "~effect/Layer/MemoMap";
54
+
55
+ export interface MemoMap {
56
+ readonly [MemoMapTypeId]: typeof MemoMapTypeId;
57
+ readonly get: <RIn, E, ROut>(layer: Layer<ROut, E, RIn>, scope: Scope.Scope) => Effect<Context.Context<ROut>, E, RIn> | undefined;
58
+ readonly getOrElseMemoize: <RIn, E, ROut>(layer: Layer<ROut, E, RIn>, scope: Scope.Scope, build: (memoMap: MemoMap, scope: Scope.Scope) => Effect<Context.Context<ROut>, E, RIn>) => Effect<Context.Context<ROut>, E, RIn>;
59
+ }
60
+
61
+ export declare const isLayer: (u: unknown) => u is Layer<unknown, unknown, unknown>;
62
+
63
+ export declare const fromBuild: <ROut, E, RIn>(build: (memoMap: MemoMap, scope: Scope.Scope) => Effect<Context.Context<ROut>, E, RIn>) => Layer<ROut, E, RIn>;
64
+
65
+ export declare const fromBuildMemo: <ROut, E, RIn>(build: (memoMap: MemoMap, scope: Scope.Scope) => Effect<Context.Context<ROut>, E, RIn>) => Layer<ROut, E, RIn>;
66
+
67
+ export declare const makeMemoMapUnsafe: () => MemoMap;
68
+
69
+ export declare const forkMemoMapUnsafe: (parent: MemoMap) => MemoMap;
70
+
71
+ export declare const makeMemoMap: Effect<MemoMap>;
72
+
73
+ export declare const forkMemoMap: (parent: MemoMap) => Effect<MemoMap>;
74
+ declare const CurrentMemoMap_base: Context.ServiceClass<CurrentMemoMap, "effect/Layer/CurrentMemoMap", MemoMap>;
75
+
76
+ export declare class CurrentMemoMap extends CurrentMemoMap_base {
77
+ static forkOrCreate<Services>(self: Context.Context<Services>): MemoMap;
78
+ }
79
+
80
+ export declare const buildWithMemoMap: {
81
+
82
+ (memoMap: MemoMap, scope: Scope.Scope): <RIn, E, ROut>(self: Layer<ROut, E, RIn>) => Effect<Context.Context<ROut>, E, RIn>;
83
+
84
+ <RIn, E, ROut>(self: Layer<ROut, E, RIn>, memoMap: MemoMap, scope: Scope.Scope): Effect<Context.Context<ROut>, E, RIn>;
85
+ };
86
+
87
+ export declare const build: <RIn, E, ROut>(self: Layer<ROut, E, RIn>) => Effect<Context.Context<ROut>, E, RIn | Scope.Scope>;
88
+
89
+ export declare const buildWithScope: {
90
+
91
+ (scope: Scope.Scope): <RIn, E, ROut>(self: Layer<ROut, E, RIn>) => Effect<Context.Context<ROut>, E, RIn>;
92
+
93
+ <RIn, E, ROut>(self: Layer<ROut, E, RIn>, scope: Scope.Scope): Effect<Context.Context<ROut>, E, RIn>;
94
+ };
95
+
96
+ export declare const succeed: {
97
+
98
+ <I, S>(service: Context.Key<I, S>): (resource: S) => Layer<I>;
99
+
100
+ <I, S>(service: Context.Key<I, S>, resource: Types.NoInfer<S>): Layer<I>;
101
+ };
102
+
103
+ export declare const succeedContext: <A>(context: Context.Context<A>) => Layer<A>;
104
+
105
+ export declare const empty: Layer<never>;
106
+
107
+ export declare const sync: {
108
+
109
+ <I, S>(service: Context.Key<I, S>): (evaluate: LazyArg<S>) => Layer<I>;
110
+
111
+ <I, S>(service: Context.Key<I, S>, evaluate: LazyArg<Types.NoInfer<S>>): Layer<I>;
112
+ };
113
+
114
+ export declare const syncContext: <A>(evaluate: LazyArg<Context.Context<A>>) => Layer<A>;
115
+
116
+ export declare const effect: {
117
+
118
+ <I, S>(service: Context.Key<I, S>): <E, R>(effect: Effect<S, E, R>) => Layer<I, E, Exclude<R, Scope.Scope>>;
119
+
120
+ <I, S, E, R>(service: Context.Key<I, S>, effect: Effect<Types.NoInfer<S>, E, R>): Layer<I, E, Exclude<R, Scope.Scope>>;
121
+ };
122
+
123
+ export declare const effectContext: <A, E, R>(effect: Effect<Context.Context<A>, E, R>) => Layer<A, E, Exclude<R, Scope.Scope>>;
124
+
125
+ export declare const effectDiscard: <X, E, R>(effect: Effect<X, E, R>) => Layer<never, E, Exclude<R, Scope.Scope>>;
126
+
127
+ export declare const suspend: <A, E, R>(evaluate: LazyArg<Layer<A, E, R>>) => Layer<A, E, R>;
128
+
129
+ export declare const unwrap: <A, E1, R1, E, R>(self: Effect<Layer<A, E1, R1>, E, R>) => Layer<A, E | E1, R1 | Exclude<R, Scope.Scope>>;
130
+
131
+ export declare const mergeAll: <Layers extends [Layer<never, any, any>, ...Array<Layer<never, any, any>>]>(...layers: Layers) => Layer<Success<Layers[number]>, Error<Layers[number]>, Services<Layers[number]>>;
132
+
133
+ export declare const merge: {
134
+
135
+ <RIn, E, ROut>(that: Layer<ROut, E, RIn>): <RIn2, E2, ROut2>(self: Layer<ROut2, E2, RIn2>) => Layer<ROut | ROut2, E | E2, RIn | RIn2>;
136
+
137
+ <const Layers extends [Any, ...Array<Any>]>(that: Layers): <A, E, R>(self: Layer<A, E, R>) => Layer<A | Success<Layers[number]>, E | Error<Layers[number]>, Services<Layers[number]> | R>;
138
+
139
+ <RIn2, E2, ROut2, RIn, E, ROut>(self: Layer<ROut2, E2, RIn2>, that: Layer<ROut, E, RIn>): Layer<ROut | ROut2, E | E2, RIn | RIn2>;
140
+
141
+ <A, E, R, const Layers extends [Any, ...Array<Any>]>(self: Layer<A, E, R>, that: Layers): Layer<A | Success<Layers[number]>, E | Error<Layers[number]>, Services<Layers[number]> | R>;
142
+ };
143
+
144
+ export declare const provide: {
145
+
146
+ <RIn, E, ROut>(that: Layer<ROut, E, RIn>): <RIn2, E2, ROut2>(self: Layer<ROut2, E2, RIn2>) => Layer<ROut2, E | E2, RIn | Exclude<RIn2, ROut>>;
147
+
148
+ <const Layers extends [Any, ...Array<Any>]>(that: Layers): <A, E, R>(self: Layer<A, E, R>) => Layer<A, E | Error<Layers[number]>, Services<Layers[number]> | Exclude<R, Success<Layers[number]>>>;
149
+
150
+ <RIn2, E2, ROut2, RIn, E, ROut>(self: Layer<ROut2, E2, RIn2>, that: Layer<ROut, E, RIn>): Layer<ROut2, E | E2, RIn | Exclude<RIn2, ROut>>;
151
+
152
+ <A, E, R, const Layers extends [Any, ...Array<Any>]>(self: Layer<A, E, R>, that: Layers): Layer<A, E | Error<Layers[number]>, Services<Layers[number]> | Exclude<R, Success<Layers[number]>>>;
153
+ };
154
+
155
+ export declare const provideMerge: {
156
+
157
+ <RIn, E, ROut>(that: Layer<ROut, E, RIn>): <RIn2, E2, ROut2>(self: Layer<ROut2, E2, RIn2>) => Layer<ROut | ROut2, E | E2, RIn | Exclude<RIn2, ROut>>;
158
+
159
+ <const Layers extends [Any, ...Array<Any>]>(that: Layers): <A, E, R>(self: Layer<A, E, R>) => Layer<A | Success<Layers[number]>, E | Error<Layers[number]>, Services<Layers[number]> | Exclude<R, Success<Layers[number]>>>;
160
+
161
+ <RIn2, E2, ROut2, RIn, E, ROut>(self: Layer<ROut2, E2, RIn2>, that: Layer<ROut, E, RIn>): Layer<ROut | ROut2, E | E2, RIn | Exclude<RIn2, ROut>>;
162
+
163
+ <A, E, R, const Layers extends [Any, ...Array<Any>]>(self: Layer<A, E, R>, that: Layers): Layer<A | Success<Layers[number]>, E | Error<Layers[number]>, Services<Layers[number]> | Exclude<R, Success<Layers[number]>>>;
164
+ };
165
+
166
+ export declare const flatMap: {
167
+
168
+ <A, A2, E2, R2>(f: (context: Context.Context<A>) => Layer<A2, E2, R2>): <E, R>(self: Layer<A, E, R>) => Layer<A2, E2 | E, R2 | R>;
169
+
170
+ <A, E, R, A2, E2, R2>(self: Layer<A, E, R>, f: (context: Context.Context<A>) => Layer<A2, E2, R2>): Layer<A2, E | E2, R | R2>;
171
+ };
172
+
173
+ export declare const tap: {
174
+
175
+ <ROut, XR extends ROut, RIn2, E2, X>(f: (context: Context.Context<XR>) => Effect<X, E2, RIn2>): <RIn, E>(self: Layer<ROut, E, RIn>) => Layer<ROut, E | E2, RIn | Exclude<RIn2, Scope.Scope>>;
176
+
177
+ <RIn, E, ROut, XR extends ROut, RIn2, E2, X>(self: Layer<ROut, E, RIn>, f: (context: Context.Context<XR>) => Effect<X, E2, RIn2>): Layer<ROut, E | E2, RIn | Exclude<RIn2, Scope.Scope>>;
178
+ };
179
+
180
+ export declare const tapError: {
181
+
182
+ <E, _XE extends E, RIn2, E2, X>(f: (e: Types.NoInfer<E>) => Effect<X, E2, RIn2>): <RIn, ROut>(self: Layer<ROut, E, RIn>) => Layer<ROut, E | E2, RIn | Exclude<RIn2, Scope.Scope>>;
183
+
184
+ <E, RIn2, E2, X>(f: (e: E) => Effect<X, E2, RIn2>): <RIn, ROut, E1 extends E = E>(self: Layer<ROut, E1, RIn>) => Layer<ROut, E1 | E2, RIn | Exclude<RIn2, Scope.Scope>>;
185
+
186
+ <RIn, E, _XE extends E, ROut, RIn2, E2, X>(self: Layer<ROut, E, RIn>, f: (e: Types.NoInfer<E>) => Effect<X, E2, RIn2>): Layer<ROut, E | E2, RIn | Exclude<RIn2, Scope.Scope>>;
187
+ };
188
+
189
+ export declare const tapCause: {
190
+
191
+ <E, _XE extends E, RIn2, E2, X>(f: (cause: Cause.Cause<Types.NoInfer<E>>) => Effect<X, E2, RIn2>): <RIn, ROut>(self: Layer<ROut, E, RIn>) => Layer<ROut, E | E2, RIn | Exclude<RIn2, Scope.Scope>>;
192
+
193
+ <E, RIn2, E2, X>(f: (cause: Cause.Cause<E>) => Effect<X, E2, RIn2>): <RIn, ROut, E1 extends E = E>(self: Layer<ROut, E1, RIn>) => Layer<ROut, E1 | E2, RIn | Exclude<RIn2, Scope.Scope>>;
194
+
195
+ <RIn, E, _XE extends E, ROut, RIn2, E2, X>(self: Layer<ROut, E, RIn>, f: (cause: Cause.Cause<Types.NoInfer<E>>) => Effect<X, E2, RIn2>): Layer<ROut, E | E2, RIn | Exclude<RIn2, Scope.Scope>>;
196
+ };
197
+
198
+ export declare const orDie: <A, E, R>(self: Layer<A, E, R>) => Layer<A, never, R>;
199
+ declare const catch_: {
200
+ <E, RIn2, E2, ROut2>(onError: (error: E) => Layer<ROut2, E2, RIn2>): <RIn, ROut>(self: Layer<ROut, E, RIn>) => Layer<ROut & ROut2, E2, RIn2 | RIn>;
201
+ <RIn, E, ROut, RIn2, E2, ROut2>(self: Layer<ROut, E, RIn>, onError: (error: E) => Layer<ROut2, E2, RIn2>): Layer<ROut & ROut2, E2, RIn | RIn2>;
202
+ };
203
+ export {
204
+
205
+ catch_ as catch };
206
+
207
+ export declare const catchTag: {
208
+
209
+ <const K extends Types.Tags<E> | NonEmptyReadonlyArray<Types.Tags<E>>, E, RIn2, E2, ROut2>(k: K, f: (e: Types.ExtractTag<Types.NoInfer<E>, K extends NonEmptyReadonlyArray<string> ? K[number] : K>) => Layer<ROut2, E2, RIn2>): <RIn, ROut>(self: Layer<ROut, E, RIn>) => Layer<ROut & ROut2, E2 | Types.ExcludeTag<E, K extends NonEmptyReadonlyArray<string> ? K[number] : K>, RIn2 | RIn>;
210
+
211
+ <RIn, E, ROut, const K extends Types.Tags<E> | NonEmptyReadonlyArray<Types.Tags<E>>, RIn2, E2, ROut2>(self: Layer<ROut, E, RIn>, k: K, f: (e: Types.ExtractTag<E, K extends NonEmptyReadonlyArray<string> ? K[number] : K>) => Layer<ROut2, E2, RIn2>): Layer<ROut & ROut2, E2 | Types.ExcludeTag<E, K extends NonEmptyReadonlyArray<string> ? K[number] : K>, RIn | RIn2>;
212
+ };
213
+
214
+ export declare const catchCause: {
215
+
216
+ <E, RIn2, E2, ROut2>(onError: (cause: Cause.Cause<E>) => Layer<ROut2, E2, RIn2>): <RIn, ROut>(self: Layer<ROut, E, RIn>) => Layer<ROut & ROut2, E2, RIn2 | RIn>;
217
+
218
+ <RIn, E, ROut, RIn2, E2, ROut22>(self: Layer<ROut, E, RIn>, onError: (cause: Cause.Cause<E>) => Layer<ROut22, E2, RIn2>): Layer<ROut & ROut22, E2, RIn | RIn2>;
219
+ };
220
+
221
+ export declare const updateService: {
222
+
223
+ <I, A>(service: Context.Key<I, A>, f: (a: Types.NoInfer<A>) => A): <A1, E1, R1>(layer: Layer<A1, E1, R1>) => Layer<A1, E1, I | R1>;
224
+
225
+ <A1, E1, R1, I, A>(layer: Layer<A1, E1, R1>, service: Context.Key<I, A>, f: (a: Types.NoInfer<A>) => A): Layer<A1, E1, I | R1>;
226
+ };
227
+
228
+ export declare const fresh: <A, E, R>(self: Layer<A, E, R>) => Layer<A, E, R>;
229
+
230
+ export declare const launch: <RIn, E, ROut>(self: Layer<ROut, E, RIn>) => Effect<never, E, RIn>;
231
+
232
+ export type PartialEffectful<A extends object> = Types.Simplify<{
233
+ [K in keyof A as A[K] extends AnyEffectOrStream ? K : never]?: A[K];
234
+ } & {
235
+ [K in keyof A as A[K] extends AnyEffectOrStream ? never : K]: A[K];
236
+ }>;
237
+ type AnyEffectOrStream = Effect<any, any, any> | Stream.Stream<any, any, any> | Channel.Channel<any, any, any, any, any, any, any> | ((...args: any) => Effect<any, any, any>) | ((...args: any) => Stream.Stream<any, any, any>) | ((...args: any) => Channel.Channel<any, any, any, any, any, any, any>);
238
+
239
+ export declare const mock: {
240
+
241
+ <I, S extends object>(service: Context.Key<I, S>): (implementation: PartialEffectful<S>) => Layer<I>;
242
+
243
+ <I, S extends object>(service: Context.Key<I, S>, implementation: Types.NoInfer<PartialEffectful<S>>): Layer<I>;
244
+ };
245
+
246
+ export declare const satisfiesSuccessType: <ROut>() => <ROut2 extends ROut, E, RIn>(layer: Layer<ROut2, E, RIn>) => Layer<ROut2, E, RIn>;
247
+
248
+ export declare const satisfiesErrorType: <E>() => <ROut, E2 extends E, RIn>(layer: Layer<ROut, E2, RIn>) => Layer<ROut, E2, RIn>;
249
+
250
+ export declare const satisfiesServicesType: <RIn>() => <ROut, E, RIn2 extends RIn>(layer: Layer<ROut, E, RIn2>) => Layer<ROut, E, RIn2>;
251
+
252
+ export interface SpanOptions extends Tracer.SpanOptions {
253
+
254
+ readonly onEnd?: ((span: Tracer.Span, exit: Exit.Exit<unknown, unknown>) => Effect<void>) | undefined;
255
+ }
256
+
257
+ export declare const span: (name: string, options?: SpanOptions) => Layer<Tracer.ParentSpan>;
258
+
259
+ export declare const parentSpan: (span: Tracer.AnySpan) => Layer<Tracer.ParentSpan>;
260
+
261
+ export declare const withSpan: {
262
+
263
+ (name: string, options?: SpanOptions): <A, E, R>(self: Layer<A, E, R>) => Layer<A, E, Exclude<R, Tracer.ParentSpan>>;
264
+
265
+ <A, E, R>(self: Layer<A, E, R>, name: string, options?: SpanOptions): Layer<A, E, Exclude<R, Tracer.ParentSpan>>;
266
+ };
267
+
268
+ export declare const withParentSpan: {
269
+
270
+ (span: Tracer.AnySpan, options?: Tracer.TraceOptions): <A, E, R>(self: Layer<A, E, R>) => Layer<A, E, Exclude<R, Tracer.ParentSpan>>;
271
+
272
+ <A, E, R>(self: Layer<A, E, R>, span: Tracer.AnySpan, options?: Tracer.TraceOptions): Layer<A, E, Exclude<R, Tracer.ParentSpan>>;
273
+ };
@@ -0,0 +1,46 @@
1
+
2
+ import type * as Effect from "./Effect.ts";
3
+ import * as Equ from "./Equivalence.ts";
4
+ import * as Ord from "./Order.ts";
5
+
6
+ export type LogLevel = "All" | "Fatal" | "Error" | "Warn" | "Info" | "Debug" | "Trace" | "None";
7
+
8
+ export type Severity = "Fatal" | "Error" | "Warn" | "Info" | "Debug" | "Trace";
9
+
10
+ export declare const values: ReadonlyArray<LogLevel>;
11
+
12
+ export declare const Order: Ord.Order<LogLevel>;
13
+
14
+ export declare const Equivalence: Equ.Equivalence<LogLevel>;
15
+
16
+ export declare const getOrdinal: (self: LogLevel) => number;
17
+
18
+ export declare const isGreaterThan: {
19
+
20
+ (that: LogLevel): (self: LogLevel) => boolean;
21
+
22
+ (self: LogLevel, that: LogLevel): boolean;
23
+ };
24
+
25
+ export declare const isGreaterThanOrEqualTo: {
26
+
27
+ (that: LogLevel): (self: LogLevel) => boolean;
28
+
29
+ (self: LogLevel, that: LogLevel): boolean;
30
+ };
31
+
32
+ export declare const isLessThan: {
33
+
34
+ (that: LogLevel): (self: LogLevel) => boolean;
35
+
36
+ (self: LogLevel, that: LogLevel): boolean;
37
+ };
38
+
39
+ export declare const isLessThanOrEqualTo: {
40
+
41
+ (that: LogLevel): (self: LogLevel) => boolean;
42
+
43
+ (self: LogLevel, that: LogLevel): boolean;
44
+ };
45
+
46
+ export declare const isEnabled: (self: LogLevel) => Effect.Effect<boolean>;
@@ -0,0 +1,106 @@
1
+ import type * as Cause from "./Cause.ts";
2
+ import type * as Context from "./Context.ts";
3
+ import type * as Duration from "./Duration.ts";
4
+ import type * as Effect from "./Effect.ts";
5
+ import type * as Fiber from "./Fiber.ts";
6
+ import * as FileSystem from "./FileSystem.ts";
7
+ import * as Layer from "./Layer.ts";
8
+ import type * as LogLevel from "./LogLevel.ts";
9
+ import type { Pipeable } from "./Pipeable.ts";
10
+ import type { PlatformError } from "./PlatformError.ts";
11
+ import type * as Scope from "./Scope.ts";
12
+ declare const TypeId = "~effect/Logger";
13
+
14
+ export interface Logger<in Message, out Output> extends Pipeable {
15
+ readonly [TypeId]: typeof TypeId;
16
+ log(options: Options<Message>): Output;
17
+ }
18
+
19
+ export interface Options<out Message> {
20
+ readonly message: Message;
21
+ readonly logLevel: LogLevel.LogLevel;
22
+ readonly cause: Cause.Cause<unknown>;
23
+ readonly fiber: Fiber.Fiber<unknown, unknown>;
24
+ readonly date: Date;
25
+ }
26
+
27
+ export declare const isLogger: (u: unknown) => u is Logger<unknown, unknown>;
28
+
29
+ export declare const CurrentLoggers: Context.Reference<ReadonlySet<Logger<unknown, any>>>;
30
+
31
+ export declare const LogToStderr: Context.Reference<boolean>;
32
+
33
+ export declare const map: (<Output, Output2>(f: (output: Output) => Output2) => <Message>(self: Logger<Message, Output>) => Logger<Message, Output2>) & (<Message, Output, Output2>(self: Logger<Message, Output>, f: (output: Output) => Output2) => Logger<Message, Output2>);
34
+
35
+ export declare const withConsoleLog: <Message, Output>(self: Logger<Message, Output>) => Logger<Message, void>;
36
+
37
+ export declare const withConsoleError: <Message, Output>(self: Logger<Message, Output>) => Logger<Message, void>;
38
+
39
+ export declare const withLeveledConsole: <Message, Output>(self: Logger<Message, Output>) => Logger<Message, void>;
40
+
41
+ export declare const make: <Message, Output>(log: (options: Options<Message>) => Output) => Logger<Message, Output>;
42
+
43
+ export declare const defaultLogger: Logger<unknown, void>;
44
+
45
+ export declare const formatSimple: Logger<unknown, string>;
46
+
47
+ export declare const formatLogFmt: Logger<unknown, string>;
48
+
49
+ export declare const formatStructured: Logger<unknown, {
50
+ readonly level: string;
51
+ readonly fiberId: string;
52
+ readonly timestamp: string;
53
+ readonly message: unknown;
54
+ readonly cause: string | undefined;
55
+ readonly annotations: Record<string, unknown>;
56
+ readonly spans: Record<string, number>;
57
+ }>;
58
+
59
+ export declare const formatJson: Logger<unknown, string>;
60
+
61
+ export declare const batched: (<Output>(options: {
62
+ readonly window: Duration.Input;
63
+ readonly flush: (messages: Array<NoInfer<Output>>) => Effect.Effect<void>;
64
+ }) => <Message>(self: Logger<Message, Output>) => Effect.Effect<Logger<Message, void>, never, Scope.Scope>) & (<Message, Output>(self: Logger<Message, Output>, options: {
65
+ readonly window: Duration.Input;
66
+ readonly flush: (messages: Array<NoInfer<Output>>) => Effect.Effect<void>;
67
+ }) => Effect.Effect<Logger<Message, void>, never, Scope.Scope>);
68
+
69
+ export declare const consolePretty: (options?: {
70
+ readonly colors?: "auto" | boolean | undefined;
71
+ readonly formatDate?: ((date: Date) => string) | undefined;
72
+ readonly mode?: "browser" | "tty" | "auto" | undefined;
73
+ }) => Logger<unknown, void>;
74
+
75
+ export declare const consolePrettyBrowser: (options?: {
76
+ readonly colors?: boolean | undefined;
77
+ readonly formatDate?: ((date: Date) => string) | undefined;
78
+ }) => Logger<unknown, void>;
79
+
80
+ export declare const consolePrettyTty: (options?: {
81
+ readonly colors?: boolean | undefined;
82
+ readonly formatDate?: ((date: Date) => string) | undefined;
83
+ }) => Logger<unknown, void>;
84
+
85
+ export declare const consoleLogFmt: Logger<unknown, void>;
86
+
87
+ export declare const consoleStructured: Logger<unknown, void>;
88
+
89
+ export declare const consoleJson: Logger<unknown, void>;
90
+
91
+ export declare const tracerLogger: Logger<unknown, void>;
92
+
93
+ export declare const layer: <const Loggers extends ReadonlyArray<Logger<unknown, unknown> | Effect.Effect<Logger<unknown, unknown>, any, any>>>(loggers: Loggers, options?: {
94
+ readonly mergeWithExisting?: boolean | undefined;
95
+ } | undefined) => Layer.Layer<never, Loggers extends readonly [] ? never : Effect.Error<Loggers[number]>, Exclude<Loggers extends readonly [] ? never : Effect.Services<Loggers[number]>, Scope.Scope>>;
96
+
97
+ export declare const toFile: ((path: string, options?: {
98
+ readonly flag?: FileSystem.OpenFlag | undefined;
99
+ readonly mode?: number | undefined;
100
+ readonly batchWindow?: Duration.Input | undefined;
101
+ } | undefined) => <Message>(self: Logger<Message, string>) => Effect.Effect<Logger<Message, void>, PlatformError, Scope.Scope | FileSystem.FileSystem>) & (<Message>(self: Logger<Message, string>, path: string, options?: {
102
+ readonly flag?: FileSystem.OpenFlag | undefined;
103
+ readonly mode?: number | undefined;
104
+ readonly batchWindow?: Duration.Input | undefined;
105
+ } | undefined) => Effect.Effect<Logger<Message, void>, PlatformError, Scope.Scope | FileSystem.FileSystem>);
106
+ export {};
@@ -0,0 +1,52 @@
1
+ /// <reference lib="esnext.disposable" preserve="true" />
2
+
3
+ import * as Context from "./Context.ts";
4
+ import * as Effect from "./Effect.ts";
5
+ import * as Exit from "./Exit.ts";
6
+ import * as Fiber from "./Fiber.ts";
7
+ import * as Layer from "./Layer.ts";
8
+ import * as Scope from "./Scope.ts";
9
+ declare const TypeId = "~effect/ManagedRuntime";
10
+
11
+ export declare const isManagedRuntime: (input: unknown) => input is ManagedRuntime<unknown, unknown>;
12
+
13
+ export declare namespace ManagedRuntime {
14
+
15
+ type Services<T extends ManagedRuntime<never, any>> = [T] extends [ManagedRuntime<infer R, infer _E>] ? R : never;
16
+
17
+ type Error<T extends ManagedRuntime<never, any>> = [T] extends [ManagedRuntime<infer _R, infer E>] ? E : never;
18
+ }
19
+
20
+ export interface ManagedRuntime<in R, out ER> {
21
+ readonly [TypeId]: typeof TypeId;
22
+ readonly memoMap: Layer.MemoMap;
23
+ readonly contextEffect: Effect.Effect<Context.Context<R>, ER>;
24
+ readonly context: () => Promise<Context.Context<R>>;
25
+ readonly scope: Scope.Closeable;
26
+ cachedContext: Context.Context<R> | undefined;
27
+
28
+ readonly runFork: <A, E>(self: Effect.Effect<A, E, R>, options?: Effect.RunOptions) => Fiber.Fiber<A, E | ER>;
29
+
30
+ readonly runSyncExit: <A, E>(effect: Effect.Effect<A, E, R>) => Exit.Exit<A, ER | E>;
31
+
32
+ readonly runSync: <A, E>(effect: Effect.Effect<A, E, R>) => A;
33
+
34
+ readonly runCallback: <A, E>(effect: Effect.Effect<A, E, R>, options?: (Effect.RunOptions & {
35
+ readonly onExit: (exit: Exit.Exit<A, E | ER>) => void;
36
+ }) | undefined) => (interruptor?: number | undefined) => void;
37
+
38
+ readonly runPromise: <A, E>(effect: Effect.Effect<A, E, R>, options?: Effect.RunOptions) => Promise<A>;
39
+
40
+ readonly runPromiseExit: <A, E>(effect: Effect.Effect<A, E, R>, options?: Effect.RunOptions) => Promise<Exit.Exit<A, ER | E>>;
41
+
42
+ readonly dispose: () => Promise<void>;
43
+
44
+ readonly [Symbol.asyncDispose]: () => Promise<void>;
45
+
46
+ readonly disposeEffect: Effect.Effect<void, never, never>;
47
+ }
48
+
49
+ export declare const make: <R, ER>(layer: Layer.Layer<R, ER, never>, options?: {
50
+ readonly memoMap?: Layer.MemoMap | undefined;
51
+ } | undefined) => ManagedRuntime<R, ER>;
52
+ export {};