Chenloong999 commited on
Commit
1c31855
·
verified ·
1 Parent(s): e5de7b5

backup 2026-08-23T20:24:25.191693 (part 2)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .opencode/node_modules/@opencode-ai/sdk/dist/v2/client.d.ts +1 -0
  2. .opencode/node_modules/@opencode-ai/sdk/dist/v2/client.js +4 -2
  3. .opencode/node_modules/@opencode-ai/sdk/dist/v2/gen/client/types.gen.d.ts +1 -1
  4. .opencode/node_modules/@opencode-ai/sdk/dist/v2/gen/sdk.gen.d.ts +987 -295
  5. .opencode/node_modules/@opencode-ai/sdk/dist/v2/gen/sdk.gen.js +1659 -437
  6. .opencode/node_modules/@opencode-ai/sdk/dist/v2/gen/types.gen.d.ts +0 -0
  7. .opencode/node_modules/@opencode-ai/sdk/package.json +6 -1
  8. .opencode/node_modules/effect/dist/Array.d.ts +0 -0
  9. .opencode/node_modules/effect/dist/Array.d.ts.map +0 -0
  10. .opencode/node_modules/effect/dist/Array.js +942 -342
  11. .opencode/node_modules/effect/dist/Array.js.map +1 -1
  12. .opencode/node_modules/effect/dist/BigDecimal.d.ts +0 -0
  13. .opencode/node_modules/effect/dist/BigDecimal.d.ts.map +1 -1
  14. .opencode/node_modules/effect/dist/BigDecimal.js +617 -291
  15. .opencode/node_modules/effect/dist/BigDecimal.js.map +1 -1
  16. .opencode/node_modules/effect/dist/BigInt.d.ts +813 -297
  17. .opencode/node_modules/effect/dist/BigInt.d.ts.map +1 -1
  18. .opencode/node_modules/effect/dist/BigInt.js +427 -141
  19. .opencode/node_modules/effect/dist/BigInt.js.map +1 -1
  20. .opencode/node_modules/effect/dist/Boolean.d.ts +391 -181
  21. .opencode/node_modules/effect/dist/Boolean.d.ts.map +1 -1
  22. .opencode/node_modules/effect/dist/Boolean.js +207 -83
  23. .opencode/node_modules/effect/dist/Boolean.js.map +1 -1
  24. .opencode/node_modules/effect/dist/Brand.d.ts +104 -27
  25. .opencode/node_modules/effect/dist/Brand.d.ts.map +1 -1
  26. .opencode/node_modules/effect/dist/Brand.js +75 -24
  27. .opencode/node_modules/effect/dist/Brand.js.map +1 -1
  28. .opencode/node_modules/effect/dist/Cache.d.ts +321 -144
  29. .opencode/node_modules/effect/dist/Cache.d.ts.map +1 -1
  30. .opencode/node_modules/effect/dist/Cache.js +145 -62
  31. .opencode/node_modules/effect/dist/Cache.js.map +1 -1
  32. .opencode/node_modules/effect/dist/Cause.d.ts +646 -323
  33. .opencode/node_modules/effect/dist/Cause.d.ts.map +1 -1
  34. .opencode/node_modules/effect/dist/Cause.js +438 -225
  35. .opencode/node_modules/effect/dist/Cause.js.map +1 -1
  36. .opencode/node_modules/effect/dist/Channel.d.ts +0 -0
  37. .opencode/node_modules/effect/dist/Channel.d.ts.map +0 -0
  38. .opencode/node_modules/effect/dist/Channel.js +0 -0
  39. .opencode/node_modules/effect/dist/Channel.js.map +0 -0
  40. .opencode/node_modules/effect/dist/ChannelSchema.d.ts +178 -10
  41. .opencode/node_modules/effect/dist/ChannelSchema.d.ts.map +1 -1
  42. .opencode/node_modules/effect/dist/ChannelSchema.js +98 -6
  43. .opencode/node_modules/effect/dist/ChannelSchema.js.map +1 -1
  44. .opencode/node_modules/effect/dist/Chunk.d.ts +0 -0
  45. .opencode/node_modules/effect/dist/Chunk.d.ts.map +1 -1
  46. .opencode/node_modules/effect/dist/Chunk.js +380 -285
  47. .opencode/node_modules/effect/dist/Chunk.js.map +1 -1
  48. .opencode/node_modules/effect/dist/Clock.d.ts +76 -64
  49. .opencode/node_modules/effect/dist/Clock.d.ts.map +1 -1
  50. .opencode/node_modules/effect/dist/Clock.js +40 -6
.opencode/node_modules/@opencode-ai/sdk/dist/v2/client.d.ts CHANGED
@@ -1,4 +1,5 @@
1
  export * from "./gen/types.gen.js";
 
2
  import { type Config } from "./gen/client/types.gen.js";
3
  import { OpencodeClient } from "./gen/sdk.gen.js";
4
  export { type Config as OpencodeClientConfig, OpencodeClient };
 
1
  export * from "./gen/types.gen.js";
2
+ export type { FileSystemEntry as LocationFileSystemEntry } from "./gen/types.gen.js";
3
  import { type Config } from "./gen/client/types.gen.js";
4
  import { OpencodeClient } from "./gen/sdk.gen.js";
5
  export { type Config as OpencodeClientConfig, OpencodeClient };
.opencode/node_modules/@opencode-ai/sdk/dist/v2/client.js CHANGED
@@ -26,8 +26,10 @@ function rewrite(request, values) {
26
  const value = pick(request.headers.get(name), key === "directory" ? values.directory : values.workspace, key === "directory" ? encodeURIComponent : undefined);
27
  if (!value)
28
  continue;
29
- if (!url.searchParams.has(key)) {
30
- url.searchParams.set(key, value);
 
 
31
  }
32
  changed = true;
33
  }
 
26
  const value = pick(request.headers.get(name), key === "directory" ? values.directory : values.workspace, key === "directory" ? encodeURIComponent : undefined);
27
  if (!value)
28
  continue;
29
+ for (const query of url.pathname.startsWith("/api/") ? [key, `location[${key}]`] : [key]) {
30
+ if (!url.searchParams.has(query)) {
31
+ url.searchParams.set(query, value);
32
+ }
33
  }
34
  changed = true;
35
  }
.opencode/node_modules/@opencode-ai/sdk/dist/v2/gen/client/types.gen.d.ts CHANGED
@@ -85,7 +85,7 @@ export interface ClientOptions {
85
  throwOnError?: boolean;
86
  }
87
  type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = "fields">(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, "method">) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
88
- type SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = "fields">(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, "method">) => Promise<ServerSentEventsResult<TData, TError>>;
89
  type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = "fields">(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, "method"> & Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, "method">) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
90
  type BuildUrlFn = <TData extends {
91
  body?: unknown;
 
85
  throwOnError?: boolean;
86
  }
87
  type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = "fields">(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, "method">) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
88
+ type SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = "fields">(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, "method">) => Promise<ServerSentEventsResult<TData>>;
89
  type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = "fields">(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, "method"> & Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, "method">) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
90
  type BuildUrlFn = <TData extends {
91
  body?: unknown;
.opencode/node_modules/@opencode-ai/sdk/dist/v2/gen/sdk.gen.d.ts CHANGED
@@ -1,5 +1,5 @@
1
  import { type Client, type Options as Options2, type TDataShape } from "./client/index.js";
2
- import type { AgentPartInput, AppAgentsResponses, AppLogErrors, AppLogResponses, AppSkillsResponses, Auth as Auth3, AuthRemoveErrors, AuthRemoveResponses, AuthSetErrors, AuthSetResponses, CommandListResponses, Config as Config3, ConfigGetResponses, ConfigProvidersResponses, ConfigUpdateErrors, ConfigUpdateResponses, EventSubscribeResponses, EventTuiCommandExecute2, EventTuiPromptAppend2, EventTuiSessionSelect2, EventTuiToastShow2, ExperimentalConsoleGetErrors, ExperimentalConsoleGetResponses, ExperimentalConsoleListOrgsErrors, ExperimentalConsoleListOrgsResponses, ExperimentalConsoleSwitchOrgResponses, ExperimentalResourceListResponses, ExperimentalSessionListResponses, ExperimentalWorkspaceAdapterListResponses, ExperimentalWorkspaceCreateErrors, ExperimentalWorkspaceCreateResponses, ExperimentalWorkspaceListResponses, ExperimentalWorkspaceRemoveErrors, ExperimentalWorkspaceRemoveResponses, ExperimentalWorkspaceStatusResponses, ExperimentalWorkspaceSyncListResponses, ExperimentalWorkspaceWarpErrors, ExperimentalWorkspaceWarpResponses, FileListResponses, FilePartInput, FilePartSource, FileReadResponses, FileStatusResponses, FindFilesResponses, FindSymbolsResponses, FindTextResponses, FormatterStatusResponses, GlobalConfigGetResponses, GlobalConfigUpdateErrors, GlobalConfigUpdateResponses, GlobalDisposeResponses, GlobalEventResponses, GlobalHealthResponses, GlobalUpgradeErrors, GlobalUpgradeResponses, InstanceDisposeResponses, LspStatusResponses, McpAddErrors, McpAddResponses, McpAuthAuthenticateErrors, McpAuthAuthenticateResponses, McpAuthCallbackErrors, McpAuthCallbackResponses, McpAuthRemoveErrors, McpAuthRemoveResponses, McpAuthStartErrors, McpAuthStartResponses, McpConnectResponses, McpDisconnectResponses, McpLocalConfig, McpRemoteConfig, McpStatusResponses, OutputFormat, Part as Part2, PartDeleteErrors, PartDeleteResponses, PartUpdateErrors, PartUpdateResponses, PathGetResponses, PermissionListResponses, PermissionReplyErrors, PermissionReplyResponses, PermissionRespondErrors, PermissionRespondResponses, PermissionRuleset, ProjectCurrentResponses, ProjectInitGitResponses, ProjectListResponses, ProjectUpdateErrors, ProjectUpdateResponses, Prompt, ProviderAuthResponses, ProviderListResponses, ProviderOauthAuthorizeErrors, ProviderOauthAuthorizeResponses, ProviderOauthCallbackErrors, ProviderOauthCallbackResponses, PtyConnectErrors, PtyConnectResponses, PtyConnectTokenErrors, PtyConnectTokenResponses, PtyCreateErrors, PtyCreateResponses, PtyGetErrors, PtyGetResponses, PtyListResponses, PtyRemoveErrors, PtyRemoveResponses, PtyShellsResponses, PtyUpdateErrors, PtyUpdateResponses, QuestionAnswer, QuestionListResponses, QuestionRejectErrors, QuestionRejectResponses, QuestionReplyErrors, QuestionReplyResponses, SessionAbortErrors, SessionAbortResponses, SessionChildrenErrors, SessionChildrenResponses, SessionCommandErrors, SessionCommandResponses, SessionCreateErrors, SessionCreateResponses, SessionDeleteErrors, SessionDeleteMessageErrors, SessionDeleteMessageResponses, SessionDeleteResponses, SessionDelivery, SessionDiffResponses, SessionForkErrors, SessionForkResponses, SessionGetErrors, SessionGetResponses, SessionInitErrors, SessionInitResponses, SessionListResponses, SessionMessageErrors, SessionMessageResponses, SessionMessagesErrors, SessionMessagesResponses, SessionPromptAsyncErrors, SessionPromptAsyncResponses, SessionPromptErrors, SessionPromptResponses, SessionRevertErrors, SessionRevertResponses, SessionShareErrors, SessionShareResponses, SessionShellErrors, SessionShellResponses, SessionStatusErrors, SessionStatusResponses, SessionSummarizeErrors, SessionSummarizeResponses, SessionTodoErrors, SessionTodoResponses, SessionUnrevertErrors, SessionUnrevertResponses, SessionUnshareErrors, SessionUnshareResponses, SessionUpdateErrors, SessionUpdateResponses, SubtaskPartInput, SyncHistoryListErrors, SyncHistoryListResponses, SyncReplayErrors, SyncReplayResponses, SyncStartResponses, SyncStealErrors, SyncStealResponses, TextPartInput, ToolIdsErrors, ToolIdsResponses, ToolListErrors, ToolListResponses, TuiAppendPromptErrors, TuiAppendPromptResponses, TuiClearPromptResponses, TuiControlNextResponses, TuiControlResponseResponses, TuiExecuteCommandErrors, TuiExecuteCommandResponses, TuiOpenHelpResponses, TuiOpenModelsResponses, TuiOpenSessionsResponses, TuiOpenThemesResponses, TuiPublishErrors, TuiPublishResponses, TuiSelectSessionErrors, TuiSelectSessionResponses, TuiShowToastResponses, TuiSubmitPromptResponses, V2ModelListResponses, V2ProviderGetErrors, V2ProviderGetResponses, V2ProviderListResponses, V2SessionCompactResponses, V2SessionContextResponses, V2SessionListErrors, V2SessionListResponses, V2SessionMessagesErrors, V2SessionMessagesResponses, V2SessionPromptResponses, V2SessionWaitResponses, VcsApplyErrors, VcsApplyResponses, VcsDiffRawResponses, VcsDiffResponses, VcsGetResponses, VcsStatusResponses, WorktreeCreateErrors, WorktreeCreateInput, WorktreeCreateResponses, WorktreeListErrors, WorktreeListResponses, WorktreeRemoveErrors, WorktreeRemoveInput, WorktreeRemoveResponses, WorktreeResetErrors, WorktreeResetInput, WorktreeResetResponses } from "./types.gen.js";
3
  export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
4
  /**
5
  * You can provide a client instance returned by `createClient()` instead of
@@ -68,7 +68,7 @@ export declare class App extends HeyApiClient {
68
  agents<ThrowOnError extends boolean = false>(parameters?: {
69
  directory?: string;
70
  workspace?: string;
71
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<AppAgentsResponses, unknown, ThrowOnError, "fields">;
72
  /**
73
  * List skills
74
  *
@@ -77,94 +77,30 @@ export declare class App extends HeyApiClient {
77
  skills<ThrowOnError extends boolean = false>(parameters?: {
78
  directory?: string;
79
  workspace?: string;
80
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<AppSkillsResponses, unknown, ThrowOnError, "fields">;
81
  }
82
- export declare class Config extends HeyApiClient {
83
- /**
84
- * Get global configuration
85
- *
86
- * Retrieve the current global OpenCode configuration settings and preferences.
87
- */
88
- get<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<GlobalConfigGetResponses, unknown, ThrowOnError, "fields">;
89
- /**
90
- * Update global configuration
91
- *
92
- * Update global OpenCode configuration settings and preferences.
93
- */
94
- update<ThrowOnError extends boolean = false>(parameters?: {
95
- config?: Config3;
96
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<GlobalConfigUpdateResponses, GlobalConfigUpdateErrors, ThrowOnError, "fields">;
97
- }
98
- export declare class Global extends HeyApiClient {
99
- /**
100
- * Get health
101
- *
102
- * Get health information about the OpenCode server.
103
- */
104
- health<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<GlobalHealthResponses, unknown, ThrowOnError, "fields">;
105
- /**
106
- * Get global events
107
- *
108
- * Subscribe to global events from the OpenCode system using server-sent events.
109
- */
110
- event<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): Promise<import("./core/serverSentEvents.gen.js").ServerSentEventsResult<GlobalEventResponses, unknown>>;
111
- /**
112
- * Dispose instance
113
- *
114
- * Clean up and dispose all OpenCode instances, releasing all resources.
115
- */
116
- dispose<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<GlobalDisposeResponses, unknown, ThrowOnError, "fields">;
117
- /**
118
- * Upgrade opencode
119
- *
120
- * Upgrade opencode to the specified version or latest if not specified.
121
- */
122
- upgrade<ThrowOnError extends boolean = false>(parameters?: {
123
- target?: string;
124
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<GlobalUpgradeResponses, GlobalUpgradeErrors, ThrowOnError, "fields">;
125
- private _config?;
126
- get config(): Config;
127
- }
128
- export declare class Event extends HeyApiClient {
129
  /**
130
- * Subscribe to events
131
  *
132
- * Get events
133
  */
134
- subscribe<ThrowOnError extends boolean = false>(parameters?: {
135
- directory?: string;
136
- workspace?: string;
137
- }, options?: Options<never, ThrowOnError>): Promise<import("./core/serverSentEvents.gen.js").ServerSentEventsResult<EventSubscribeResponses, unknown>>;
 
138
  }
139
- export declare class Config2 extends HeyApiClient {
140
  /**
141
- * Get configuration
142
  *
143
- * Retrieve the current OpenCode configuration settings and preferences.
144
  */
145
  get<ThrowOnError extends boolean = false>(parameters?: {
146
  directory?: string;
147
  workspace?: string;
148
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ConfigGetResponses, unknown, ThrowOnError, "fields">;
149
- /**
150
- * Update configuration
151
- *
152
- * Update OpenCode configuration settings and preferences.
153
- */
154
- update<ThrowOnError extends boolean = false>(parameters?: {
155
- directory?: string;
156
- workspace?: string;
157
- config?: Config3;
158
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ConfigUpdateResponses, ConfigUpdateErrors, ThrowOnError, "fields">;
159
- /**
160
- * List config providers
161
- *
162
- * Get a list of all configured AI providers and their default models.
163
- */
164
- providers<ThrowOnError extends boolean = false>(parameters?: {
165
- directory?: string;
166
- workspace?: string;
167
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ConfigProvidersResponses, unknown, ThrowOnError, "fields">;
168
  }
169
  export declare class Console extends HeyApiClient {
170
  /**
@@ -212,7 +148,17 @@ export declare class Session extends HeyApiClient {
212
  search?: string;
213
  limit?: number;
214
  archived?: boolean | "true" | "false";
215
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalSessionListResponses, unknown, ThrowOnError, "fields">;
 
 
 
 
 
 
 
 
 
 
216
  }
217
  export declare class Resource extends HeyApiClient {
218
  /**
@@ -223,7 +169,20 @@ export declare class Resource extends HeyApiClient {
223
  list<ThrowOnError extends boolean = false>(parameters?: {
224
  directory?: string;
225
  workspace?: string;
226
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalResourceListResponses, unknown, ThrowOnError, "fields">;
 
 
 
 
 
 
 
 
 
 
 
 
 
227
  }
228
  export declare class Adapter extends HeyApiClient {
229
  /**
@@ -234,7 +193,7 @@ export declare class Adapter extends HeyApiClient {
234
  list<ThrowOnError extends boolean = false>(parameters?: {
235
  directory?: string;
236
  workspace?: string;
237
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalWorkspaceAdapterListResponses, unknown, ThrowOnError, "fields">;
238
  }
239
  export declare class Workspace extends HeyApiClient {
240
  /**
@@ -245,7 +204,7 @@ export declare class Workspace extends HeyApiClient {
245
  list<ThrowOnError extends boolean = false>(parameters?: {
246
  directory?: string;
247
  workspace?: string;
248
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalWorkspaceListResponses, unknown, ThrowOnError, "fields">;
249
  /**
250
  * Create workspace
251
  *
@@ -267,7 +226,7 @@ export declare class Workspace extends HeyApiClient {
267
  syncList<ThrowOnError extends boolean = false>(parameters?: {
268
  directory?: string;
269
  workspace?: string;
270
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalWorkspaceSyncListResponses, unknown, ThrowOnError, "fields">;
271
  /**
272
  * Workspace status
273
  *
@@ -276,7 +235,7 @@ export declare class Workspace extends HeyApiClient {
276
  status<ThrowOnError extends boolean = false>(parameters?: {
277
  directory?: string;
278
  workspace?: string;
279
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalWorkspaceStatusResponses, unknown, ThrowOnError, "fields">;
280
  /**
281
  * Remove workspace
282
  *
@@ -303,15 +262,108 @@ export declare class Workspace extends HeyApiClient {
303
  get adapter(): Adapter;
304
  }
305
  export declare class Experimental extends HeyApiClient {
 
 
 
 
306
  private _console?;
307
  get console(): Console;
308
  private _session?;
309
  get session(): Session;
310
  private _resource?;
311
  get resource(): Resource;
 
 
312
  private _workspace?;
313
  get workspace(): Workspace;
314
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
315
  export declare class Tool extends HeyApiClient {
316
  /**
317
  * List tools
@@ -385,7 +437,7 @@ export declare class Find extends HeyApiClient {
385
  directory?: string;
386
  workspace?: string;
387
  pattern: string;
388
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<FindTextResponses, unknown, ThrowOnError, "fields">;
389
  /**
390
  * Find files
391
  *
@@ -398,7 +450,7 @@ export declare class Find extends HeyApiClient {
398
  dirs?: "true" | "false";
399
  type?: "file" | "directory";
400
  limit?: number;
401
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<FindFilesResponses, unknown, ThrowOnError, "fields">;
402
  /**
403
  * Find symbols
404
  *
@@ -408,7 +460,7 @@ export declare class Find extends HeyApiClient {
408
  directory?: string;
409
  workspace?: string;
410
  query: string;
411
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<FindSymbolsResponses, unknown, ThrowOnError, "fields">;
412
  }
413
  export declare class File extends HeyApiClient {
414
  /**
@@ -420,7 +472,7 @@ export declare class File extends HeyApiClient {
420
  directory?: string;
421
  workspace?: string;
422
  path: string;
423
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<FileListResponses, unknown, ThrowOnError, "fields">;
424
  /**
425
  * Read file
426
  *
@@ -430,7 +482,7 @@ export declare class File extends HeyApiClient {
430
  directory?: string;
431
  workspace?: string;
432
  path: string;
433
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<FileReadResponses, unknown, ThrowOnError, "fields">;
434
  /**
435
  * Get file status
436
  *
@@ -439,7 +491,7 @@ export declare class File extends HeyApiClient {
439
  status<ThrowOnError extends boolean = false>(parameters?: {
440
  directory?: string;
441
  workspace?: string;
442
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<FileStatusResponses, unknown, ThrowOnError, "fields">;
443
  }
444
  export declare class Instance extends HeyApiClient {
445
  /**
@@ -450,7 +502,7 @@ export declare class Instance extends HeyApiClient {
450
  dispose<ThrowOnError extends boolean = false>(parameters?: {
451
  directory?: string;
452
  workspace?: string;
453
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<InstanceDisposeResponses, unknown, ThrowOnError, "fields">;
454
  }
455
  export declare class Path extends HeyApiClient {
456
  /**
@@ -461,7 +513,7 @@ export declare class Path extends HeyApiClient {
461
  get<ThrowOnError extends boolean = false>(parameters?: {
462
  directory?: string;
463
  workspace?: string;
464
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PathGetResponses, unknown, ThrowOnError, "fields">;
465
  }
466
  export declare class Diff extends HeyApiClient {
467
  /**
@@ -472,7 +524,7 @@ export declare class Diff extends HeyApiClient {
472
  raw<ThrowOnError extends boolean = false>(parameters?: {
473
  directory?: string;
474
  workspace?: string;
475
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<VcsDiffRawResponses, unknown, ThrowOnError, "fields">;
476
  }
477
  export declare class Vcs extends HeyApiClient {
478
  /**
@@ -483,7 +535,7 @@ export declare class Vcs extends HeyApiClient {
483
  get<ThrowOnError extends boolean = false>(parameters?: {
484
  directory?: string;
485
  workspace?: string;
486
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<VcsGetResponses, unknown, ThrowOnError, "fields">;
487
  /**
488
  * Get VCS status
489
  *
@@ -492,7 +544,7 @@ export declare class Vcs extends HeyApiClient {
492
  status<ThrowOnError extends boolean = false>(parameters?: {
493
  directory?: string;
494
  workspace?: string;
495
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<VcsStatusResponses, unknown, ThrowOnError, "fields">;
496
  /**
497
  * Get VCS diff
498
  *
@@ -502,7 +554,8 @@ export declare class Vcs extends HeyApiClient {
502
  directory?: string;
503
  workspace?: string;
504
  mode: "git" | "branch";
505
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<VcsDiffResponses, unknown, ThrowOnError, "fields">;
 
506
  /**
507
  * Apply VCS patch
508
  *
@@ -525,7 +578,7 @@ export declare class Command extends HeyApiClient {
525
  list<ThrowOnError extends boolean = false>(parameters?: {
526
  directory?: string;
527
  workspace?: string;
528
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<CommandListResponses, unknown, ThrowOnError, "fields">;
529
  }
530
  export declare class Lsp extends HeyApiClient {
531
  /**
@@ -536,7 +589,7 @@ export declare class Lsp extends HeyApiClient {
536
  status<ThrowOnError extends boolean = false>(parameters?: {
537
  directory?: string;
538
  workspace?: string;
539
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<LspStatusResponses, unknown, ThrowOnError, "fields">;
540
  }
541
  export declare class Formatter extends HeyApiClient {
542
  /**
@@ -547,7 +600,7 @@ export declare class Formatter extends HeyApiClient {
547
  status<ThrowOnError extends boolean = false>(parameters?: {
548
  directory?: string;
549
  workspace?: string;
550
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<FormatterStatusResponses, unknown, ThrowOnError, "fields">;
551
  }
552
  export declare class Auth2 extends HeyApiClient {
553
  /**
@@ -601,7 +654,7 @@ export declare class Mcp extends HeyApiClient {
601
  status<ThrowOnError extends boolean = false>(parameters?: {
602
  directory?: string;
603
  workspace?: string;
604
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<McpStatusResponses, unknown, ThrowOnError, "fields">;
605
  /**
606
  * Add MCP server
607
  *
@@ -620,7 +673,7 @@ export declare class Mcp extends HeyApiClient {
620
  name: string;
621
  directory?: string;
622
  workspace?: string;
623
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<McpConnectResponses, unknown, ThrowOnError, "fields">;
624
  /**
625
  * Disconnect an MCP server.
626
  */
@@ -628,7 +681,7 @@ export declare class Mcp extends HeyApiClient {
628
  name: string;
629
  directory?: string;
630
  workspace?: string;
631
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<McpDisconnectResponses, unknown, ThrowOnError, "fields">;
632
  private _auth?;
633
  get auth(): Auth2;
634
  }
@@ -641,7 +694,7 @@ export declare class Project extends HeyApiClient {
641
  list<ThrowOnError extends boolean = false>(parameters?: {
642
  directory?: string;
643
  workspace?: string;
644
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProjectListResponses, unknown, ThrowOnError, "fields">;
645
  /**
646
  * Get current project
647
  *
@@ -650,7 +703,7 @@ export declare class Project extends HeyApiClient {
650
  current<ThrowOnError extends boolean = false>(parameters?: {
651
  directory?: string;
652
  workspace?: string;
653
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProjectCurrentResponses, unknown, ThrowOnError, "fields">;
654
  /**
655
  * Initialize git repository
656
  *
@@ -659,7 +712,7 @@ export declare class Project extends HeyApiClient {
659
  initGit<ThrowOnError extends boolean = false>(parameters?: {
660
  directory?: string;
661
  workspace?: string;
662
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProjectInitGitResponses, unknown, ThrowOnError, "fields">;
663
  /**
664
  * Update project
665
  *
@@ -670,18 +723,19 @@ export declare class Project extends HeyApiClient {
670
  directory?: string;
671
  workspace?: string;
672
  name?: string;
673
- icon?: {
674
- url?: string;
675
- override?: string;
676
- color?: string;
677
- };
678
- commands?: {
679
- /**
680
- * Startup script to run when creating a new workspace (worktree)
681
- */
682
- start?: string;
683
- };
684
  }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProjectUpdateResponses, ProjectUpdateErrors, ThrowOnError, "fields">;
 
 
 
 
 
 
 
 
 
 
685
  }
686
  export declare class Pty extends HeyApiClient {
687
  /**
@@ -692,7 +746,7 @@ export declare class Pty extends HeyApiClient {
692
  shells<ThrowOnError extends boolean = false>(parameters?: {
693
  directory?: string;
694
  workspace?: string;
695
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PtyShellsResponses, unknown, ThrowOnError, "fields">;
696
  /**
697
  * List PTY sessions
698
  *
@@ -701,7 +755,7 @@ export declare class Pty extends HeyApiClient {
701
  list<ThrowOnError extends boolean = false>(parameters?: {
702
  directory?: string;
703
  workspace?: string;
704
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PtyListResponses, unknown, ThrowOnError, "fields">;
705
  /**
706
  * Create PTY session
707
  *
@@ -772,6 +826,8 @@ export declare class Pty extends HeyApiClient {
772
  ptyID: string;
773
  directory?: string;
774
  workspace?: string;
 
 
775
  }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PtyConnectResponses, PtyConnectErrors, ThrowOnError, "fields">;
776
  }
777
  export declare class Question extends HeyApiClient {
@@ -783,7 +839,7 @@ export declare class Question extends HeyApiClient {
783
  list<ThrowOnError extends boolean = false>(parameters?: {
784
  directory?: string;
785
  workspace?: string;
786
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<QuestionListResponses, unknown, ThrowOnError, "fields">;
787
  /**
788
  * Reply to question request
789
  *
@@ -815,7 +871,7 @@ export declare class Permission extends HeyApiClient {
815
  list<ThrowOnError extends boolean = false>(parameters?: {
816
  directory?: string;
817
  workspace?: string;
818
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PermissionListResponses, unknown, ThrowOnError, "fields">;
819
  /**
820
  * Respond to permission request
821
  *
@@ -880,7 +936,7 @@ export declare class Provider extends HeyApiClient {
880
  list<ThrowOnError extends boolean = false>(parameters?: {
881
  directory?: string;
882
  workspace?: string;
883
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProviderListResponses, unknown, ThrowOnError, "fields">;
884
  /**
885
  * Get provider auth methods
886
  *
@@ -889,7 +945,7 @@ export declare class Provider extends HeyApiClient {
889
  auth<ThrowOnError extends boolean = false>(parameters?: {
890
  directory?: string;
891
  workspace?: string;
892
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProviderAuthResponses, unknown, ThrowOnError, "fields">;
893
  private _oauth?;
894
  get oauth(): Oauth;
895
  }
@@ -908,7 +964,7 @@ export declare class Session2 extends HeyApiClient {
908
  start?: number;
909
  search?: string;
910
  limit?: number;
911
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionListResponses, unknown, ThrowOnError, "fields">;
912
  /**
913
  * Create session
914
  *
@@ -925,6 +981,9 @@ export declare class Session2 extends HeyApiClient {
925
  providerID: string;
926
  variant?: string;
927
  };
 
 
 
928
  permission?: PermissionRuleset;
929
  workspaceID?: string;
930
  }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionCreateResponses, SessionCreateErrors, ThrowOnError, "fields">;
@@ -967,6 +1026,9 @@ export declare class Session2 extends HeyApiClient {
967
  directory?: string;
968
  workspace?: string;
969
  title?: string;
 
 
 
970
  permission?: PermissionRuleset;
971
  time?: {
972
  archived?: number;
@@ -1002,7 +1064,7 @@ export declare class Session2 extends HeyApiClient {
1002
  directory?: string;
1003
  workspace?: string;
1004
  messageID?: string;
1005
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionDiffResponses, unknown, ThrowOnError, "fields">;
1006
  /**
1007
  * Get session messages
1008
  *
@@ -1262,7 +1324,7 @@ export declare class Sync extends HeyApiClient {
1262
  start<ThrowOnError extends boolean = false>(parameters?: {
1263
  directory?: string;
1264
  workspace?: string;
1265
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SyncStartResponses, unknown, ThrowOnError, "fields">;
1266
  /**
1267
  * Replay sync events
1268
  *
@@ -1295,256 +1357,886 @@ export declare class Sync extends HeyApiClient {
1295
  private _history?;
1296
  get history(): History;
1297
  }
1298
- export declare class Session3 extends HeyApiClient {
1299
  /**
1300
- * List v2 sessions
1301
  *
1302
- * Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.
1303
  */
1304
- list<ThrowOnError extends boolean = false>(parameters?: {
1305
  directory?: string;
1306
  workspace?: string;
1307
- limit?: number;
1308
- order?: "asc" | "desc";
1309
- path?: string;
1310
- roots?: boolean | "true" | "false";
1311
- start?: number;
1312
- search?: string;
1313
- cursor?: string;
1314
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionListResponses, V2SessionListErrors, ThrowOnError, "fields">;
1315
  /**
1316
- * Send v2 message
1317
  *
1318
- * Create a v2 session message and queue it for the agent loop.
1319
  */
1320
- prompt<ThrowOnError extends boolean = false>(parameters: {
1321
- sessionID: string;
1322
  directory?: string;
1323
  workspace?: string;
1324
- prompt?: Prompt;
1325
- delivery?: SessionDelivery;
1326
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionPromptResponses, unknown, ThrowOnError, "fields">;
 
1327
  /**
1328
- * Compact v2 session
1329
  *
1330
- * Compact a v2 session conversation.
1331
  */
1332
- compact<ThrowOnError extends boolean = false>(parameters: {
1333
- sessionID: string;
1334
  directory?: string;
1335
  workspace?: string;
1336
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionCompactResponses, unknown, ThrowOnError, "fields">;
 
1337
  /**
1338
- * Wait for v2 session
1339
  *
1340
- * Wait for a v2 session agent loop to become idle.
1341
  */
1342
- wait<ThrowOnError extends boolean = false>(parameters: {
1343
- sessionID: string;
1344
  directory?: string;
1345
  workspace?: string;
1346
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionWaitResponses, unknown, ThrowOnError, "fields">;
1347
  /**
1348
- * Get v2 session context
1349
  *
1350
- * Retrieve the active context messages for a v2 session (all messages after the last compaction).
1351
  */
1352
- context<ThrowOnError extends boolean = false>(parameters: {
1353
- sessionID: string;
1354
  directory?: string;
1355
  workspace?: string;
1356
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionContextResponses, unknown, ThrowOnError, "fields">;
1357
  /**
1358
- * Get v2 session messages
1359
  *
1360
- * Retrieve projected v2 messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.
1361
  */
1362
- messages<ThrowOnError extends boolean = false>(parameters: {
1363
- sessionID: string;
1364
  directory?: string;
1365
  workspace?: string;
1366
- limit?: number;
1367
- order?: "asc" | "desc";
1368
- cursor?: string;
1369
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionMessagesResponses, V2SessionMessagesErrors, ThrowOnError, "fields">;
1370
- }
1371
- export declare class Model extends HeyApiClient {
1372
  /**
1373
- * List v2 models
1374
  *
1375
- * Retrieve available v2 models ordered by release date.
1376
  */
1377
- list<ThrowOnError extends boolean = false>(parameters?: {
1378
- location?: {
1379
- directory?: string;
1380
- workspace?: string;
1381
- };
1382
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2ModelListResponses, unknown, ThrowOnError, "fields">;
1383
- }
1384
- export declare class Provider2 extends HeyApiClient {
1385
  /**
1386
- * List v2 providers
1387
  *
1388
- * Retrieve active v2 AI providers so clients can show provider availability and configuration.
1389
  */
1390
- list<ThrowOnError extends boolean = false>(parameters?: {
1391
- location?: {
1392
- directory?: string;
1393
- workspace?: string;
1394
- };
1395
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2ProviderListResponses, unknown, ThrowOnError, "fields">;
1396
  /**
1397
- * Get v2 provider
1398
  *
1399
- * Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.
1400
  */
1401
- get<ThrowOnError extends boolean = false>(parameters: {
1402
- providerID: string;
1403
- location?: {
1404
- directory?: string;
1405
- workspace?: string;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1406
  };
1407
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2ProviderGetResponses, V2ProviderGetErrors, ThrowOnError, "fields">;
 
1408
  }
1409
- export declare class V2 extends HeyApiClient {
1410
- private _session?;
1411
- get session(): Session3;
1412
- private _model?;
1413
- get model(): Model;
1414
- private _provider?;
1415
- get provider(): Provider2;
 
 
 
 
 
1416
  }
1417
- export declare class Control extends HeyApiClient {
1418
  /**
1419
- * Get next TUI request
1420
  *
1421
- * Retrieve the next TUI request from the queue for processing.
1422
  */
1423
- next<ThrowOnError extends boolean = false>(parameters?: {
1424
- directory?: string;
1425
- workspace?: string;
1426
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiControlNextResponses, unknown, ThrowOnError, "fields">;
1427
  /**
1428
- * Submit TUI response
1429
  *
1430
- * Submit a response to the TUI request queue to complete a pending request.
1431
  */
1432
- response<ThrowOnError extends boolean = false>(parameters?: {
1433
- directory?: string;
1434
- workspace?: string;
1435
- body?: unknown;
1436
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiControlResponseResponses, unknown, ThrowOnError, "fields">;
1437
  }
1438
- export declare class Tui extends HeyApiClient {
 
 
 
 
 
 
1439
  /**
1440
- * Append TUI prompt
1441
  *
1442
- * Append prompt to the TUI.
1443
  */
1444
- appendPrompt<ThrowOnError extends boolean = false>(parameters?: {
1445
- directory?: string;
1446
- workspace?: string;
1447
- text?: string;
1448
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiAppendPromptResponses, TuiAppendPromptErrors, ThrowOnError, "fields">;
 
1449
  /**
1450
- * Open help dialog
1451
  *
1452
- * Open the help dialog in the TUI to display user assistance information.
1453
  */
1454
- openHelp<ThrowOnError extends boolean = false>(parameters?: {
1455
- directory?: string;
1456
- workspace?: string;
1457
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiOpenHelpResponses, unknown, ThrowOnError, "fields">;
 
 
 
1458
  /**
1459
- * Open sessions dialog
1460
  *
1461
- * Open the session dialog.
1462
  */
1463
- openSessions<ThrowOnError extends boolean = false>(parameters?: {
1464
- directory?: string;
1465
- workspace?: string;
1466
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiOpenSessionsResponses, unknown, ThrowOnError, "fields">;
 
 
 
 
 
 
 
1467
  /**
1468
- * Open themes dialog
1469
  *
1470
- * Open the theme dialog.
1471
  */
1472
- openThemes<ThrowOnError extends boolean = false>(parameters?: {
1473
- directory?: string;
1474
- workspace?: string;
1475
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiOpenThemesResponses, unknown, ThrowOnError, "fields">;
 
 
 
 
1476
  /**
1477
- * Open models dialog
1478
  *
1479
- * Open the model dialog.
1480
  */
1481
- openModels<ThrowOnError extends boolean = false>(parameters?: {
1482
- directory?: string;
1483
- workspace?: string;
1484
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiOpenModelsResponses, unknown, ThrowOnError, "fields">;
 
 
 
 
1485
  /**
1486
- * Submit TUI prompt
1487
  *
1488
- * Submit the prompt.
1489
  */
1490
- submitPrompt<ThrowOnError extends boolean = false>(parameters?: {
1491
- directory?: string;
1492
- workspace?: string;
1493
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiSubmitPromptResponses, unknown, ThrowOnError, "fields">;
1494
  /**
1495
- * Clear TUI prompt
1496
  *
1497
- * Clear the prompt.
1498
  */
1499
- clearPrompt<ThrowOnError extends boolean = false>(parameters?: {
1500
- directory?: string;
1501
- workspace?: string;
1502
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiClearPromptResponses, unknown, ThrowOnError, "fields">;
 
 
1503
  /**
1504
- * Execute TUI command
1505
  *
1506
- * Execute a TUI command.
1507
  */
1508
- executeCommand<ThrowOnError extends boolean = false>(parameters?: {
1509
- directory?: string;
1510
- workspace?: string;
 
 
1511
  command?: string;
1512
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiExecuteCommandResponses, TuiExecuteCommandErrors, ThrowOnError, "fields">;
 
 
 
 
 
 
1513
  /**
1514
- * Show TUI toast
1515
  *
1516
- * Show a toast notification in the TUI.
1517
  */
1518
- showToast<ThrowOnError extends boolean = false>(parameters?: {
1519
- directory?: string;
1520
- workspace?: string;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1521
  title?: string;
1522
- message?: string;
1523
- variant?: "info" | "success" | "warning" | "error";
1524
- duration?: number;
1525
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiShowToastResponses, unknown, ThrowOnError, "fields">;
 
1526
  /**
1527
- * Publish TUI event
1528
  *
1529
- * Publish a TUI event.
1530
  */
1531
- publish<ThrowOnError extends boolean = false>(parameters?: {
1532
- directory?: string;
1533
- workspace?: string;
1534
- body?: EventTuiPromptAppend2 | EventTuiCommandExecute2 | EventTuiToastShow2 | EventTuiSessionSelect2;
1535
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiPublishResponses, TuiPublishErrors, ThrowOnError, "fields">;
 
 
1536
  /**
1537
- * Select session
1538
  *
1539
- * Navigate the TUI to display the specified session.
1540
  */
1541
- selectSession<ThrowOnError extends boolean = false>(parameters?: {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1542
  directory?: string;
1543
- workspace?: string;
1544
- sessionID?: string;
1545
- }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiSelectSessionResponses, TuiSelectSessionErrors, ThrowOnError, "fields">;
1546
- private _control?;
1547
- get control(): Control;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1548
  }
1549
  export declare class OpencodeClient extends HeyApiClient {
1550
  static readonly __registry: HeyApiRegistry<OpencodeClient>;
@@ -1556,14 +2248,14 @@ export declare class OpencodeClient extends HeyApiClient {
1556
  get auth(): Auth;
1557
  private _app?;
1558
  get app(): App;
 
 
1559
  private _global?;
1560
  get global(): Global;
1561
  private _event?;
1562
  get event(): Event;
1563
  private _config?;
1564
  get config(): Config2;
1565
- private _experimental?;
1566
- get experimental(): Experimental;
1567
  private _tool?;
1568
  get tool(): Tool;
1569
  private _worktree?;
@@ -1602,9 +2294,9 @@ export declare class OpencodeClient extends HeyApiClient {
1602
  get part(): Part;
1603
  private _sync?;
1604
  get sync(): Sync;
1605
- private _v2?;
1606
- get v2(): V2;
1607
  private _tui?;
1608
  get tui(): Tui;
 
 
1609
  }
1610
  export {};
 
1
  import { type Client, type Options as Options2, type TDataShape } from "./client/index.js";
2
+ import type { AgentPartInput, AppAgentsErrors, AppAgentsResponses, AppLogErrors, AppLogResponses, AppSkillsErrors, AppSkillsResponses, Auth as Auth3, AuthRemoveErrors, AuthRemoveResponses, AuthSetErrors, AuthSetResponses, CommandListErrors, CommandListResponses, Config as Config3, ConfigGetErrors, ConfigGetResponses, ConfigProvidersErrors, ConfigProvidersResponses, ConfigUpdateErrors, ConfigUpdateResponses, EventSubscribeResponses, EventTuiCommandExecute, EventTuiPromptAppend, EventTuiSessionSelect, EventTuiToastShow, ExperimentalCapabilitiesGetErrors, ExperimentalCapabilitiesGetResponses, ExperimentalConsoleGetErrors, ExperimentalConsoleGetResponses, ExperimentalConsoleListOrgsErrors, ExperimentalConsoleListOrgsResponses, ExperimentalConsoleSwitchOrgResponses, ExperimentalControlPlaneMoveSessionErrors, ExperimentalControlPlaneMoveSessionResponses, ExperimentalProjectCopyGenerateNameErrors, ExperimentalProjectCopyGenerateNameResponses, ExperimentalResourceListErrors, ExperimentalResourceListResponses, ExperimentalSessionBackgroundErrors, ExperimentalSessionBackgroundResponses, ExperimentalSessionListErrors, ExperimentalSessionListResponses, ExperimentalWorkspaceAdapterListErrors, ExperimentalWorkspaceAdapterListResponses, ExperimentalWorkspaceCreateErrors, ExperimentalWorkspaceCreateResponses, ExperimentalWorkspaceListErrors, ExperimentalWorkspaceListResponses, ExperimentalWorkspaceRemoveErrors, ExperimentalWorkspaceRemoveResponses, ExperimentalWorkspaceStatusErrors, ExperimentalWorkspaceStatusResponses, ExperimentalWorkspaceSyncListErrors, ExperimentalWorkspaceSyncListResponses, ExperimentalWorkspaceWarpErrors, ExperimentalWorkspaceWarpResponses, FileListErrors, FileListResponses, FilePartInput, FilePartSource, FileReadErrors, FileReadResponses, FileStatusErrors, FileStatusResponses, FindFilesErrors, FindFilesResponses, FindSymbolsErrors, FindSymbolsResponses, FindTextErrors, FindTextResponses, FormatterStatusErrors, FormatterStatusResponses, GlobalConfigGetErrors, GlobalConfigGetResponses, GlobalConfigUpdateErrors, GlobalConfigUpdateResponses, GlobalDisposeErrors, GlobalDisposeResponses, GlobalEventResponses, GlobalHealthErrors, GlobalHealthResponses, GlobalUpgradeErrors, GlobalUpgradeResponses, InstanceDisposeErrors, InstanceDisposeResponses, LocationRef, LspStatusErrors, LspStatusResponses, McpAddErrors, McpAddResponses, McpAuthAuthenticateErrors, McpAuthAuthenticateResponses, McpAuthCallbackErrors, McpAuthCallbackResponses, McpAuthRemoveErrors, McpAuthRemoveResponses, McpAuthStartErrors, McpAuthStartResponses, McpConnectErrors, McpConnectResponses, McpDisconnectErrors, McpDisconnectResponses, McpLocalConfig, McpRemoteConfig, McpStatusErrors, McpStatusResponses, ModelRef, MoveSessionDestination, OutputFormat, Part as Part2, PartDeleteErrors, PartDeleteResponses, PartUpdateErrors, PartUpdateResponses, PathGetErrors, PathGetResponses, PermissionListErrors, PermissionListResponses, PermissionReplyErrors, PermissionReplyResponses, PermissionRespondErrors, PermissionRespondResponses, PermissionRuleset, PermissionV2Reply, PermissionV2Source, ProjectCommands, ProjectCurrentErrors, ProjectCurrentResponses, ProjectDirectoriesErrors, ProjectDirectoriesResponses, ProjectIcon, ProjectInitGitErrors, ProjectInitGitResponses, ProjectListErrors, ProjectListResponses, ProjectUpdateErrors, ProjectUpdateResponses, PromptInput, ProviderAuthErrors, ProviderAuthResponses, ProviderListErrors, ProviderListResponses, ProviderOauthAuthorizeErrors, ProviderOauthAuthorizeResponses, ProviderOauthCallbackErrors, ProviderOauthCallbackResponses, PtyConnectErrors, PtyConnectResponses, PtyConnectTokenErrors, PtyConnectTokenResponses, PtyCreateErrors, PtyCreateResponses, PtyGetErrors, PtyGetResponses, PtyListErrors, PtyListResponses, PtyRemoveErrors, PtyRemoveResponses, PtyShellsErrors, PtyShellsResponses, PtyUpdateErrors, PtyUpdateResponses, QuestionAnswer, QuestionListErrors, QuestionListResponses, QuestionRejectErrors, QuestionRejectResponses, QuestionReplyErrors, QuestionReplyResponses, QuestionV2Reply, SessionAbortErrors, SessionAbortResponses, SessionChildrenErrors, SessionChildrenResponses, SessionCommandErrors, SessionCommandResponses, SessionCreateErrors, SessionCreateResponses, SessionDeleteErrors, SessionDeleteMessageErrors, SessionDeleteMessageResponses, SessionDeleteResponses, SessionDiffErrors, SessionDiffResponses, SessionForkErrors, SessionForkResponses, SessionGetErrors, SessionGetResponses, SessionInitErrors, SessionInitResponses, SessionListErrors, SessionListResponses, SessionMessageErrors, SessionMessageResponses, SessionMessagesErrors, SessionMessagesResponses, SessionPromptAsyncErrors, SessionPromptAsyncResponses, SessionPromptErrors, SessionPromptResponses, SessionRevertErrors, SessionRevertResponses, SessionShareErrors, SessionShareResponses, SessionShellErrors, SessionShellResponses, SessionStatusErrors, SessionStatusResponses, SessionSummarizeErrors, SessionSummarizeResponses, SessionTodoErrors, SessionTodoResponses, SessionUnrevertErrors, SessionUnrevertResponses, SessionUnshareErrors, SessionUnshareResponses, SessionUpdateErrors, SessionUpdateResponses, SubtaskPartInput, SyncHistoryListErrors, SyncHistoryListResponses, SyncReplayErrors, SyncReplayResponses, SyncStartErrors, SyncStartResponses, SyncStealErrors, SyncStealResponses, TextPartInput, ToolIdsErrors, ToolIdsResponses, ToolListErrors, ToolListResponses, TuiAppendPromptErrors, TuiAppendPromptResponses, TuiClearPromptErrors, TuiClearPromptResponses, TuiControlNextErrors, TuiControlNextResponses, TuiControlResponseErrors, TuiControlResponseResponses, TuiExecuteCommandErrors, TuiExecuteCommandResponses, TuiOpenHelpErrors, TuiOpenHelpResponses, TuiOpenModelsErrors, TuiOpenModelsResponses, TuiOpenSessionsErrors, TuiOpenSessionsResponses, TuiOpenThemesErrors, TuiOpenThemesResponses, TuiPublishErrors, TuiPublishResponses, TuiSelectSessionErrors, TuiSelectSessionResponses, TuiShowToastErrors, TuiShowToastResponses, TuiSubmitPromptErrors, TuiSubmitPromptResponses, V2AgentListErrors, V2AgentListResponses, V2CommandListErrors, V2CommandListResponses, V2CredentialRemoveErrors, V2CredentialRemoveResponses, V2CredentialUpdateErrors, V2CredentialUpdateResponses, V2EventSubscribeResponses, V2FsFindErrors, V2FsFindResponses, V2FsListErrors, V2FsListResponses, V2FsReadErrors, V2FsReadResponses, V2HealthGetErrors, V2HealthGetResponses, V2IntegrationAttemptCancelErrors, V2IntegrationAttemptCancelResponses, V2IntegrationAttemptCompleteErrors, V2IntegrationAttemptCompleteResponses, V2IntegrationAttemptStatusErrors, V2IntegrationAttemptStatusResponses, V2IntegrationConnectKeyErrors, V2IntegrationConnectKeyResponses, V2IntegrationConnectOauthErrors, V2IntegrationConnectOauthResponses, V2IntegrationGetErrors, V2IntegrationGetResponses, V2IntegrationListErrors, V2IntegrationListResponses, V2LocationGetErrors, V2LocationGetResponses, V2ModelListErrors, V2ModelListResponses, V2PermissionRequestListErrors, V2PermissionRequestListResponses, V2PermissionSavedListErrors, V2PermissionSavedListResponses, V2PermissionSavedRemoveErrors, V2PermissionSavedRemoveResponses, V2ProjectCopyCreateErrors, V2ProjectCopyCreateResponses, V2ProjectCopyRefreshErrors, V2ProjectCopyRefreshResponses, V2ProjectCopyRemoveErrors, V2ProjectCopyRemoveResponses, V2ProviderGetErrors, V2ProviderGetResponses, V2ProviderListErrors, V2ProviderListResponses, V2PtyConnectErrors, V2PtyConnectResponses, V2PtyConnectTokenErrors, V2PtyConnectTokenResponses, V2PtyCreateErrors, V2PtyCreateResponses, V2PtyGetErrors, V2PtyGetResponses, V2PtyListErrors, V2PtyListResponses, V2PtyRemoveErrors, V2PtyRemoveResponses, V2PtyUpdateErrors, V2PtyUpdateResponses, V2QuestionRequestListErrors, V2QuestionRequestListResponses, V2ReferenceListErrors, V2ReferenceListResponses, V2SessionActiveErrors, V2SessionActiveResponses, V2SessionCompactErrors, V2SessionCompactResponses, V2SessionContextErrors, V2SessionContextResponses, V2SessionCreateErrors, V2SessionCreateResponses, V2SessionEventsResponses, V2SessionGetErrors, V2SessionGetResponses, V2SessionHistoryErrors, V2SessionHistoryResponses, V2SessionInterruptErrors, V2SessionInterruptResponses, V2SessionListErrors, V2SessionListResponses, V2SessionMessageErrors, V2SessionMessageResponses, V2SessionMessagesErrors, V2SessionMessagesResponses, V2SessionPermissionCreateErrors, V2SessionPermissionCreateResponses, V2SessionPermissionGetErrors, V2SessionPermissionGetResponses, V2SessionPermissionListErrors, V2SessionPermissionListResponses, V2SessionPermissionReplyErrors, V2SessionPermissionReplyResponses, V2SessionPromptErrors, V2SessionPromptResponses, V2SessionQuestionListErrors, V2SessionQuestionListResponses, V2SessionQuestionRejectErrors, V2SessionQuestionRejectResponses, V2SessionQuestionReplyErrors, V2SessionQuestionReplyResponses, V2SessionRevertClearErrors, V2SessionRevertClearResponses, V2SessionRevertCommitErrors, V2SessionRevertCommitResponses, V2SessionRevertStageErrors, V2SessionRevertStageResponses, V2SessionSwitchAgentErrors, V2SessionSwitchAgentResponses, V2SessionSwitchModelErrors, V2SessionSwitchModelResponses, V2SessionWaitErrors, V2SessionWaitResponses, V2SkillListErrors, V2SkillListResponses, VcsApplyErrors, VcsApplyResponses, VcsDiffErrors, VcsDiffRawErrors, VcsDiffRawResponses, VcsDiffResponses, VcsGetErrors, VcsGetResponses, VcsStatusErrors, VcsStatusResponses, WorktreeCreateErrors, WorktreeCreateInput, WorktreeCreateResponses, WorktreeListErrors, WorktreeListResponses, WorktreeRemoveErrors, WorktreeRemoveInput, WorktreeRemoveResponses, WorktreeResetErrors, WorktreeResetInput, WorktreeResetResponses } from "./types.gen.js";
3
  export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
4
  /**
5
  * You can provide a client instance returned by `createClient()` instead of
 
68
  agents<ThrowOnError extends boolean = false>(parameters?: {
69
  directory?: string;
70
  workspace?: string;
71
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<AppAgentsResponses, AppAgentsErrors, ThrowOnError, "fields">;
72
  /**
73
  * List skills
74
  *
 
77
  skills<ThrowOnError extends boolean = false>(parameters?: {
78
  directory?: string;
79
  workspace?: string;
80
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<AppSkillsResponses, AppSkillsErrors, ThrowOnError, "fields">;
81
  }
82
+ export declare class ControlPlane extends HeyApiClient {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  /**
84
+ * Move session
85
  *
86
+ * Move a session to another project directory, optionally transferring local changes.
87
  */
88
+ moveSession<ThrowOnError extends boolean = false>(parameters?: {
89
+ sessionID?: string;
90
+ destination?: MoveSessionDestination;
91
+ moveChanges?: boolean;
92
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalControlPlaneMoveSessionResponses, ExperimentalControlPlaneMoveSessionErrors, ThrowOnError, "fields">;
93
  }
94
+ export declare class Capabilities extends HeyApiClient {
95
  /**
96
+ * Get experimental capabilities
97
  *
98
+ * Get experimental features enabled on the OpenCode server.
99
  */
100
  get<ThrowOnError extends boolean = false>(parameters?: {
101
  directory?: string;
102
  workspace?: string;
103
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalCapabilitiesGetResponses, ExperimentalCapabilitiesGetErrors, ThrowOnError, "fields">;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  }
105
  export declare class Console extends HeyApiClient {
106
  /**
 
148
  search?: string;
149
  limit?: number;
150
  archived?: boolean | "true" | "false";
151
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalSessionListResponses, ExperimentalSessionListErrors, ThrowOnError, "fields">;
152
+ /**
153
+ * Background subagents
154
+ *
155
+ * Detach any synchronous subagents currently blocking the session and continue them in the background.
156
+ */
157
+ background<ThrowOnError extends boolean = false>(parameters: {
158
+ sessionID: string;
159
+ directory?: string;
160
+ workspace?: string;
161
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalSessionBackgroundResponses, ExperimentalSessionBackgroundErrors, ThrowOnError, "fields">;
162
  }
163
  export declare class Resource extends HeyApiClient {
164
  /**
 
169
  list<ThrowOnError extends boolean = false>(parameters?: {
170
  directory?: string;
171
  workspace?: string;
172
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalResourceListResponses, ExperimentalResourceListErrors, ThrowOnError, "fields">;
173
+ }
174
+ export declare class ProjectCopy extends HeyApiClient {
175
+ /**
176
+ * Generate project copy name
177
+ *
178
+ * Generate a short name for a project copy from task context.
179
+ */
180
+ generateName<ThrowOnError extends boolean = false>(parameters: {
181
+ projectID: string;
182
+ directory?: string;
183
+ workspace?: string;
184
+ context?: string;
185
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalProjectCopyGenerateNameResponses, ExperimentalProjectCopyGenerateNameErrors, ThrowOnError, "fields">;
186
  }
187
  export declare class Adapter extends HeyApiClient {
188
  /**
 
193
  list<ThrowOnError extends boolean = false>(parameters?: {
194
  directory?: string;
195
  workspace?: string;
196
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalWorkspaceAdapterListResponses, ExperimentalWorkspaceAdapterListErrors, ThrowOnError, "fields">;
197
  }
198
  export declare class Workspace extends HeyApiClient {
199
  /**
 
204
  list<ThrowOnError extends boolean = false>(parameters?: {
205
  directory?: string;
206
  workspace?: string;
207
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalWorkspaceListResponses, ExperimentalWorkspaceListErrors, ThrowOnError, "fields">;
208
  /**
209
  * Create workspace
210
  *
 
226
  syncList<ThrowOnError extends boolean = false>(parameters?: {
227
  directory?: string;
228
  workspace?: string;
229
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalWorkspaceSyncListResponses, ExperimentalWorkspaceSyncListErrors, ThrowOnError, "fields">;
230
  /**
231
  * Workspace status
232
  *
 
235
  status<ThrowOnError extends boolean = false>(parameters?: {
236
  directory?: string;
237
  workspace?: string;
238
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalWorkspaceStatusResponses, ExperimentalWorkspaceStatusErrors, ThrowOnError, "fields">;
239
  /**
240
  * Remove workspace
241
  *
 
262
  get adapter(): Adapter;
263
  }
264
  export declare class Experimental extends HeyApiClient {
265
+ private _controlPlane?;
266
+ get controlPlane(): ControlPlane;
267
+ private _capabilities?;
268
+ get capabilities(): Capabilities;
269
  private _console?;
270
  get console(): Console;
271
  private _session?;
272
  get session(): Session;
273
  private _resource?;
274
  get resource(): Resource;
275
+ private _projectCopy?;
276
+ get projectCopy(): ProjectCopy;
277
  private _workspace?;
278
  get workspace(): Workspace;
279
  }
280
+ export declare class Config extends HeyApiClient {
281
+ /**
282
+ * Get global configuration
283
+ *
284
+ * Retrieve the current global OpenCode configuration settings and preferences.
285
+ */
286
+ get<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<GlobalConfigGetResponses, GlobalConfigGetErrors, ThrowOnError, "fields">;
287
+ /**
288
+ * Update global configuration
289
+ *
290
+ * Update global OpenCode configuration settings and preferences.
291
+ */
292
+ update<ThrowOnError extends boolean = false>(parameters?: {
293
+ config?: Config3;
294
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<GlobalConfigUpdateResponses, GlobalConfigUpdateErrors, ThrowOnError, "fields">;
295
+ }
296
+ export declare class Global extends HeyApiClient {
297
+ /**
298
+ * Get health
299
+ *
300
+ * Get health information about the OpenCode server.
301
+ */
302
+ health<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<GlobalHealthResponses, GlobalHealthErrors, ThrowOnError, "fields">;
303
+ /**
304
+ * Get global events
305
+ *
306
+ * Subscribe to global events from the OpenCode system using server-sent events.
307
+ */
308
+ event<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): Promise<import("./core/serverSentEvents.gen.js").ServerSentEventsResult<GlobalEventResponses>>;
309
+ /**
310
+ * Dispose instance
311
+ *
312
+ * Clean up and dispose all OpenCode instances, releasing all resources.
313
+ */
314
+ dispose<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<GlobalDisposeResponses, GlobalDisposeErrors, ThrowOnError, "fields">;
315
+ /**
316
+ * Upgrade opencode
317
+ *
318
+ * Upgrade opencode to the specified version or latest if not specified.
319
+ */
320
+ upgrade<ThrowOnError extends boolean = false>(parameters?: {
321
+ target?: string;
322
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<GlobalUpgradeResponses, GlobalUpgradeErrors, ThrowOnError, "fields">;
323
+ private _config?;
324
+ get config(): Config;
325
+ }
326
+ export declare class Event extends HeyApiClient {
327
+ /**
328
+ * Subscribe to events
329
+ *
330
+ * Get events
331
+ */
332
+ subscribe<ThrowOnError extends boolean = false>(parameters?: {
333
+ directory?: string;
334
+ workspace?: string;
335
+ }, options?: Options<never, ThrowOnError>): Promise<import("./core/serverSentEvents.gen.js").ServerSentEventsResult<EventSubscribeResponses>>;
336
+ }
337
+ export declare class Config2 extends HeyApiClient {
338
+ /**
339
+ * Get configuration
340
+ *
341
+ * Retrieve the current OpenCode configuration settings and preferences.
342
+ */
343
+ get<ThrowOnError extends boolean = false>(parameters?: {
344
+ directory?: string;
345
+ workspace?: string;
346
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ConfigGetResponses, ConfigGetErrors, ThrowOnError, "fields">;
347
+ /**
348
+ * Update configuration
349
+ *
350
+ * Update OpenCode configuration settings and preferences.
351
+ */
352
+ update<ThrowOnError extends boolean = false>(parameters?: {
353
+ directory?: string;
354
+ workspace?: string;
355
+ config?: Config3;
356
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ConfigUpdateResponses, ConfigUpdateErrors, ThrowOnError, "fields">;
357
+ /**
358
+ * List config providers
359
+ *
360
+ * Get a list of all configured AI providers and their default models.
361
+ */
362
+ providers<ThrowOnError extends boolean = false>(parameters?: {
363
+ directory?: string;
364
+ workspace?: string;
365
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ConfigProvidersResponses, ConfigProvidersErrors, ThrowOnError, "fields">;
366
+ }
367
  export declare class Tool extends HeyApiClient {
368
  /**
369
  * List tools
 
437
  directory?: string;
438
  workspace?: string;
439
  pattern: string;
440
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<FindTextResponses, FindTextErrors, ThrowOnError, "fields">;
441
  /**
442
  * Find files
443
  *
 
450
  dirs?: "true" | "false";
451
  type?: "file" | "directory";
452
  limit?: number;
453
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<FindFilesResponses, FindFilesErrors, ThrowOnError, "fields">;
454
  /**
455
  * Find symbols
456
  *
 
460
  directory?: string;
461
  workspace?: string;
462
  query: string;
463
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<FindSymbolsResponses, FindSymbolsErrors, ThrowOnError, "fields">;
464
  }
465
  export declare class File extends HeyApiClient {
466
  /**
 
472
  directory?: string;
473
  workspace?: string;
474
  path: string;
475
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<FileListResponses, FileListErrors, ThrowOnError, "fields">;
476
  /**
477
  * Read file
478
  *
 
482
  directory?: string;
483
  workspace?: string;
484
  path: string;
485
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<FileReadResponses, FileReadErrors, ThrowOnError, "fields">;
486
  /**
487
  * Get file status
488
  *
 
491
  status<ThrowOnError extends boolean = false>(parameters?: {
492
  directory?: string;
493
  workspace?: string;
494
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<FileStatusResponses, FileStatusErrors, ThrowOnError, "fields">;
495
  }
496
  export declare class Instance extends HeyApiClient {
497
  /**
 
502
  dispose<ThrowOnError extends boolean = false>(parameters?: {
503
  directory?: string;
504
  workspace?: string;
505
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<InstanceDisposeResponses, InstanceDisposeErrors, ThrowOnError, "fields">;
506
  }
507
  export declare class Path extends HeyApiClient {
508
  /**
 
513
  get<ThrowOnError extends boolean = false>(parameters?: {
514
  directory?: string;
515
  workspace?: string;
516
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PathGetResponses, PathGetErrors, ThrowOnError, "fields">;
517
  }
518
  export declare class Diff extends HeyApiClient {
519
  /**
 
524
  raw<ThrowOnError extends boolean = false>(parameters?: {
525
  directory?: string;
526
  workspace?: string;
527
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<VcsDiffRawResponses, VcsDiffRawErrors, ThrowOnError, "fields">;
528
  }
529
  export declare class Vcs extends HeyApiClient {
530
  /**
 
535
  get<ThrowOnError extends boolean = false>(parameters?: {
536
  directory?: string;
537
  workspace?: string;
538
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<VcsGetResponses, VcsGetErrors, ThrowOnError, "fields">;
539
  /**
540
  * Get VCS status
541
  *
 
544
  status<ThrowOnError extends boolean = false>(parameters?: {
545
  directory?: string;
546
  workspace?: string;
547
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<VcsStatusResponses, VcsStatusErrors, ThrowOnError, "fields">;
548
  /**
549
  * Get VCS diff
550
  *
 
554
  directory?: string;
555
  workspace?: string;
556
  mode: "git" | "branch";
557
+ context?: number;
558
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<VcsDiffResponses, VcsDiffErrors, ThrowOnError, "fields">;
559
  /**
560
  * Apply VCS patch
561
  *
 
578
  list<ThrowOnError extends boolean = false>(parameters?: {
579
  directory?: string;
580
  workspace?: string;
581
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<CommandListResponses, CommandListErrors, ThrowOnError, "fields">;
582
  }
583
  export declare class Lsp extends HeyApiClient {
584
  /**
 
589
  status<ThrowOnError extends boolean = false>(parameters?: {
590
  directory?: string;
591
  workspace?: string;
592
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<LspStatusResponses, LspStatusErrors, ThrowOnError, "fields">;
593
  }
594
  export declare class Formatter extends HeyApiClient {
595
  /**
 
600
  status<ThrowOnError extends boolean = false>(parameters?: {
601
  directory?: string;
602
  workspace?: string;
603
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<FormatterStatusResponses, FormatterStatusErrors, ThrowOnError, "fields">;
604
  }
605
  export declare class Auth2 extends HeyApiClient {
606
  /**
 
654
  status<ThrowOnError extends boolean = false>(parameters?: {
655
  directory?: string;
656
  workspace?: string;
657
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<McpStatusResponses, McpStatusErrors, ThrowOnError, "fields">;
658
  /**
659
  * Add MCP server
660
  *
 
673
  name: string;
674
  directory?: string;
675
  workspace?: string;
676
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<McpConnectResponses, McpConnectErrors, ThrowOnError, "fields">;
677
  /**
678
  * Disconnect an MCP server.
679
  */
 
681
  name: string;
682
  directory?: string;
683
  workspace?: string;
684
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<McpDisconnectResponses, McpDisconnectErrors, ThrowOnError, "fields">;
685
  private _auth?;
686
  get auth(): Auth2;
687
  }
 
694
  list<ThrowOnError extends boolean = false>(parameters?: {
695
  directory?: string;
696
  workspace?: string;
697
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProjectListResponses, ProjectListErrors, ThrowOnError, "fields">;
698
  /**
699
  * Get current project
700
  *
 
703
  current<ThrowOnError extends boolean = false>(parameters?: {
704
  directory?: string;
705
  workspace?: string;
706
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProjectCurrentResponses, ProjectCurrentErrors, ThrowOnError, "fields">;
707
  /**
708
  * Initialize git repository
709
  *
 
712
  initGit<ThrowOnError extends boolean = false>(parameters?: {
713
  directory?: string;
714
  workspace?: string;
715
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProjectInitGitResponses, ProjectInitGitErrors, ThrowOnError, "fields">;
716
  /**
717
  * Update project
718
  *
 
723
  directory?: string;
724
  workspace?: string;
725
  name?: string;
726
+ icon?: ProjectIcon;
727
+ commands?: ProjectCommands;
 
 
 
 
 
 
 
 
 
728
  }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProjectUpdateResponses, ProjectUpdateErrors, ThrowOnError, "fields">;
729
+ /**
730
+ * List project directories
731
+ *
732
+ * List known local absolute directories for a project.
733
+ */
734
+ directories<ThrowOnError extends boolean = false>(parameters: {
735
+ projectID: string;
736
+ directory?: string;
737
+ workspace?: string;
738
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProjectDirectoriesResponses, ProjectDirectoriesErrors, ThrowOnError, "fields">;
739
  }
740
  export declare class Pty extends HeyApiClient {
741
  /**
 
746
  shells<ThrowOnError extends boolean = false>(parameters?: {
747
  directory?: string;
748
  workspace?: string;
749
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PtyShellsResponses, PtyShellsErrors, ThrowOnError, "fields">;
750
  /**
751
  * List PTY sessions
752
  *
 
755
  list<ThrowOnError extends boolean = false>(parameters?: {
756
  directory?: string;
757
  workspace?: string;
758
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PtyListResponses, PtyListErrors, ThrowOnError, "fields">;
759
  /**
760
  * Create PTY session
761
  *
 
826
  ptyID: string;
827
  directory?: string;
828
  workspace?: string;
829
+ cursor?: string;
830
+ ticket?: string;
831
  }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PtyConnectResponses, PtyConnectErrors, ThrowOnError, "fields">;
832
  }
833
  export declare class Question extends HeyApiClient {
 
839
  list<ThrowOnError extends boolean = false>(parameters?: {
840
  directory?: string;
841
  workspace?: string;
842
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<QuestionListResponses, QuestionListErrors, ThrowOnError, "fields">;
843
  /**
844
  * Reply to question request
845
  *
 
871
  list<ThrowOnError extends boolean = false>(parameters?: {
872
  directory?: string;
873
  workspace?: string;
874
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<PermissionListResponses, PermissionListErrors, ThrowOnError, "fields">;
875
  /**
876
  * Respond to permission request
877
  *
 
936
  list<ThrowOnError extends boolean = false>(parameters?: {
937
  directory?: string;
938
  workspace?: string;
939
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProviderListResponses, ProviderListErrors, ThrowOnError, "fields">;
940
  /**
941
  * Get provider auth methods
942
  *
 
945
  auth<ThrowOnError extends boolean = false>(parameters?: {
946
  directory?: string;
947
  workspace?: string;
948
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ProviderAuthResponses, ProviderAuthErrors, ThrowOnError, "fields">;
949
  private _oauth?;
950
  get oauth(): Oauth;
951
  }
 
964
  start?: number;
965
  search?: string;
966
  limit?: number;
967
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionListResponses, SessionListErrors, ThrowOnError, "fields">;
968
  /**
969
  * Create session
970
  *
 
981
  providerID: string;
982
  variant?: string;
983
  };
984
+ metadata?: {
985
+ [key: string]: unknown;
986
+ };
987
  permission?: PermissionRuleset;
988
  workspaceID?: string;
989
  }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionCreateResponses, SessionCreateErrors, ThrowOnError, "fields">;
 
1026
  directory?: string;
1027
  workspace?: string;
1028
  title?: string;
1029
+ metadata?: {
1030
+ [key: string]: unknown;
1031
+ };
1032
  permission?: PermissionRuleset;
1033
  time?: {
1034
  archived?: number;
 
1064
  directory?: string;
1065
  workspace?: string;
1066
  messageID?: string;
1067
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SessionDiffResponses, SessionDiffErrors, ThrowOnError, "fields">;
1068
  /**
1069
  * Get session messages
1070
  *
 
1324
  start<ThrowOnError extends boolean = false>(parameters?: {
1325
  directory?: string;
1326
  workspace?: string;
1327
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<SyncStartResponses, SyncStartErrors, ThrowOnError, "fields">;
1328
  /**
1329
  * Replay sync events
1330
  *
 
1357
  private _history?;
1358
  get history(): History;
1359
  }
1360
+ export declare class Control extends HeyApiClient {
1361
  /**
1362
+ * Get next TUI request
1363
  *
1364
+ * Retrieve the next TUI request from the queue for processing.
1365
  */
1366
+ next<ThrowOnError extends boolean = false>(parameters?: {
1367
  directory?: string;
1368
  workspace?: string;
1369
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiControlNextResponses, TuiControlNextErrors, ThrowOnError, "fields">;
 
 
 
 
 
 
 
1370
  /**
1371
+ * Submit TUI response
1372
  *
1373
+ * Submit a response to the TUI request queue to complete a pending request.
1374
  */
1375
+ response<ThrowOnError extends boolean = false>(parameters?: {
 
1376
  directory?: string;
1377
  workspace?: string;
1378
+ body?: unknown;
1379
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiControlResponseResponses, TuiControlResponseErrors, ThrowOnError, "fields">;
1380
+ }
1381
+ export declare class Tui extends HeyApiClient {
1382
  /**
1383
+ * Append TUI prompt
1384
  *
1385
+ * Append prompt to the TUI.
1386
  */
1387
+ appendPrompt<ThrowOnError extends boolean = false>(parameters?: {
 
1388
  directory?: string;
1389
  workspace?: string;
1390
+ text?: string;
1391
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiAppendPromptResponses, TuiAppendPromptErrors, ThrowOnError, "fields">;
1392
  /**
1393
+ * Open help dialog
1394
  *
1395
+ * Open the help dialog in the TUI to display user assistance information.
1396
  */
1397
+ openHelp<ThrowOnError extends boolean = false>(parameters?: {
 
1398
  directory?: string;
1399
  workspace?: string;
1400
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiOpenHelpResponses, TuiOpenHelpErrors, ThrowOnError, "fields">;
1401
  /**
1402
+ * Open sessions dialog
1403
  *
1404
+ * Open the session dialog.
1405
  */
1406
+ openSessions<ThrowOnError extends boolean = false>(parameters?: {
 
1407
  directory?: string;
1408
  workspace?: string;
1409
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiOpenSessionsResponses, TuiOpenSessionsErrors, ThrowOnError, "fields">;
1410
  /**
1411
+ * Open themes dialog
1412
  *
1413
+ * Open the theme dialog.
1414
  */
1415
+ openThemes<ThrowOnError extends boolean = false>(parameters?: {
 
1416
  directory?: string;
1417
  workspace?: string;
1418
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiOpenThemesResponses, TuiOpenThemesErrors, ThrowOnError, "fields">;
 
 
 
 
 
1419
  /**
1420
+ * Open models dialog
1421
  *
1422
+ * Open the model dialog.
1423
  */
1424
+ openModels<ThrowOnError extends boolean = false>(parameters?: {
1425
+ directory?: string;
1426
+ workspace?: string;
1427
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiOpenModelsResponses, TuiOpenModelsErrors, ThrowOnError, "fields">;
 
 
 
 
1428
  /**
1429
+ * Submit TUI prompt
1430
  *
1431
+ * Submit the prompt.
1432
  */
1433
+ submitPrompt<ThrowOnError extends boolean = false>(parameters?: {
1434
+ directory?: string;
1435
+ workspace?: string;
1436
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiSubmitPromptResponses, TuiSubmitPromptErrors, ThrowOnError, "fields">;
 
 
1437
  /**
1438
+ * Clear TUI prompt
1439
  *
1440
+ * Clear the prompt.
1441
  */
1442
+ clearPrompt<ThrowOnError extends boolean = false>(parameters?: {
1443
+ directory?: string;
1444
+ workspace?: string;
1445
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiClearPromptResponses, TuiClearPromptErrors, ThrowOnError, "fields">;
1446
+ /**
1447
+ * Execute TUI command
1448
+ *
1449
+ * Execute a TUI command.
1450
+ */
1451
+ executeCommand<ThrowOnError extends boolean = false>(parameters?: {
1452
+ directory?: string;
1453
+ workspace?: string;
1454
+ command?: string;
1455
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiExecuteCommandResponses, TuiExecuteCommandErrors, ThrowOnError, "fields">;
1456
+ /**
1457
+ * Show TUI toast
1458
+ *
1459
+ * Show a toast notification in the TUI.
1460
+ */
1461
+ showToast<ThrowOnError extends boolean = false>(parameters?: {
1462
+ directory?: string;
1463
+ workspace?: string;
1464
+ title?: string;
1465
+ message?: string;
1466
+ variant?: "info" | "success" | "warning" | "error";
1467
+ duration?: number;
1468
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiShowToastResponses, TuiShowToastErrors, ThrowOnError, "fields">;
1469
+ /**
1470
+ * Publish TUI event
1471
+ *
1472
+ * Publish a TUI event.
1473
+ */
1474
+ publish<ThrowOnError extends boolean = false>(parameters?: {
1475
+ directory?: string;
1476
+ workspace?: string;
1477
+ body?: EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventTuiSessionSelect;
1478
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiPublishResponses, TuiPublishErrors, ThrowOnError, "fields">;
1479
+ /**
1480
+ * Select session
1481
+ *
1482
+ * Navigate the TUI to display the specified session.
1483
+ */
1484
+ selectSession<ThrowOnError extends boolean = false>(parameters?: {
1485
+ directory?: string;
1486
+ workspace?: string;
1487
+ sessionID?: string;
1488
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<TuiSelectSessionResponses, TuiSelectSessionErrors, ThrowOnError, "fields">;
1489
+ private _control?;
1490
+ get control(): Control;
1491
+ }
1492
+ export declare class Health extends HeyApiClient {
1493
+ /**
1494
+ * Check server health
1495
+ *
1496
+ * Check whether the API server is ready to accept requests.
1497
+ */
1498
+ get<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2HealthGetResponses, V2HealthGetErrors, ThrowOnError, "fields">;
1499
+ }
1500
+ export declare class Location extends HeyApiClient {
1501
+ /**
1502
+ * Get location
1503
+ *
1504
+ * Resolve the requested location or the server default location.
1505
+ */
1506
+ get<ThrowOnError extends boolean = false>(parameters?: {
1507
+ location?: {
1508
+ directory?: string;
1509
+ workspace?: string;
1510
+ };
1511
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2LocationGetResponses, V2LocationGetErrors, ThrowOnError, "fields">;
1512
+ }
1513
+ export declare class Agent extends HeyApiClient {
1514
+ /**
1515
+ * List agents
1516
+ *
1517
+ * Retrieve currently registered agents.
1518
+ */
1519
+ list<ThrowOnError extends boolean = false>(parameters?: {
1520
+ location?: {
1521
+ directory?: string;
1522
+ workspace?: string;
1523
+ };
1524
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2AgentListResponses, V2AgentListErrors, ThrowOnError, "fields">;
1525
+ }
1526
+ export declare class Revert extends HeyApiClient {
1527
+ /**
1528
+ * Stage session revert
1529
+ *
1530
+ * Stage or move a reversible session boundary and optionally apply its file changes.
1531
+ */
1532
+ stage<ThrowOnError extends boolean = false>(parameters: {
1533
+ sessionID: string;
1534
+ messageID?: string;
1535
+ files?: boolean;
1536
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionRevertStageResponses, V2SessionRevertStageErrors, ThrowOnError, "fields">;
1537
+ /**
1538
+ * Clear staged revert
1539
+ */
1540
+ clear<ThrowOnError extends boolean = false>(parameters: {
1541
+ sessionID: string;
1542
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionRevertClearResponses, V2SessionRevertClearErrors, ThrowOnError, "fields">;
1543
+ /**
1544
+ * Commit staged revert
1545
+ */
1546
+ commit<ThrowOnError extends boolean = false>(parameters: {
1547
+ sessionID: string;
1548
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionRevertCommitResponses, V2SessionRevertCommitErrors, ThrowOnError, "fields">;
1549
+ }
1550
+ export declare class Permission2 extends HeyApiClient {
1551
+ /**
1552
+ * List session permission requests
1553
+ *
1554
+ * Retrieve pending permission requests owned by a session.
1555
+ */
1556
+ list<ThrowOnError extends boolean = false>(parameters: {
1557
+ sessionID: string;
1558
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionPermissionListResponses, V2SessionPermissionListErrors, ThrowOnError, "fields">;
1559
+ /**
1560
+ * Create permission request
1561
+ *
1562
+ * Evaluate and, when approval is required, create a permission request for a session.
1563
+ */
1564
+ create<ThrowOnError extends boolean = false>(parameters: {
1565
+ sessionID: string;
1566
+ id?: string;
1567
+ action?: string;
1568
+ resources?: Array<string>;
1569
+ save?: Array<string>;
1570
+ metadata?: {
1571
+ [key: string]: unknown;
1572
+ };
1573
+ source?: PermissionV2Source;
1574
+ agent?: string;
1575
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionPermissionCreateResponses, V2SessionPermissionCreateErrors, ThrowOnError, "fields">;
1576
+ /**
1577
+ * Get permission request
1578
+ *
1579
+ * Retrieve a pending permission request owned by a session.
1580
+ */
1581
+ get<ThrowOnError extends boolean = false>(parameters: {
1582
+ sessionID: string;
1583
+ requestID: string;
1584
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionPermissionGetResponses, V2SessionPermissionGetErrors, ThrowOnError, "fields">;
1585
+ /**
1586
+ * Reply to pending permission request
1587
+ *
1588
+ * Respond to a pending permission request owned by a session.
1589
+ */
1590
+ reply<ThrowOnError extends boolean = false>(parameters: {
1591
+ sessionID: string;
1592
+ requestID: string;
1593
+ reply?: PermissionV2Reply;
1594
+ message?: string;
1595
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionPermissionReplyResponses, V2SessionPermissionReplyErrors, ThrowOnError, "fields">;
1596
+ }
1597
+ export declare class Question2 extends HeyApiClient {
1598
+ /**
1599
+ * List session question requests
1600
+ *
1601
+ * Retrieve pending question requests owned by a session.
1602
+ */
1603
+ list<ThrowOnError extends boolean = false>(parameters: {
1604
+ sessionID: string;
1605
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionQuestionListResponses, V2SessionQuestionListErrors, ThrowOnError, "fields">;
1606
+ /**
1607
+ * Reply to pending question request
1608
+ *
1609
+ * Answer a pending question request owned by a session.
1610
+ */
1611
+ reply<ThrowOnError extends boolean = false>(parameters: {
1612
+ sessionID: string;
1613
+ requestID: string;
1614
+ questionV2Reply: QuestionV2Reply;
1615
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionQuestionReplyResponses, V2SessionQuestionReplyErrors, ThrowOnError, "fields">;
1616
+ /**
1617
+ * Reject pending question request
1618
+ *
1619
+ * Reject a pending question request owned by a session.
1620
+ */
1621
+ reject<ThrowOnError extends boolean = false>(parameters: {
1622
+ sessionID: string;
1623
+ requestID: string;
1624
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionQuestionRejectResponses, V2SessionQuestionRejectErrors, ThrowOnError, "fields">;
1625
+ }
1626
+ export declare class Session3 extends HeyApiClient {
1627
+ /**
1628
+ * List sessions
1629
+ *
1630
+ * Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.
1631
+ */
1632
+ list<ThrowOnError extends boolean = false>(parameters?: {
1633
+ workspace?: string;
1634
+ limit?: number;
1635
+ order?: "asc" | "desc";
1636
+ search?: string;
1637
+ directory?: string;
1638
+ project?: string;
1639
+ subpath?: string;
1640
+ cursor?: string;
1641
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionListResponses, V2SessionListErrors, ThrowOnError, "fields">;
1642
+ /**
1643
+ * Create session
1644
+ *
1645
+ * Create a session at the requested location.
1646
+ */
1647
+ create<ThrowOnError extends boolean = false>(parameters?: {
1648
+ id?: string;
1649
+ agent?: string;
1650
+ model?: ModelRef;
1651
+ location?: LocationRef;
1652
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionCreateResponses, V2SessionCreateErrors, ThrowOnError, "fields">;
1653
+ /**
1654
+ * List active sessions
1655
+ *
1656
+ * Retrieve foreground Session drains currently owned by this OpenCode process. Sessions absent from the result are inactive.
1657
+ */
1658
+ active<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionActiveResponses, V2SessionActiveErrors, ThrowOnError, "fields">;
1659
+ /**
1660
+ * Get session
1661
+ *
1662
+ * Retrieve a session by ID.
1663
+ */
1664
+ get<ThrowOnError extends boolean = false>(parameters: {
1665
+ sessionID: string;
1666
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionGetResponses, V2SessionGetErrors, ThrowOnError, "fields">;
1667
+ /**
1668
+ * Switch session agent
1669
+ *
1670
+ * Switch the agent used by subsequent provider turns.
1671
+ */
1672
+ switchAgent<ThrowOnError extends boolean = false>(parameters: {
1673
+ sessionID: string;
1674
+ agent?: string;
1675
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionSwitchAgentResponses, V2SessionSwitchAgentErrors, ThrowOnError, "fields">;
1676
+ /**
1677
+ * Switch session model
1678
+ *
1679
+ * Switch the model used by subsequent provider turns.
1680
+ */
1681
+ switchModel<ThrowOnError extends boolean = false>(parameters: {
1682
+ sessionID: string;
1683
+ model?: ModelRef;
1684
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionSwitchModelResponses, V2SessionSwitchModelErrors, ThrowOnError, "fields">;
1685
+ /**
1686
+ * Send message
1687
+ *
1688
+ * Durably admit one session input and schedule agent-loop execution unless resume is false.
1689
+ */
1690
+ prompt<ThrowOnError extends boolean = false>(parameters: {
1691
+ sessionID: string;
1692
+ id?: string;
1693
+ prompt?: PromptInput;
1694
+ delivery?: "steer" | "queue";
1695
+ resume?: boolean;
1696
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionPromptResponses, V2SessionPromptErrors, ThrowOnError, "fields">;
1697
+ /**
1698
+ * Compact session
1699
+ *
1700
+ * Compact a session conversation.
1701
+ */
1702
+ compact<ThrowOnError extends boolean = false>(parameters: {
1703
+ sessionID: string;
1704
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionCompactResponses, V2SessionCompactErrors, ThrowOnError, "fields">;
1705
+ /**
1706
+ * Wait for session
1707
+ *
1708
+ * Wait for a session agent loop to become idle.
1709
+ */
1710
+ wait<ThrowOnError extends boolean = false>(parameters: {
1711
+ sessionID: string;
1712
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionWaitResponses, V2SessionWaitErrors, ThrowOnError, "fields">;
1713
+ /**
1714
+ * Get session context
1715
+ *
1716
+ * Retrieve the active context messages for a session (all messages after the last compaction).
1717
+ */
1718
+ context<ThrowOnError extends boolean = false>(parameters: {
1719
+ sessionID: string;
1720
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionContextResponses, V2SessionContextErrors, ThrowOnError, "fields">;
1721
+ /**
1722
+ * Get session history
1723
+ *
1724
+ * Read one finite page of public durable Session events after an exclusive aggregate sequence. Newly committed events may appear on later pages.
1725
+ */
1726
+ history<ThrowOnError extends boolean = false>(parameters: {
1727
+ sessionID: string;
1728
+ limit?: number;
1729
+ after?: number;
1730
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionHistoryResponses, V2SessionHistoryErrors, ThrowOnError, "fields">;
1731
+ /**
1732
+ * Subscribe to session events
1733
+ *
1734
+ * Replay durable events after an aggregate sequence, then continue with new durable events.
1735
+ */
1736
+ events<ThrowOnError extends boolean = false>(parameters: {
1737
+ sessionID: string;
1738
+ after?: string;
1739
+ }, options?: Options<never, ThrowOnError>): Promise<import("./core/serverSentEvents.gen.js").ServerSentEventsResult<V2SessionEventsResponses>>;
1740
+ /**
1741
+ * Interrupt session execution
1742
+ *
1743
+ * Interrupt active execution owned by this OpenCode process. Idle interruption is a no-op.
1744
+ */
1745
+ interrupt<ThrowOnError extends boolean = false>(parameters: {
1746
+ sessionID: string;
1747
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionInterruptResponses, V2SessionInterruptErrors, ThrowOnError, "fields">;
1748
+ /**
1749
+ * Get session message
1750
+ *
1751
+ * Retrieve one projected message owned by the Session.
1752
+ */
1753
+ message<ThrowOnError extends boolean = false>(parameters: {
1754
+ sessionID: string;
1755
+ messageID: string;
1756
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionMessageResponses, V2SessionMessageErrors, ThrowOnError, "fields">;
1757
+ /**
1758
+ * Get session messages
1759
+ *
1760
+ * Retrieve projected messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.
1761
+ */
1762
+ messages<ThrowOnError extends boolean = false>(parameters: {
1763
+ sessionID: string;
1764
+ limit?: number;
1765
+ order?: "asc" | "desc";
1766
+ cursor?: string;
1767
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SessionMessagesResponses, V2SessionMessagesErrors, ThrowOnError, "fields">;
1768
+ private _revert?;
1769
+ get revert(): Revert;
1770
+ private _permission?;
1771
+ get permission(): Permission2;
1772
+ private _question?;
1773
+ get question(): Question2;
1774
+ }
1775
+ export declare class Model extends HeyApiClient {
1776
+ /**
1777
+ * List models
1778
+ *
1779
+ * Retrieve available models ordered by release date.
1780
+ */
1781
+ list<ThrowOnError extends boolean = false>(parameters?: {
1782
+ location?: {
1783
+ directory?: string;
1784
+ workspace?: string;
1785
+ };
1786
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2ModelListResponses, V2ModelListErrors, ThrowOnError, "fields">;
1787
+ }
1788
+ export declare class Provider2 extends HeyApiClient {
1789
+ /**
1790
+ * List providers
1791
+ *
1792
+ * Retrieve active AI providers so clients can show provider availability and configuration.
1793
+ */
1794
+ list<ThrowOnError extends boolean = false>(parameters?: {
1795
+ location?: {
1796
+ directory?: string;
1797
+ workspace?: string;
1798
+ };
1799
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2ProviderListResponses, V2ProviderListErrors, ThrowOnError, "fields">;
1800
+ /**
1801
+ * Get provider
1802
+ *
1803
+ * Retrieve a single AI provider so clients can inspect its availability and endpoint settings.
1804
+ */
1805
+ get<ThrowOnError extends boolean = false>(parameters: {
1806
+ providerID: string;
1807
+ location?: {
1808
+ directory?: string;
1809
+ workspace?: string;
1810
+ };
1811
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2ProviderGetResponses, V2ProviderGetErrors, ThrowOnError, "fields">;
1812
+ }
1813
+ export declare class Connect extends HeyApiClient {
1814
+ /**
1815
+ * Connect with key
1816
+ *
1817
+ * Run a key authentication method and store the resulting credential.
1818
+ */
1819
+ key<ThrowOnError extends boolean = false>(parameters: {
1820
+ integrationID: string;
1821
+ location?: {
1822
+ directory?: string;
1823
+ workspace?: string;
1824
+ };
1825
+ key?: string;
1826
+ label?: string;
1827
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2IntegrationConnectKeyResponses, V2IntegrationConnectKeyErrors, ThrowOnError, "fields">;
1828
+ /**
1829
+ * Begin OAuth connection
1830
+ *
1831
+ * Start an OAuth attempt and return the authorization details.
1832
+ */
1833
+ oauth<ThrowOnError extends boolean = false>(parameters: {
1834
+ integrationID: string;
1835
+ location?: {
1836
+ directory?: string;
1837
+ workspace?: string;
1838
+ };
1839
+ methodID?: string;
1840
+ inputs?: {
1841
+ [key: string]: string;
1842
+ };
1843
+ label?: string;
1844
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2IntegrationConnectOauthResponses, V2IntegrationConnectOauthErrors, ThrowOnError, "fields">;
1845
+ }
1846
+ export declare class Attempt extends HeyApiClient {
1847
+ /**
1848
+ * Cancel OAuth connection
1849
+ *
1850
+ * Cancel an OAuth attempt and release its resources.
1851
+ */
1852
+ cancel<ThrowOnError extends boolean = false>(parameters: {
1853
+ attemptID: string;
1854
+ location?: {
1855
+ directory?: string;
1856
+ workspace?: string;
1857
+ };
1858
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2IntegrationAttemptCancelResponses, V2IntegrationAttemptCancelErrors, ThrowOnError, "fields">;
1859
+ /**
1860
+ * Get OAuth attempt status
1861
+ *
1862
+ * Poll the current status of an OAuth attempt.
1863
+ */
1864
+ status<ThrowOnError extends boolean = false>(parameters: {
1865
+ attemptID: string;
1866
+ location?: {
1867
+ directory?: string;
1868
+ workspace?: string;
1869
+ };
1870
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2IntegrationAttemptStatusResponses, V2IntegrationAttemptStatusErrors, ThrowOnError, "fields">;
1871
+ /**
1872
+ * Complete OAuth connection
1873
+ *
1874
+ * Complete a code-based OAuth attempt and store the resulting credential.
1875
+ */
1876
+ complete<ThrowOnError extends boolean = false>(parameters: {
1877
+ attemptID: string;
1878
+ location?: {
1879
+ directory?: string;
1880
+ workspace?: string;
1881
+ };
1882
+ code?: string;
1883
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2IntegrationAttemptCompleteResponses, V2IntegrationAttemptCompleteErrors, ThrowOnError, "fields">;
1884
+ }
1885
+ export declare class Integration extends HeyApiClient {
1886
+ /**
1887
+ * List integrations
1888
+ *
1889
+ * Retrieve available integrations and their authentication methods.
1890
+ */
1891
+ list<ThrowOnError extends boolean = false>(parameters?: {
1892
+ location?: {
1893
+ directory?: string;
1894
+ workspace?: string;
1895
+ };
1896
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2IntegrationListResponses, V2IntegrationListErrors, ThrowOnError, "fields">;
1897
+ /**
1898
+ * Get integration
1899
+ *
1900
+ * Retrieve one integration and its authentication methods.
1901
+ */
1902
+ get<ThrowOnError extends boolean = false>(parameters: {
1903
+ integrationID: string;
1904
+ location?: {
1905
+ directory?: string;
1906
+ workspace?: string;
1907
+ };
1908
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2IntegrationGetResponses, V2IntegrationGetErrors, ThrowOnError, "fields">;
1909
+ private _connect?;
1910
+ get connect(): Connect;
1911
+ private _attempt?;
1912
+ get attempt(): Attempt;
1913
+ }
1914
+ export declare class Credential extends HeyApiClient {
1915
+ /**
1916
+ * Remove credential
1917
+ *
1918
+ * Remove a stored integration credential.
1919
+ */
1920
+ remove<ThrowOnError extends boolean = false>(parameters: {
1921
+ credentialID: string;
1922
+ location?: {
1923
+ directory?: string;
1924
+ workspace?: string;
1925
+ };
1926
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2CredentialRemoveResponses, V2CredentialRemoveErrors, ThrowOnError, "fields">;
1927
+ /**
1928
+ * Update credential
1929
+ *
1930
+ * Update a stored credential label.
1931
+ */
1932
+ update<ThrowOnError extends boolean = false>(parameters: {
1933
+ credentialID: string;
1934
+ location?: {
1935
+ directory?: string;
1936
+ workspace?: string;
1937
  };
1938
+ label?: string;
1939
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2CredentialUpdateResponses, V2CredentialUpdateErrors, ThrowOnError, "fields">;
1940
  }
1941
+ export declare class Request extends HeyApiClient {
1942
+ /**
1943
+ * List pending permission requests
1944
+ *
1945
+ * Retrieve pending permission requests for a location.
1946
+ */
1947
+ list<ThrowOnError extends boolean = false>(parameters?: {
1948
+ location?: {
1949
+ directory?: string;
1950
+ workspace?: string;
1951
+ };
1952
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2PermissionRequestListResponses, V2PermissionRequestListErrors, ThrowOnError, "fields">;
1953
  }
1954
+ export declare class Saved extends HeyApiClient {
1955
  /**
1956
+ * List saved permissions
1957
  *
1958
+ * Retrieve saved permissions, optionally filtered by project.
1959
  */
1960
+ list<ThrowOnError extends boolean = false>(parameters?: {
1961
+ projectID?: string;
1962
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2PermissionSavedListResponses, V2PermissionSavedListErrors, ThrowOnError, "fields">;
 
1963
  /**
1964
+ * Remove saved permission
1965
  *
1966
+ * Remove a saved permission by ID.
1967
  */
1968
+ remove<ThrowOnError extends boolean = false>(parameters: {
1969
+ id: string;
1970
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2PermissionSavedRemoveResponses, V2PermissionSavedRemoveErrors, ThrowOnError, "fields">;
 
 
1971
  }
1972
+ export declare class Permission3 extends HeyApiClient {
1973
+ private _request?;
1974
+ get request(): Request;
1975
+ private _saved?;
1976
+ get saved(): Saved;
1977
+ }
1978
+ export declare class Fs extends HeyApiClient {
1979
  /**
1980
+ * Read file
1981
  *
1982
+ * Serve one file relative to the requested location.
1983
  */
1984
+ read<ThrowOnError extends boolean = false>(parameters?: {
1985
+ location?: {
1986
+ directory?: string;
1987
+ workspace?: string;
1988
+ };
1989
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2FsReadResponses, V2FsReadErrors, ThrowOnError, "fields">;
1990
  /**
1991
+ * List directory
1992
  *
1993
+ * List direct children of one directory relative to the requested location.
1994
  */
1995
+ list<ThrowOnError extends boolean = false>(parameters?: {
1996
+ location?: {
1997
+ directory?: string;
1998
+ workspace?: string;
1999
+ };
2000
+ path?: string;
2001
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2FsListResponses, V2FsListErrors, ThrowOnError, "fields">;
2002
  /**
2003
+ * Find files
2004
  *
2005
+ * Find recursively ranked filesystem entries relative to the requested location.
2006
  */
2007
+ find<ThrowOnError extends boolean = false>(parameters: {
2008
+ location?: {
2009
+ directory?: string;
2010
+ workspace?: string;
2011
+ };
2012
+ query: string;
2013
+ type?: "file" | "directory";
2014
+ limit?: string;
2015
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2FsFindResponses, V2FsFindErrors, ThrowOnError, "fields">;
2016
+ }
2017
+ export declare class Command2 extends HeyApiClient {
2018
  /**
2019
+ * List commands
2020
  *
2021
+ * Retrieve currently registered commands.
2022
  */
2023
+ list<ThrowOnError extends boolean = false>(parameters?: {
2024
+ location?: {
2025
+ directory?: string;
2026
+ workspace?: string;
2027
+ };
2028
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2CommandListResponses, V2CommandListErrors, ThrowOnError, "fields">;
2029
+ }
2030
+ export declare class Skill extends HeyApiClient {
2031
  /**
2032
+ * List skills
2033
  *
2034
+ * Retrieve currently registered skills.
2035
  */
2036
+ list<ThrowOnError extends boolean = false>(parameters?: {
2037
+ location?: {
2038
+ directory?: string;
2039
+ workspace?: string;
2040
+ };
2041
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2SkillListResponses, V2SkillListErrors, ThrowOnError, "fields">;
2042
+ }
2043
+ export declare class Event2 extends HeyApiClient {
2044
  /**
2045
+ * Subscribe to events
2046
  *
2047
+ * Subscribe to native event payloads for the server.
2048
  */
2049
+ subscribe<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): Promise<import("./core/serverSentEvents.gen.js").ServerSentEventsResult<V2EventSubscribeResponses>>;
2050
+ }
2051
+ export declare class Pty2 extends HeyApiClient {
 
2052
  /**
2053
+ * List PTY sessions
2054
  *
2055
+ * List PTY sessions for a location, including exited sessions retained until removal.
2056
  */
2057
+ list<ThrowOnError extends boolean = false>(parameters?: {
2058
+ location?: {
2059
+ directory?: string;
2060
+ workspace?: string;
2061
+ };
2062
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2PtyListResponses, V2PtyListErrors, ThrowOnError, "fields">;
2063
  /**
2064
+ * Create PTY session
2065
  *
2066
+ * Create a pseudo-terminal session for a location.
2067
  */
2068
+ create<ThrowOnError extends boolean = false>(parameters?: {
2069
+ location?: {
2070
+ directory?: string;
2071
+ workspace?: string;
2072
+ };
2073
  command?: string;
2074
+ args?: Array<string>;
2075
+ cwd?: string;
2076
+ title?: string;
2077
+ env?: {
2078
+ [key: string]: string;
2079
+ };
2080
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2PtyCreateResponses, V2PtyCreateErrors, ThrowOnError, "fields">;
2081
  /**
2082
+ * Remove PTY session
2083
  *
2084
+ * Terminate and remove one PTY session.
2085
  */
2086
+ remove<ThrowOnError extends boolean = false>(parameters: {
2087
+ ptyID: string;
2088
+ location?: {
2089
+ directory?: string;
2090
+ workspace?: string;
2091
+ };
2092
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2PtyRemoveResponses, V2PtyRemoveErrors, ThrowOnError, "fields">;
2093
+ /**
2094
+ * Get PTY session
2095
+ *
2096
+ * Get one PTY session, including its exit code once exited.
2097
+ */
2098
+ get<ThrowOnError extends boolean = false>(parameters: {
2099
+ ptyID: string;
2100
+ location?: {
2101
+ directory?: string;
2102
+ workspace?: string;
2103
+ };
2104
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2PtyGetResponses, V2PtyGetErrors, ThrowOnError, "fields">;
2105
+ /**
2106
+ * Update PTY session
2107
+ *
2108
+ * Update the title or viewport size of one PTY session.
2109
+ */
2110
+ update<ThrowOnError extends boolean = false>(parameters: {
2111
+ ptyID: string;
2112
+ location?: {
2113
+ directory?: string;
2114
+ workspace?: string;
2115
+ };
2116
  title?: string;
2117
+ size?: {
2118
+ rows: number;
2119
+ cols: number;
2120
+ };
2121
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2PtyUpdateResponses, V2PtyUpdateErrors, ThrowOnError, "fields">;
2122
  /**
2123
+ * Create PTY WebSocket token
2124
  *
2125
+ * Create a short-lived single-use ticket for opening a PTY WebSocket connection.
2126
  */
2127
+ connectToken<ThrowOnError extends boolean = false>(parameters: {
2128
+ ptyID: string;
2129
+ location?: {
2130
+ directory?: string;
2131
+ workspace?: string;
2132
+ };
2133
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2PtyConnectTokenResponses, V2PtyConnectTokenErrors, ThrowOnError, "fields">;
2134
  /**
2135
+ * Connect to PTY session
2136
  *
2137
+ * Establish a WebSocket connection streaming PTY output and accepting terminal input.
2138
  */
2139
+ connect<ThrowOnError extends boolean = false>(parameters: {
2140
+ ptyID: string;
2141
+ "location[directory]"?: string;
2142
+ "location[workspace]"?: string;
2143
+ cursor?: string;
2144
+ ticket?: string;
2145
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2PtyConnectResponses, V2PtyConnectErrors, ThrowOnError, "fields">;
2146
+ }
2147
+ export declare class Request2 extends HeyApiClient {
2148
+ /**
2149
+ * List pending question requests
2150
+ *
2151
+ * Retrieve pending question requests for a location.
2152
+ */
2153
+ list<ThrowOnError extends boolean = false>(parameters?: {
2154
+ location?: {
2155
+ directory?: string;
2156
+ workspace?: string;
2157
+ };
2158
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2QuestionRequestListResponses, V2QuestionRequestListErrors, ThrowOnError, "fields">;
2159
+ }
2160
+ export declare class Question3 extends HeyApiClient {
2161
+ private _request?;
2162
+ get request(): Request2;
2163
+ }
2164
+ export declare class Reference extends HeyApiClient {
2165
+ /**
2166
+ * List references
2167
+ *
2168
+ * List references available in the requested location.
2169
+ */
2170
+ list<ThrowOnError extends boolean = false>(parameters?: {
2171
+ location?: {
2172
+ directory?: string;
2173
+ workspace?: string;
2174
+ };
2175
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2ReferenceListResponses, V2ReferenceListErrors, ThrowOnError, "fields">;
2176
+ }
2177
+ export declare class ProjectCopy2 extends HeyApiClient {
2178
+ remove<ThrowOnError extends boolean = false>(parameters: {
2179
+ projectID: string;
2180
+ location?: {
2181
+ directory?: string;
2182
+ workspace?: string;
2183
+ };
2184
  directory?: string;
2185
+ force?: boolean;
2186
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2ProjectCopyRemoveResponses, V2ProjectCopyRemoveErrors, ThrowOnError, "fields">;
2187
+ create<ThrowOnError extends boolean = false>(parameters: {
2188
+ projectID: string;
2189
+ location?: {
2190
+ directory?: string;
2191
+ workspace?: string;
2192
+ };
2193
+ strategy?: string;
2194
+ directory?: string;
2195
+ name?: string;
2196
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2ProjectCopyCreateResponses, V2ProjectCopyCreateErrors, ThrowOnError, "fields">;
2197
+ refresh<ThrowOnError extends boolean = false>(parameters: {
2198
+ projectID: string;
2199
+ location?: {
2200
+ directory?: string;
2201
+ workspace?: string;
2202
+ };
2203
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<V2ProjectCopyRefreshResponses, V2ProjectCopyRefreshErrors, ThrowOnError, "fields">;
2204
+ }
2205
+ export declare class V2 extends HeyApiClient {
2206
+ private _health?;
2207
+ get health(): Health;
2208
+ private _location?;
2209
+ get location(): Location;
2210
+ private _agent?;
2211
+ get agent(): Agent;
2212
+ private _session?;
2213
+ get session(): Session3;
2214
+ private _model?;
2215
+ get model(): Model;
2216
+ private _provider?;
2217
+ get provider(): Provider2;
2218
+ private _integration?;
2219
+ get integration(): Integration;
2220
+ private _credential?;
2221
+ get credential(): Credential;
2222
+ private _permission?;
2223
+ get permission(): Permission3;
2224
+ private _fs?;
2225
+ get fs(): Fs;
2226
+ private _command?;
2227
+ get command(): Command2;
2228
+ private _skill?;
2229
+ get skill(): Skill;
2230
+ private _event?;
2231
+ get event(): Event2;
2232
+ private _pty?;
2233
+ get pty(): Pty2;
2234
+ private _question?;
2235
+ get question(): Question3;
2236
+ private _reference?;
2237
+ get reference(): Reference;
2238
+ private _projectCopy?;
2239
+ get projectCopy(): ProjectCopy2;
2240
  }
2241
  export declare class OpencodeClient extends HeyApiClient {
2242
  static readonly __registry: HeyApiRegistry<OpencodeClient>;
 
2248
  get auth(): Auth;
2249
  private _app?;
2250
  get app(): App;
2251
+ private _experimental?;
2252
+ get experimental(): Experimental;
2253
  private _global?;
2254
  get global(): Global;
2255
  private _event?;
2256
  get event(): Event;
2257
  private _config?;
2258
  get config(): Config2;
 
 
2259
  private _tool?;
2260
  get tool(): Tool;
2261
  private _worktree?;
 
2294
  get part(): Part;
2295
  private _sync?;
2296
  get sync(): Sync;
 
 
2297
  private _tui?;
2298
  get tui(): Tui;
2299
+ private _v2?;
2300
+ get v2(): V2;
2301
  }
2302
  export {};
.opencode/node_modules/@opencode-ai/sdk/dist/v2/gen/sdk.gen.js CHANGED
@@ -132,154 +132,24 @@ export class App extends HeyApiClient {
132
  });
133
  }
134
  }
135
- export class Config extends HeyApiClient {
136
- /**
137
- * Get global configuration
138
- *
139
- * Retrieve the current global OpenCode configuration settings and preferences.
140
- */
141
- get(options) {
142
- return (options?.client ?? this.client).get({
143
- url: "/global/config",
144
- ...options,
145
- });
146
- }
147
- /**
148
- * Update global configuration
149
- *
150
- * Update global OpenCode configuration settings and preferences.
151
- */
152
- update(parameters, options) {
153
- const params = buildClientParams([parameters], [{ args: [{ key: "config", map: "body" }] }]);
154
- return (options?.client ?? this.client).patch({
155
- url: "/global/config",
156
- ...options,
157
- ...params,
158
- headers: {
159
- "Content-Type": "application/json",
160
- ...options?.headers,
161
- ...params.headers,
162
- },
163
- });
164
- }
165
- }
166
- export class Global extends HeyApiClient {
167
- /**
168
- * Get health
169
- *
170
- * Get health information about the OpenCode server.
171
- */
172
- health(options) {
173
- return (options?.client ?? this.client).get({
174
- url: "/global/health",
175
- ...options,
176
- });
177
- }
178
- /**
179
- * Get global events
180
- *
181
- * Subscribe to global events from the OpenCode system using server-sent events.
182
- */
183
- event(options) {
184
- return (options?.client ?? this.client).sse.get({
185
- url: "/global/event",
186
- ...options,
187
- });
188
- }
189
- /**
190
- * Dispose instance
191
- *
192
- * Clean up and dispose all OpenCode instances, releasing all resources.
193
- */
194
- dispose(options) {
195
- return (options?.client ?? this.client).post({
196
- url: "/global/dispose",
197
- ...options,
198
- });
199
- }
200
- /**
201
- * Upgrade opencode
202
- *
203
- * Upgrade opencode to the specified version or latest if not specified.
204
- */
205
- upgrade(parameters, options) {
206
- const params = buildClientParams([parameters], [{ args: [{ in: "body", key: "target" }] }]);
207
- return (options?.client ?? this.client).post({
208
- url: "/global/upgrade",
209
- ...options,
210
- ...params,
211
- headers: {
212
- "Content-Type": "application/json",
213
- ...options?.headers,
214
- ...params.headers,
215
- },
216
- });
217
- }
218
- _config;
219
- get config() {
220
- return (this._config ??= new Config({ client: this.client }));
221
- }
222
- }
223
- export class Event extends HeyApiClient {
224
- /**
225
- * Subscribe to events
226
- *
227
- * Get events
228
- */
229
- subscribe(parameters, options) {
230
- const params = buildClientParams([parameters], [
231
- {
232
- args: [
233
- { in: "query", key: "directory" },
234
- { in: "query", key: "workspace" },
235
- ],
236
- },
237
- ]);
238
- return (options?.client ?? this.client).sse.get({
239
- url: "/event",
240
- ...options,
241
- ...params,
242
- });
243
- }
244
- }
245
- export class Config2 extends HeyApiClient {
246
- /**
247
- * Get configuration
248
- *
249
- * Retrieve the current OpenCode configuration settings and preferences.
250
- */
251
- get(parameters, options) {
252
- const params = buildClientParams([parameters], [
253
- {
254
- args: [
255
- { in: "query", key: "directory" },
256
- { in: "query", key: "workspace" },
257
- ],
258
- },
259
- ]);
260
- return (options?.client ?? this.client).get({
261
- url: "/config",
262
- ...options,
263
- ...params,
264
- });
265
- }
266
  /**
267
- * Update configuration
268
  *
269
- * Update OpenCode configuration settings and preferences.
270
  */
271
- update(parameters, options) {
272
  const params = buildClientParams([parameters], [
273
  {
274
  args: [
275
- { in: "query", key: "directory" },
276
- { in: "query", key: "workspace" },
277
- { key: "config", map: "body" },
278
  ],
279
  },
280
  ]);
281
- return (options?.client ?? this.client).patch({
282
- url: "/config",
283
  ...options,
284
  ...params,
285
  headers: {
@@ -289,12 +159,14 @@ export class Config2 extends HeyApiClient {
289
  },
290
  });
291
  }
 
 
292
  /**
293
- * List config providers
294
  *
295
- * Get a list of all configured AI providers and their default models.
296
  */
297
- providers(parameters, options) {
298
  const params = buildClientParams([parameters], [
299
  {
300
  args: [
@@ -304,7 +176,7 @@ export class Config2 extends HeyApiClient {
304
  },
305
  ]);
306
  return (options?.client ?? this.client).get({
307
- url: "/config/providers",
308
  ...options,
309
  ...params,
310
  });
@@ -406,6 +278,27 @@ export class Session extends HeyApiClient {
406
  ...params,
407
  });
408
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
409
  }
410
  export class Resource extends HeyApiClient {
411
  /**
@@ -429,6 +322,35 @@ export class Resource extends HeyApiClient {
429
  });
430
  }
431
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
432
  export class Adapter extends HeyApiClient {
433
  /**
434
  * List workspace adapters
@@ -596,6 +518,14 @@ export class Workspace extends HeyApiClient {
596
  }
597
  }
598
  export class Experimental extends HeyApiClient {
 
 
 
 
 
 
 
 
599
  _console;
600
  get console() {
601
  return (this._console ??= new Console({ client: this.client }));
@@ -608,73 +538,36 @@ export class Experimental extends HeyApiClient {
608
  get resource() {
609
  return (this._resource ??= new Resource({ client: this.client }));
610
  }
 
 
 
 
611
  _workspace;
612
  get workspace() {
613
  return (this._workspace ??= new Workspace({ client: this.client }));
614
  }
615
  }
616
- export class Tool extends HeyApiClient {
617
- /**
618
- * List tools
619
- *
620
- * Get a list of available tools with their JSON schema parameters for a specific provider and model combination.
621
- */
622
- list(parameters, options) {
623
- const params = buildClientParams([parameters], [
624
- {
625
- args: [
626
- { in: "query", key: "directory" },
627
- { in: "query", key: "workspace" },
628
- { in: "query", key: "provider" },
629
- { in: "query", key: "model" },
630
- ],
631
- },
632
- ]);
633
- return (options?.client ?? this.client).get({
634
- url: "/experimental/tool",
635
- ...options,
636
- ...params,
637
- });
638
- }
639
  /**
640
- * List tool IDs
641
  *
642
- * Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.
643
  */
644
- ids(parameters, options) {
645
- const params = buildClientParams([parameters], [
646
- {
647
- args: [
648
- { in: "query", key: "directory" },
649
- { in: "query", key: "workspace" },
650
- ],
651
- },
652
- ]);
653
  return (options?.client ?? this.client).get({
654
- url: "/experimental/tool/ids",
655
  ...options,
656
- ...params,
657
  });
658
  }
659
- }
660
- export class Worktree extends HeyApiClient {
661
  /**
662
- * Remove worktree
663
  *
664
- * Remove a git worktree and delete its branch.
665
  */
666
- remove(parameters, options) {
667
- const params = buildClientParams([parameters], [
668
- {
669
- args: [
670
- { in: "query", key: "directory" },
671
- { in: "query", key: "workspace" },
672
- { key: "worktreeRemoveInput", map: "body" },
673
- ],
674
- },
675
- ]);
676
- return (options?.client ?? this.client).delete({
677
- url: "/experimental/worktree",
678
  ...options,
679
  ...params,
680
  headers: {
@@ -684,8 +577,227 @@ export class Worktree extends HeyApiClient {
684
  },
685
  });
686
  }
 
 
687
  /**
688
- * List worktrees
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
689
  *
690
  * List all sandbox worktrees for the current project.
691
  */
@@ -1008,6 +1120,7 @@ export class Vcs extends HeyApiClient {
1008
  { in: "query", key: "directory" },
1009
  { in: "query", key: "workspace" },
1010
  { in: "query", key: "mode" },
 
1011
  ],
1012
  },
1013
  ]);
@@ -1387,6 +1500,27 @@ export class Project extends HeyApiClient {
1387
  },
1388
  });
1389
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1390
  }
1391
  export class Pty extends HeyApiClient {
1392
  /**
@@ -1562,6 +1696,8 @@ export class Pty extends HeyApiClient {
1562
  { in: "path", key: "ptyID" },
1563
  { in: "query", key: "directory" },
1564
  { in: "query", key: "workspace" },
 
 
1565
  ],
1566
  },
1567
  ]);
@@ -1868,6 +2004,7 @@ export class Session2 extends HeyApiClient {
1868
  { in: "body", key: "title" },
1869
  { in: "body", key: "agent" },
1870
  { in: "body", key: "model" },
 
1871
  { in: "body", key: "permission" },
1872
  { in: "body", key: "workspaceID" },
1873
  ],
@@ -1959,6 +2096,7 @@ export class Session2 extends HeyApiClient {
1959
  { in: "query", key: "directory" },
1960
  { in: "query", key: "workspace" },
1961
  { in: "body", key: "title" },
 
1962
  { in: "body", key: "permission" },
1963
  { in: "body", key: "time" },
1964
  ],
@@ -2602,241 +2740,33 @@ export class Sync extends HeyApiClient {
2602
  return (this._history ??= new History({ client: this.client }));
2603
  }
2604
  }
2605
- export class Session3 extends HeyApiClient {
2606
  /**
2607
- * List v2 sessions
2608
  *
2609
- * Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.
2610
  */
2611
- list(parameters, options) {
2612
  const params = buildClientParams([parameters], [
2613
  {
2614
  args: [
2615
  { in: "query", key: "directory" },
2616
  { in: "query", key: "workspace" },
2617
- { in: "query", key: "limit" },
2618
- { in: "query", key: "order" },
2619
- { in: "query", key: "path" },
2620
- { in: "query", key: "roots" },
2621
- { in: "query", key: "start" },
2622
- { in: "query", key: "search" },
2623
- { in: "query", key: "cursor" },
2624
  ],
2625
  },
2626
  ]);
2627
  return (options?.client ?? this.client).get({
2628
- url: "/api/session",
2629
  ...options,
2630
  ...params,
2631
  });
2632
  }
2633
  /**
2634
- * Send v2 message
2635
  *
2636
- * Create a v2 session message and queue it for the agent loop.
2637
  */
2638
- prompt(parameters, options) {
2639
- const params = buildClientParams([parameters], [
2640
- {
2641
- args: [
2642
- { in: "path", key: "sessionID" },
2643
- { in: "query", key: "directory" },
2644
- { in: "query", key: "workspace" },
2645
- { in: "body", key: "prompt" },
2646
- { in: "body", key: "delivery" },
2647
- ],
2648
- },
2649
- ]);
2650
- return (options?.client ?? this.client).post({
2651
- url: "/api/session/{sessionID}/prompt",
2652
- ...options,
2653
- ...params,
2654
- headers: {
2655
- "Content-Type": "application/json",
2656
- ...options?.headers,
2657
- ...params.headers,
2658
- },
2659
- });
2660
- }
2661
- /**
2662
- * Compact v2 session
2663
- *
2664
- * Compact a v2 session conversation.
2665
- */
2666
- compact(parameters, options) {
2667
- const params = buildClientParams([parameters], [
2668
- {
2669
- args: [
2670
- { in: "path", key: "sessionID" },
2671
- { in: "query", key: "directory" },
2672
- { in: "query", key: "workspace" },
2673
- ],
2674
- },
2675
- ]);
2676
- return (options?.client ?? this.client).post({
2677
- url: "/api/session/{sessionID}/compact",
2678
- ...options,
2679
- ...params,
2680
- });
2681
- }
2682
- /**
2683
- * Wait for v2 session
2684
- *
2685
- * Wait for a v2 session agent loop to become idle.
2686
- */
2687
- wait(parameters, options) {
2688
- const params = buildClientParams([parameters], [
2689
- {
2690
- args: [
2691
- { in: "path", key: "sessionID" },
2692
- { in: "query", key: "directory" },
2693
- { in: "query", key: "workspace" },
2694
- ],
2695
- },
2696
- ]);
2697
- return (options?.client ?? this.client).post({
2698
- url: "/api/session/{sessionID}/wait",
2699
- ...options,
2700
- ...params,
2701
- });
2702
- }
2703
- /**
2704
- * Get v2 session context
2705
- *
2706
- * Retrieve the active context messages for a v2 session (all messages after the last compaction).
2707
- */
2708
- context(parameters, options) {
2709
- const params = buildClientParams([parameters], [
2710
- {
2711
- args: [
2712
- { in: "path", key: "sessionID" },
2713
- { in: "query", key: "directory" },
2714
- { in: "query", key: "workspace" },
2715
- ],
2716
- },
2717
- ]);
2718
- return (options?.client ?? this.client).get({
2719
- url: "/api/session/{sessionID}/context",
2720
- ...options,
2721
- ...params,
2722
- });
2723
- }
2724
- /**
2725
- * Get v2 session messages
2726
- *
2727
- * Retrieve projected v2 messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.
2728
- */
2729
- messages(parameters, options) {
2730
- const params = buildClientParams([parameters], [
2731
- {
2732
- args: [
2733
- { in: "path", key: "sessionID" },
2734
- { in: "query", key: "directory" },
2735
- { in: "query", key: "workspace" },
2736
- { in: "query", key: "limit" },
2737
- { in: "query", key: "order" },
2738
- { in: "query", key: "cursor" },
2739
- ],
2740
- },
2741
- ]);
2742
- return (options?.client ?? this.client).get({
2743
- url: "/api/session/{sessionID}/message",
2744
- ...options,
2745
- ...params,
2746
- });
2747
- }
2748
- }
2749
- export class Model extends HeyApiClient {
2750
- /**
2751
- * List v2 models
2752
- *
2753
- * Retrieve available v2 models ordered by release date.
2754
- */
2755
- list(parameters, options) {
2756
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
2757
- return (options?.client ?? this.client).get({
2758
- url: "/api/model",
2759
- ...options,
2760
- ...params,
2761
- });
2762
- }
2763
- }
2764
- export class Provider2 extends HeyApiClient {
2765
- /**
2766
- * List v2 providers
2767
- *
2768
- * Retrieve active v2 AI providers so clients can show provider availability and configuration.
2769
- */
2770
- list(parameters, options) {
2771
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
2772
- return (options?.client ?? this.client).get({
2773
- url: "/api/provider",
2774
- ...options,
2775
- ...params,
2776
- });
2777
- }
2778
- /**
2779
- * Get v2 provider
2780
- *
2781
- * Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.
2782
- */
2783
- get(parameters, options) {
2784
- const params = buildClientParams([parameters], [
2785
- {
2786
- args: [
2787
- { in: "path", key: "providerID" },
2788
- { in: "query", key: "location" },
2789
- ],
2790
- },
2791
- ]);
2792
- return (options?.client ?? this.client).get({
2793
- url: "/api/provider/{providerID}",
2794
- ...options,
2795
- ...params,
2796
- });
2797
- }
2798
- }
2799
- export class V2 extends HeyApiClient {
2800
- _session;
2801
- get session() {
2802
- return (this._session ??= new Session3({ client: this.client }));
2803
- }
2804
- _model;
2805
- get model() {
2806
- return (this._model ??= new Model({ client: this.client }));
2807
- }
2808
- _provider;
2809
- get provider() {
2810
- return (this._provider ??= new Provider2({ client: this.client }));
2811
- }
2812
- }
2813
- export class Control extends HeyApiClient {
2814
- /**
2815
- * Get next TUI request
2816
- *
2817
- * Retrieve the next TUI request from the queue for processing.
2818
- */
2819
- next(parameters, options) {
2820
- const params = buildClientParams([parameters], [
2821
- {
2822
- args: [
2823
- { in: "query", key: "directory" },
2824
- { in: "query", key: "workspace" },
2825
- ],
2826
- },
2827
- ]);
2828
- return (options?.client ?? this.client).get({
2829
- url: "/tui/control/next",
2830
- ...options,
2831
- ...params,
2832
- });
2833
- }
2834
- /**
2835
- * Submit TUI response
2836
- *
2837
- * Submit a response to the TUI request queue to complete a pending request.
2838
- */
2839
- response(parameters, options) {
2840
  const params = buildClientParams([parameters], [
2841
  {
2842
  args: [
@@ -3117,36 +3047,1328 @@ export class Tui extends HeyApiClient {
3117
  return (this._control ??= new Control({ client: this.client }));
3118
  }
3119
  }
3120
- export class OpencodeClient extends HeyApiClient {
3121
- static __registry = new HeyApiRegistry();
3122
- constructor(args) {
3123
- super(args);
3124
- OpencodeClient.__registry.set(this, args?.key);
3125
- }
3126
- _auth;
3127
- get auth() {
3128
- return (this._auth ??= new Auth({ client: this.client }));
 
 
3129
  }
3130
- _app;
3131
- get app() {
3132
- return (this._app ??= new App({ client: this.client }));
 
 
 
 
 
 
 
 
 
 
 
3133
  }
3134
- _global;
3135
- get global() {
3136
- return (this._global ??= new Global({ client: this.client }));
 
 
 
 
 
 
 
 
 
 
 
3137
  }
3138
- _event;
3139
- get event() {
3140
- return (this._event ??= new Event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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3145
  }
3146
  _experimental;
3147
  get experimental() {
3148
  return (this._experimental ??= new Experimental({ client: this.client }));
3149
  }
 
 
 
 
 
 
 
 
 
 
 
 
3150
  _tool;
3151
  get tool() {
3152
  return (this._tool ??= new Tool({ client: this.client }));
@@ -3223,12 +4445,12 @@ export class OpencodeClient extends HeyApiClient {
3223
  get sync() {
3224
  return (this._sync ??= new Sync({ client: this.client }));
3225
  }
3226
- _v2;
3227
- get v2() {
3228
- return (this._v2 ??= new V2({ client: this.client }));
3229
- }
3230
  _tui;
3231
  get tui() {
3232
  return (this._tui ??= new Tui({ client: this.client }));
3233
  }
 
 
 
 
3234
  }
 
132
  });
133
  }
134
  }
135
+ export class ControlPlane extends HeyApiClient {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
136
  /**
137
+ * Move session
138
  *
139
+ * Move a session to another project directory, optionally transferring local changes.
140
  */
141
+ moveSession(parameters, options) {
142
  const params = buildClientParams([parameters], [
143
  {
144
  args: [
145
+ { in: "body", key: "sessionID" },
146
+ { in: "body", key: "destination" },
147
+ { in: "body", key: "moveChanges" },
148
  ],
149
  },
150
  ]);
151
+ return (options?.client ?? this.client).post({
152
+ url: "/experimental/control-plane/move-session",
153
  ...options,
154
  ...params,
155
  headers: {
 
159
  },
160
  });
161
  }
162
+ }
163
+ export class Capabilities extends HeyApiClient {
164
  /**
165
+ * Get experimental capabilities
166
  *
167
+ * Get experimental features enabled on the OpenCode server.
168
  */
169
+ get(parameters, options) {
170
  const params = buildClientParams([parameters], [
171
  {
172
  args: [
 
176
  },
177
  ]);
178
  return (options?.client ?? this.client).get({
179
+ url: "/experimental/capabilities",
180
  ...options,
181
  ...params,
182
  });
 
278
  ...params,
279
  });
280
  }
281
+ /**
282
+ * Background subagents
283
+ *
284
+ * Detach any synchronous subagents currently blocking the session and continue them in the background.
285
+ */
286
+ background(parameters, options) {
287
+ const params = buildClientParams([parameters], [
288
+ {
289
+ args: [
290
+ { in: "path", key: "sessionID" },
291
+ { in: "query", key: "directory" },
292
+ { in: "query", key: "workspace" },
293
+ ],
294
+ },
295
+ ]);
296
+ return (options?.client ?? this.client).post({
297
+ url: "/experimental/session/{sessionID}/background",
298
+ ...options,
299
+ ...params,
300
+ });
301
+ }
302
  }
303
  export class Resource extends HeyApiClient {
304
  /**
 
322
  });
323
  }
324
  }
325
+ export class ProjectCopy extends HeyApiClient {
326
+ /**
327
+ * Generate project copy name
328
+ *
329
+ * Generate a short name for a project copy from task context.
330
+ */
331
+ generateName(parameters, options) {
332
+ const params = buildClientParams([parameters], [
333
+ {
334
+ args: [
335
+ { in: "path", key: "projectID" },
336
+ { in: "query", key: "directory" },
337
+ { in: "query", key: "workspace" },
338
+ { in: "body", key: "context" },
339
+ ],
340
+ },
341
+ ]);
342
+ return (options?.client ?? this.client).post({
343
+ url: "/experimental/project/{projectID}/copy/generate-name",
344
+ ...options,
345
+ ...params,
346
+ headers: {
347
+ "Content-Type": "application/json",
348
+ ...options?.headers,
349
+ ...params.headers,
350
+ },
351
+ });
352
+ }
353
+ }
354
  export class Adapter extends HeyApiClient {
355
  /**
356
  * List workspace adapters
 
518
  }
519
  }
520
  export class Experimental extends HeyApiClient {
521
+ _controlPlane;
522
+ get controlPlane() {
523
+ return (this._controlPlane ??= new ControlPlane({ client: this.client }));
524
+ }
525
+ _capabilities;
526
+ get capabilities() {
527
+ return (this._capabilities ??= new Capabilities({ client: this.client }));
528
+ }
529
  _console;
530
  get console() {
531
  return (this._console ??= new Console({ client: this.client }));
 
538
  get resource() {
539
  return (this._resource ??= new Resource({ client: this.client }));
540
  }
541
+ _projectCopy;
542
+ get projectCopy() {
543
+ return (this._projectCopy ??= new ProjectCopy({ client: this.client }));
544
+ }
545
  _workspace;
546
  get workspace() {
547
  return (this._workspace ??= new Workspace({ client: this.client }));
548
  }
549
  }
550
+ export class Config extends HeyApiClient {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
551
  /**
552
+ * Get global configuration
553
  *
554
+ * Retrieve the current global OpenCode configuration settings and preferences.
555
  */
556
+ get(options) {
 
 
 
 
 
 
 
 
557
  return (options?.client ?? this.client).get({
558
+ url: "/global/config",
559
  ...options,
 
560
  });
561
  }
 
 
562
  /**
563
+ * Update global configuration
564
  *
565
+ * Update global OpenCode configuration settings and preferences.
566
  */
567
+ update(parameters, options) {
568
+ const params = buildClientParams([parameters], [{ args: [{ key: "config", map: "body" }] }]);
569
+ return (options?.client ?? this.client).patch({
570
+ url: "/global/config",
 
 
 
 
 
 
 
 
571
  ...options,
572
  ...params,
573
  headers: {
 
577
  },
578
  });
579
  }
580
+ }
581
+ export class Global extends HeyApiClient {
582
  /**
583
+ * Get health
584
+ *
585
+ * Get health information about the OpenCode server.
586
+ */
587
+ health(options) {
588
+ return (options?.client ?? this.client).get({
589
+ url: "/global/health",
590
+ ...options,
591
+ });
592
+ }
593
+ /**
594
+ * Get global events
595
+ *
596
+ * Subscribe to global events from the OpenCode system using server-sent events.
597
+ */
598
+ event(options) {
599
+ return (options?.client ?? this.client).sse.get({
600
+ url: "/global/event",
601
+ ...options,
602
+ });
603
+ }
604
+ /**
605
+ * Dispose instance
606
+ *
607
+ * Clean up and dispose all OpenCode instances, releasing all resources.
608
+ */
609
+ dispose(options) {
610
+ return (options?.client ?? this.client).post({
611
+ url: "/global/dispose",
612
+ ...options,
613
+ });
614
+ }
615
+ /**
616
+ * Upgrade opencode
617
+ *
618
+ * Upgrade opencode to the specified version or latest if not specified.
619
+ */
620
+ upgrade(parameters, options) {
621
+ const params = buildClientParams([parameters], [{ args: [{ in: "body", key: "target" }] }]);
622
+ return (options?.client ?? this.client).post({
623
+ url: "/global/upgrade",
624
+ ...options,
625
+ ...params,
626
+ headers: {
627
+ "Content-Type": "application/json",
628
+ ...options?.headers,
629
+ ...params.headers,
630
+ },
631
+ });
632
+ }
633
+ _config;
634
+ get config() {
635
+ return (this._config ??= new Config({ client: this.client }));
636
+ }
637
+ }
638
+ export class Event extends HeyApiClient {
639
+ /**
640
+ * Subscribe to events
641
+ *
642
+ * Get events
643
+ */
644
+ subscribe(parameters, options) {
645
+ const params = buildClientParams([parameters], [
646
+ {
647
+ args: [
648
+ { in: "query", key: "directory" },
649
+ { in: "query", key: "workspace" },
650
+ ],
651
+ },
652
+ ]);
653
+ return (options?.client ?? this.client).sse.get({
654
+ url: "/event",
655
+ ...options,
656
+ ...params,
657
+ });
658
+ }
659
+ }
660
+ export class Config2 extends HeyApiClient {
661
+ /**
662
+ * Get configuration
663
+ *
664
+ * Retrieve the current OpenCode configuration settings and preferences.
665
+ */
666
+ get(parameters, options) {
667
+ const params = buildClientParams([parameters], [
668
+ {
669
+ args: [
670
+ { in: "query", key: "directory" },
671
+ { in: "query", key: "workspace" },
672
+ ],
673
+ },
674
+ ]);
675
+ return (options?.client ?? this.client).get({
676
+ url: "/config",
677
+ ...options,
678
+ ...params,
679
+ });
680
+ }
681
+ /**
682
+ * Update configuration
683
+ *
684
+ * Update OpenCode configuration settings and preferences.
685
+ */
686
+ update(parameters, options) {
687
+ const params = buildClientParams([parameters], [
688
+ {
689
+ args: [
690
+ { in: "query", key: "directory" },
691
+ { in: "query", key: "workspace" },
692
+ { key: "config", map: "body" },
693
+ ],
694
+ },
695
+ ]);
696
+ return (options?.client ?? this.client).patch({
697
+ url: "/config",
698
+ ...options,
699
+ ...params,
700
+ headers: {
701
+ "Content-Type": "application/json",
702
+ ...options?.headers,
703
+ ...params.headers,
704
+ },
705
+ });
706
+ }
707
+ /**
708
+ * List config providers
709
+ *
710
+ * Get a list of all configured AI providers and their default models.
711
+ */
712
+ providers(parameters, options) {
713
+ const params = buildClientParams([parameters], [
714
+ {
715
+ args: [
716
+ { in: "query", key: "directory" },
717
+ { in: "query", key: "workspace" },
718
+ ],
719
+ },
720
+ ]);
721
+ return (options?.client ?? this.client).get({
722
+ url: "/config/providers",
723
+ ...options,
724
+ ...params,
725
+ });
726
+ }
727
+ }
728
+ export class Tool extends HeyApiClient {
729
+ /**
730
+ * List tools
731
+ *
732
+ * Get a list of available tools with their JSON schema parameters for a specific provider and model combination.
733
+ */
734
+ list(parameters, options) {
735
+ const params = buildClientParams([parameters], [
736
+ {
737
+ args: [
738
+ { in: "query", key: "directory" },
739
+ { in: "query", key: "workspace" },
740
+ { in: "query", key: "provider" },
741
+ { in: "query", key: "model" },
742
+ ],
743
+ },
744
+ ]);
745
+ return (options?.client ?? this.client).get({
746
+ url: "/experimental/tool",
747
+ ...options,
748
+ ...params,
749
+ });
750
+ }
751
+ /**
752
+ * List tool IDs
753
+ *
754
+ * Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.
755
+ */
756
+ ids(parameters, options) {
757
+ const params = buildClientParams([parameters], [
758
+ {
759
+ args: [
760
+ { in: "query", key: "directory" },
761
+ { in: "query", key: "workspace" },
762
+ ],
763
+ },
764
+ ]);
765
+ return (options?.client ?? this.client).get({
766
+ url: "/experimental/tool/ids",
767
+ ...options,
768
+ ...params,
769
+ });
770
+ }
771
+ }
772
+ export class Worktree extends HeyApiClient {
773
+ /**
774
+ * Remove worktree
775
+ *
776
+ * Remove a git worktree and delete its branch.
777
+ */
778
+ remove(parameters, options) {
779
+ const params = buildClientParams([parameters], [
780
+ {
781
+ args: [
782
+ { in: "query", key: "directory" },
783
+ { in: "query", key: "workspace" },
784
+ { key: "worktreeRemoveInput", map: "body" },
785
+ ],
786
+ },
787
+ ]);
788
+ return (options?.client ?? this.client).delete({
789
+ url: "/experimental/worktree",
790
+ ...options,
791
+ ...params,
792
+ headers: {
793
+ "Content-Type": "application/json",
794
+ ...options?.headers,
795
+ ...params.headers,
796
+ },
797
+ });
798
+ }
799
+ /**
800
+ * List worktrees
801
  *
802
  * List all sandbox worktrees for the current project.
803
  */
 
1120
  { in: "query", key: "directory" },
1121
  { in: "query", key: "workspace" },
1122
  { in: "query", key: "mode" },
1123
+ { in: "query", key: "context" },
1124
  ],
1125
  },
1126
  ]);
 
1500
  },
1501
  });
1502
  }
1503
+ /**
1504
+ * List project directories
1505
+ *
1506
+ * List known local absolute directories for a project.
1507
+ */
1508
+ directories(parameters, options) {
1509
+ const params = buildClientParams([parameters], [
1510
+ {
1511
+ args: [
1512
+ { in: "path", key: "projectID" },
1513
+ { in: "query", key: "directory" },
1514
+ { in: "query", key: "workspace" },
1515
+ ],
1516
+ },
1517
+ ]);
1518
+ return (options?.client ?? this.client).get({
1519
+ url: "/project/{projectID}/directories",
1520
+ ...options,
1521
+ ...params,
1522
+ });
1523
+ }
1524
  }
1525
  export class Pty extends HeyApiClient {
1526
  /**
 
1696
  { in: "path", key: "ptyID" },
1697
  { in: "query", key: "directory" },
1698
  { in: "query", key: "workspace" },
1699
+ { in: "query", key: "cursor" },
1700
+ { in: "query", key: "ticket" },
1701
  ],
1702
  },
1703
  ]);
 
2004
  { in: "body", key: "title" },
2005
  { in: "body", key: "agent" },
2006
  { in: "body", key: "model" },
2007
+ { in: "body", key: "metadata" },
2008
  { in: "body", key: "permission" },
2009
  { in: "body", key: "workspaceID" },
2010
  ],
 
2096
  { in: "query", key: "directory" },
2097
  { in: "query", key: "workspace" },
2098
  { in: "body", key: "title" },
2099
+ { in: "body", key: "metadata" },
2100
  { in: "body", key: "permission" },
2101
  { in: "body", key: "time" },
2102
  ],
 
2740
  return (this._history ??= new History({ client: this.client }));
2741
  }
2742
  }
2743
+ export class Control extends HeyApiClient {
2744
  /**
2745
+ * Get next TUI request
2746
  *
2747
+ * Retrieve the next TUI request from the queue for processing.
2748
  */
2749
+ next(parameters, options) {
2750
  const params = buildClientParams([parameters], [
2751
  {
2752
  args: [
2753
  { in: "query", key: "directory" },
2754
  { in: "query", key: "workspace" },
 
 
 
 
 
 
 
2755
  ],
2756
  },
2757
  ]);
2758
  return (options?.client ?? this.client).get({
2759
+ url: "/tui/control/next",
2760
  ...options,
2761
  ...params,
2762
  });
2763
  }
2764
  /**
2765
+ * Submit TUI response
2766
  *
2767
+ * Submit a response to the TUI request queue to complete a pending request.
2768
  */
2769
+ response(parameters, options) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2770
  const params = buildClientParams([parameters], [
2771
  {
2772
  args: [
 
3047
  return (this._control ??= new Control({ client: this.client }));
3048
  }
3049
  }
3050
+ export class Health extends HeyApiClient {
3051
+ /**
3052
+ * Check server health
3053
+ *
3054
+ * Check whether the API server is ready to accept requests.
3055
+ */
3056
+ get(options) {
3057
+ return (options?.client ?? this.client).get({
3058
+ url: "/api/health",
3059
+ ...options,
3060
+ });
3061
  }
3062
+ }
3063
+ export class Location extends HeyApiClient {
3064
+ /**
3065
+ * Get location
3066
+ *
3067
+ * Resolve the requested location or the server default location.
3068
+ */
3069
+ get(parameters, options) {
3070
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
3071
+ return (options?.client ?? this.client).get({
3072
+ url: "/api/location",
3073
+ ...options,
3074
+ ...params,
3075
+ });
3076
  }
3077
+ }
3078
+ export class Agent extends HeyApiClient {
3079
+ /**
3080
+ * List agents
3081
+ *
3082
+ * Retrieve currently registered agents.
3083
+ */
3084
+ list(parameters, options) {
3085
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
3086
+ return (options?.client ?? this.client).get({
3087
+ url: "/api/agent",
3088
+ ...options,
3089
+ ...params,
3090
+ });
3091
  }
3092
+ }
3093
+ export class Revert extends HeyApiClient {
3094
+ /**
3095
+ * Stage session revert
3096
+ *
3097
+ * Stage or move a reversible session boundary and optionally apply its file changes.
3098
+ */
3099
+ stage(parameters, options) {
3100
+ const params = buildClientParams([parameters], [
3101
+ {
3102
+ args: [
3103
+ { in: "path", key: "sessionID" },
3104
+ { in: "body", key: "messageID" },
3105
+ { in: "body", key: "files" },
3106
+ ],
3107
+ },
3108
+ ]);
3109
+ return (options?.client ?? this.client).post({
3110
+ url: "/api/session/{sessionID}/revert/stage",
3111
+ ...options,
3112
+ ...params,
3113
+ headers: {
3114
+ "Content-Type": "application/json",
3115
+ ...options?.headers,
3116
+ ...params.headers,
3117
+ },
3118
+ });
3119
  }
3120
+ /**
3121
+ * Clear staged revert
3122
+ */
3123
+ clear(parameters, options) {
3124
+ const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
3125
+ return (options?.client ?? this.client).post({
3126
+ url: "/api/session/{sessionID}/revert/clear",
3127
+ ...options,
3128
+ ...params,
3129
+ });
3130
+ }
3131
+ /**
3132
+ * Commit staged revert
3133
+ */
3134
+ commit(parameters, options) {
3135
+ const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
3136
+ return (options?.client ?? this.client).post({
3137
+ url: "/api/session/{sessionID}/revert/commit",
3138
+ ...options,
3139
+ ...params,
3140
+ });
3141
+ }
3142
+ }
3143
+ export class Permission2 extends HeyApiClient {
3144
+ /**
3145
+ * List session permission requests
3146
+ *
3147
+ * Retrieve pending permission requests owned by a session.
3148
+ */
3149
+ list(parameters, options) {
3150
+ const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
3151
+ return (options?.client ?? this.client).get({
3152
+ url: "/api/session/{sessionID}/permission",
3153
+ ...options,
3154
+ ...params,
3155
+ });
3156
+ }
3157
+ /**
3158
+ * Create permission request
3159
+ *
3160
+ * Evaluate and, when approval is required, create a permission request for a session.
3161
+ */
3162
+ create(parameters, options) {
3163
+ const params = buildClientParams([parameters], [
3164
+ {
3165
+ args: [
3166
+ { in: "path", key: "sessionID" },
3167
+ { in: "body", key: "id" },
3168
+ { in: "body", key: "action" },
3169
+ { in: "body", key: "resources" },
3170
+ { in: "body", key: "save" },
3171
+ { in: "body", key: "metadata" },
3172
+ { in: "body", key: "source" },
3173
+ { in: "body", key: "agent" },
3174
+ ],
3175
+ },
3176
+ ]);
3177
+ return (options?.client ?? this.client).post({
3178
+ url: "/api/session/{sessionID}/permission",
3179
+ ...options,
3180
+ ...params,
3181
+ headers: {
3182
+ "Content-Type": "application/json",
3183
+ ...options?.headers,
3184
+ ...params.headers,
3185
+ },
3186
+ });
3187
+ }
3188
+ /**
3189
+ * Get permission request
3190
+ *
3191
+ * Retrieve a pending permission request owned by a session.
3192
+ */
3193
+ get(parameters, options) {
3194
+ const params = buildClientParams([parameters], [
3195
+ {
3196
+ args: [
3197
+ { in: "path", key: "sessionID" },
3198
+ { in: "path", key: "requestID" },
3199
+ ],
3200
+ },
3201
+ ]);
3202
+ return (options?.client ?? this.client).get({
3203
+ url: "/api/session/{sessionID}/permission/{requestID}",
3204
+ ...options,
3205
+ ...params,
3206
+ });
3207
+ }
3208
+ /**
3209
+ * Reply to pending permission request
3210
+ *
3211
+ * Respond to a pending permission request owned by a session.
3212
+ */
3213
+ reply(parameters, options) {
3214
+ const params = buildClientParams([parameters], [
3215
+ {
3216
+ args: [
3217
+ { in: "path", key: "sessionID" },
3218
+ { in: "path", key: "requestID" },
3219
+ { in: "body", key: "reply" },
3220
+ { in: "body", key: "message" },
3221
+ ],
3222
+ },
3223
+ ]);
3224
+ return (options?.client ?? this.client).post({
3225
+ url: "/api/session/{sessionID}/permission/{requestID}/reply",
3226
+ ...options,
3227
+ ...params,
3228
+ headers: {
3229
+ "Content-Type": "application/json",
3230
+ ...options?.headers,
3231
+ ...params.headers,
3232
+ },
3233
+ });
3234
+ }
3235
+ }
3236
+ export class Question2 extends HeyApiClient {
3237
+ /**
3238
+ * List session question requests
3239
+ *
3240
+ * Retrieve pending question requests owned by a session.
3241
+ */
3242
+ list(parameters, options) {
3243
+ const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
3244
+ return (options?.client ?? this.client).get({
3245
+ url: "/api/session/{sessionID}/question",
3246
+ ...options,
3247
+ ...params,
3248
+ });
3249
+ }
3250
+ /**
3251
+ * Reply to pending question request
3252
+ *
3253
+ * Answer a pending question request owned by a session.
3254
+ */
3255
+ reply(parameters, options) {
3256
+ const params = buildClientParams([parameters], [
3257
+ {
3258
+ args: [
3259
+ { in: "path", key: "sessionID" },
3260
+ { in: "path", key: "requestID" },
3261
+ { key: "questionV2Reply", map: "body" },
3262
+ ],
3263
+ },
3264
+ ]);
3265
+ return (options?.client ?? this.client).post({
3266
+ url: "/api/session/{sessionID}/question/{requestID}/reply",
3267
+ ...options,
3268
+ ...params,
3269
+ headers: {
3270
+ "Content-Type": "application/json",
3271
+ ...options?.headers,
3272
+ ...params.headers,
3273
+ },
3274
+ });
3275
+ }
3276
+ /**
3277
+ * Reject pending question request
3278
+ *
3279
+ * Reject a pending question request owned by a session.
3280
+ */
3281
+ reject(parameters, options) {
3282
+ const params = buildClientParams([parameters], [
3283
+ {
3284
+ args: [
3285
+ { in: "path", key: "sessionID" },
3286
+ { in: "path", key: "requestID" },
3287
+ ],
3288
+ },
3289
+ ]);
3290
+ return (options?.client ?? this.client).post({
3291
+ url: "/api/session/{sessionID}/question/{requestID}/reject",
3292
+ ...options,
3293
+ ...params,
3294
+ });
3295
+ }
3296
+ }
3297
+ export class Session3 extends HeyApiClient {
3298
+ /**
3299
+ * List sessions
3300
+ *
3301
+ * Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.
3302
+ */
3303
+ list(parameters, options) {
3304
+ const params = buildClientParams([parameters], [
3305
+ {
3306
+ args: [
3307
+ { in: "query", key: "workspace" },
3308
+ { in: "query", key: "limit" },
3309
+ { in: "query", key: "order" },
3310
+ { in: "query", key: "search" },
3311
+ { in: "query", key: "directory" },
3312
+ { in: "query", key: "project" },
3313
+ { in: "query", key: "subpath" },
3314
+ { in: "query", key: "cursor" },
3315
+ ],
3316
+ },
3317
+ ]);
3318
+ return (options?.client ?? this.client).get({
3319
+ url: "/api/session",
3320
+ ...options,
3321
+ ...params,
3322
+ });
3323
+ }
3324
+ /**
3325
+ * Create session
3326
+ *
3327
+ * Create a session at the requested location.
3328
+ */
3329
+ create(parameters, options) {
3330
+ const params = buildClientParams([parameters], [
3331
+ {
3332
+ args: [
3333
+ { in: "body", key: "id" },
3334
+ { in: "body", key: "agent" },
3335
+ { in: "body", key: "model" },
3336
+ { in: "body", key: "location" },
3337
+ ],
3338
+ },
3339
+ ]);
3340
+ return (options?.client ?? this.client).post({
3341
+ url: "/api/session",
3342
+ ...options,
3343
+ ...params,
3344
+ headers: {
3345
+ "Content-Type": "application/json",
3346
+ ...options?.headers,
3347
+ ...params.headers,
3348
+ },
3349
+ });
3350
+ }
3351
+ /**
3352
+ * List active sessions
3353
+ *
3354
+ * Retrieve foreground Session drains currently owned by this OpenCode process. Sessions absent from the result are inactive.
3355
+ */
3356
+ active(options) {
3357
+ return (options?.client ?? this.client).get({
3358
+ url: "/api/session/active",
3359
+ ...options,
3360
+ });
3361
+ }
3362
+ /**
3363
+ * Get session
3364
+ *
3365
+ * Retrieve a session by ID.
3366
+ */
3367
+ get(parameters, options) {
3368
+ const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
3369
+ return (options?.client ?? this.client).get({
3370
+ url: "/api/session/{sessionID}",
3371
+ ...options,
3372
+ ...params,
3373
+ });
3374
+ }
3375
+ /**
3376
+ * Switch session agent
3377
+ *
3378
+ * Switch the agent used by subsequent provider turns.
3379
+ */
3380
+ switchAgent(parameters, options) {
3381
+ const params = buildClientParams([parameters], [
3382
+ {
3383
+ args: [
3384
+ { in: "path", key: "sessionID" },
3385
+ { in: "body", key: "agent" },
3386
+ ],
3387
+ },
3388
+ ]);
3389
+ return (options?.client ?? this.client).post({
3390
+ url: "/api/session/{sessionID}/agent",
3391
+ ...options,
3392
+ ...params,
3393
+ headers: {
3394
+ "Content-Type": "application/json",
3395
+ ...options?.headers,
3396
+ ...params.headers,
3397
+ },
3398
+ });
3399
+ }
3400
+ /**
3401
+ * Switch session model
3402
+ *
3403
+ * Switch the model used by subsequent provider turns.
3404
+ */
3405
+ switchModel(parameters, options) {
3406
+ const params = buildClientParams([parameters], [
3407
+ {
3408
+ args: [
3409
+ { in: "path", key: "sessionID" },
3410
+ { in: "body", key: "model" },
3411
+ ],
3412
+ },
3413
+ ]);
3414
+ return (options?.client ?? this.client).post({
3415
+ url: "/api/session/{sessionID}/model",
3416
+ ...options,
3417
+ ...params,
3418
+ headers: {
3419
+ "Content-Type": "application/json",
3420
+ ...options?.headers,
3421
+ ...params.headers,
3422
+ },
3423
+ });
3424
+ }
3425
+ /**
3426
+ * Send message
3427
+ *
3428
+ * Durably admit one session input and schedule agent-loop execution unless resume is false.
3429
+ */
3430
+ prompt(parameters, options) {
3431
+ const params = buildClientParams([parameters], [
3432
+ {
3433
+ args: [
3434
+ { in: "path", key: "sessionID" },
3435
+ { in: "body", key: "id" },
3436
+ { in: "body", key: "prompt" },
3437
+ { in: "body", key: "delivery" },
3438
+ { in: "body", key: "resume" },
3439
+ ],
3440
+ },
3441
+ ]);
3442
+ return (options?.client ?? this.client).post({
3443
+ url: "/api/session/{sessionID}/prompt",
3444
+ ...options,
3445
+ ...params,
3446
+ headers: {
3447
+ "Content-Type": "application/json",
3448
+ ...options?.headers,
3449
+ ...params.headers,
3450
+ },
3451
+ });
3452
+ }
3453
+ /**
3454
+ * Compact session
3455
+ *
3456
+ * Compact a session conversation.
3457
+ */
3458
+ compact(parameters, options) {
3459
+ const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
3460
+ return (options?.client ?? this.client).post({
3461
+ url: "/api/session/{sessionID}/compact",
3462
+ ...options,
3463
+ ...params,
3464
+ });
3465
+ }
3466
+ /**
3467
+ * Wait for session
3468
+ *
3469
+ * Wait for a session agent loop to become idle.
3470
+ */
3471
+ wait(parameters, options) {
3472
+ const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
3473
+ return (options?.client ?? this.client).post({
3474
+ url: "/api/session/{sessionID}/wait",
3475
+ ...options,
3476
+ ...params,
3477
+ });
3478
+ }
3479
+ /**
3480
+ * Get session context
3481
+ *
3482
+ * Retrieve the active context messages for a session (all messages after the last compaction).
3483
+ */
3484
+ context(parameters, options) {
3485
+ const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
3486
+ return (options?.client ?? this.client).get({
3487
+ url: "/api/session/{sessionID}/context",
3488
+ ...options,
3489
+ ...params,
3490
+ });
3491
+ }
3492
+ /**
3493
+ * Get session history
3494
+ *
3495
+ * Read one finite page of public durable Session events after an exclusive aggregate sequence. Newly committed events may appear on later pages.
3496
+ */
3497
+ history(parameters, options) {
3498
+ const params = buildClientParams([parameters], [
3499
+ {
3500
+ args: [
3501
+ { in: "path", key: "sessionID" },
3502
+ { in: "query", key: "limit" },
3503
+ { in: "query", key: "after" },
3504
+ ],
3505
+ },
3506
+ ]);
3507
+ return (options?.client ?? this.client).get({
3508
+ url: "/api/session/{sessionID}/history",
3509
+ ...options,
3510
+ ...params,
3511
+ });
3512
+ }
3513
+ /**
3514
+ * Subscribe to session events
3515
+ *
3516
+ * Replay durable events after an aggregate sequence, then continue with new durable events.
3517
+ */
3518
+ events(parameters, options) {
3519
+ const params = buildClientParams([parameters], [
3520
+ {
3521
+ args: [
3522
+ { in: "path", key: "sessionID" },
3523
+ { in: "query", key: "after" },
3524
+ ],
3525
+ },
3526
+ ]);
3527
+ return (options?.client ?? this.client).sse.get({
3528
+ url: "/api/session/{sessionID}/event",
3529
+ ...options,
3530
+ ...params,
3531
+ });
3532
+ }
3533
+ /**
3534
+ * Interrupt session execution
3535
+ *
3536
+ * Interrupt active execution owned by this OpenCode process. Idle interruption is a no-op.
3537
+ */
3538
+ interrupt(parameters, options) {
3539
+ const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
3540
+ return (options?.client ?? this.client).post({
3541
+ url: "/api/session/{sessionID}/interrupt",
3542
+ ...options,
3543
+ ...params,
3544
+ });
3545
+ }
3546
+ /**
3547
+ * Get session message
3548
+ *
3549
+ * Retrieve one projected message owned by the Session.
3550
+ */
3551
+ message(parameters, options) {
3552
+ const params = buildClientParams([parameters], [
3553
+ {
3554
+ args: [
3555
+ { in: "path", key: "sessionID" },
3556
+ { in: "path", key: "messageID" },
3557
+ ],
3558
+ },
3559
+ ]);
3560
+ return (options?.client ?? this.client).get({
3561
+ url: "/api/session/{sessionID}/message/{messageID}",
3562
+ ...options,
3563
+ ...params,
3564
+ });
3565
+ }
3566
+ /**
3567
+ * Get session messages
3568
+ *
3569
+ * Retrieve projected messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.
3570
+ */
3571
+ messages(parameters, options) {
3572
+ const params = buildClientParams([parameters], [
3573
+ {
3574
+ args: [
3575
+ { in: "path", key: "sessionID" },
3576
+ { in: "query", key: "limit" },
3577
+ { in: "query", key: "order" },
3578
+ { in: "query", key: "cursor" },
3579
+ ],
3580
+ },
3581
+ ]);
3582
+ return (options?.client ?? this.client).get({
3583
+ url: "/api/session/{sessionID}/message",
3584
+ ...options,
3585
+ ...params,
3586
+ });
3587
+ }
3588
+ _revert;
3589
+ get revert() {
3590
+ return (this._revert ??= new Revert({ client: this.client }));
3591
+ }
3592
+ _permission;
3593
+ get permission() {
3594
+ return (this._permission ??= new Permission2({ client: this.client }));
3595
+ }
3596
+ _question;
3597
+ get question() {
3598
+ return (this._question ??= new Question2({ client: this.client }));
3599
+ }
3600
+ }
3601
+ export class Model extends HeyApiClient {
3602
+ /**
3603
+ * List models
3604
+ *
3605
+ * Retrieve available models ordered by release date.
3606
+ */
3607
+ list(parameters, options) {
3608
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
3609
+ return (options?.client ?? this.client).get({
3610
+ url: "/api/model",
3611
+ ...options,
3612
+ ...params,
3613
+ });
3614
+ }
3615
+ }
3616
+ export class Provider2 extends HeyApiClient {
3617
+ /**
3618
+ * List providers
3619
+ *
3620
+ * Retrieve active AI providers so clients can show provider availability and configuration.
3621
+ */
3622
+ list(parameters, options) {
3623
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
3624
+ return (options?.client ?? this.client).get({
3625
+ url: "/api/provider",
3626
+ ...options,
3627
+ ...params,
3628
+ });
3629
+ }
3630
+ /**
3631
+ * Get provider
3632
+ *
3633
+ * Retrieve a single AI provider so clients can inspect its availability and endpoint settings.
3634
+ */
3635
+ get(parameters, options) {
3636
+ const params = buildClientParams([parameters], [
3637
+ {
3638
+ args: [
3639
+ { in: "path", key: "providerID" },
3640
+ { in: "query", key: "location" },
3641
+ ],
3642
+ },
3643
+ ]);
3644
+ return (options?.client ?? this.client).get({
3645
+ url: "/api/provider/{providerID}",
3646
+ ...options,
3647
+ ...params,
3648
+ });
3649
+ }
3650
+ }
3651
+ export class Connect extends HeyApiClient {
3652
+ /**
3653
+ * Connect with key
3654
+ *
3655
+ * Run a key authentication method and store the resulting credential.
3656
+ */
3657
+ key(parameters, options) {
3658
+ const params = buildClientParams([parameters], [
3659
+ {
3660
+ args: [
3661
+ { in: "path", key: "integrationID" },
3662
+ { in: "query", key: "location" },
3663
+ { in: "body", key: "key" },
3664
+ { in: "body", key: "label" },
3665
+ ],
3666
+ },
3667
+ ]);
3668
+ return (options?.client ?? this.client).post({
3669
+ url: "/api/integration/{integrationID}/connect/key",
3670
+ ...options,
3671
+ ...params,
3672
+ headers: {
3673
+ "Content-Type": "application/json",
3674
+ ...options?.headers,
3675
+ ...params.headers,
3676
+ },
3677
+ });
3678
+ }
3679
+ /**
3680
+ * Begin OAuth connection
3681
+ *
3682
+ * Start an OAuth attempt and return the authorization details.
3683
+ */
3684
+ oauth(parameters, options) {
3685
+ const params = buildClientParams([parameters], [
3686
+ {
3687
+ args: [
3688
+ { in: "path", key: "integrationID" },
3689
+ { in: "query", key: "location" },
3690
+ { in: "body", key: "methodID" },
3691
+ { in: "body", key: "inputs" },
3692
+ { in: "body", key: "label" },
3693
+ ],
3694
+ },
3695
+ ]);
3696
+ return (options?.client ?? this.client).post({
3697
+ url: "/api/integration/{integrationID}/connect/oauth",
3698
+ ...options,
3699
+ ...params,
3700
+ headers: {
3701
+ "Content-Type": "application/json",
3702
+ ...options?.headers,
3703
+ ...params.headers,
3704
+ },
3705
+ });
3706
+ }
3707
+ }
3708
+ export class Attempt extends HeyApiClient {
3709
+ /**
3710
+ * Cancel OAuth connection
3711
+ *
3712
+ * Cancel an OAuth attempt and release its resources.
3713
+ */
3714
+ cancel(parameters, options) {
3715
+ const params = buildClientParams([parameters], [
3716
+ {
3717
+ args: [
3718
+ { in: "path", key: "attemptID" },
3719
+ { in: "query", key: "location" },
3720
+ ],
3721
+ },
3722
+ ]);
3723
+ return (options?.client ?? this.client).delete({
3724
+ url: "/api/integration/attempt/{attemptID}",
3725
+ ...options,
3726
+ ...params,
3727
+ });
3728
+ }
3729
+ /**
3730
+ * Get OAuth attempt status
3731
+ *
3732
+ * Poll the current status of an OAuth attempt.
3733
+ */
3734
+ status(parameters, options) {
3735
+ const params = buildClientParams([parameters], [
3736
+ {
3737
+ args: [
3738
+ { in: "path", key: "attemptID" },
3739
+ { in: "query", key: "location" },
3740
+ ],
3741
+ },
3742
+ ]);
3743
+ return (options?.client ?? this.client).get({
3744
+ url: "/api/integration/attempt/{attemptID}",
3745
+ ...options,
3746
+ ...params,
3747
+ });
3748
+ }
3749
+ /**
3750
+ * Complete OAuth connection
3751
+ *
3752
+ * Complete a code-based OAuth attempt and store the resulting credential.
3753
+ */
3754
+ complete(parameters, options) {
3755
+ const params = buildClientParams([parameters], [
3756
+ {
3757
+ args: [
3758
+ { in: "path", key: "attemptID" },
3759
+ { in: "query", key: "location" },
3760
+ { in: "body", key: "code" },
3761
+ ],
3762
+ },
3763
+ ]);
3764
+ return (options?.client ?? this.client).post({
3765
+ url: "/api/integration/attempt/{attemptID}/complete",
3766
+ ...options,
3767
+ ...params,
3768
+ headers: {
3769
+ "Content-Type": "application/json",
3770
+ ...options?.headers,
3771
+ ...params.headers,
3772
+ },
3773
+ });
3774
+ }
3775
+ }
3776
+ export class Integration extends HeyApiClient {
3777
+ /**
3778
+ * List integrations
3779
+ *
3780
+ * Retrieve available integrations and their authentication methods.
3781
+ */
3782
+ list(parameters, options) {
3783
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
3784
+ return (options?.client ?? this.client).get({
3785
+ url: "/api/integration",
3786
+ ...options,
3787
+ ...params,
3788
+ });
3789
+ }
3790
+ /**
3791
+ * Get integration
3792
+ *
3793
+ * Retrieve one integration and its authentication methods.
3794
+ */
3795
+ get(parameters, options) {
3796
+ const params = buildClientParams([parameters], [
3797
+ {
3798
+ args: [
3799
+ { in: "path", key: "integrationID" },
3800
+ { in: "query", key: "location" },
3801
+ ],
3802
+ },
3803
+ ]);
3804
+ return (options?.client ?? this.client).get({
3805
+ url: "/api/integration/{integrationID}",
3806
+ ...options,
3807
+ ...params,
3808
+ });
3809
+ }
3810
+ _connect;
3811
+ get connect() {
3812
+ return (this._connect ??= new Connect({ client: this.client }));
3813
+ }
3814
+ _attempt;
3815
+ get attempt() {
3816
+ return (this._attempt ??= new Attempt({ client: this.client }));
3817
+ }
3818
+ }
3819
+ export class Credential extends HeyApiClient {
3820
+ /**
3821
+ * Remove credential
3822
+ *
3823
+ * Remove a stored integration credential.
3824
+ */
3825
+ remove(parameters, options) {
3826
+ const params = buildClientParams([parameters], [
3827
+ {
3828
+ args: [
3829
+ { in: "path", key: "credentialID" },
3830
+ { in: "query", key: "location" },
3831
+ ],
3832
+ },
3833
+ ]);
3834
+ return (options?.client ?? this.client).delete({
3835
+ url: "/api/credential/{credentialID}",
3836
+ ...options,
3837
+ ...params,
3838
+ });
3839
+ }
3840
+ /**
3841
+ * Update credential
3842
+ *
3843
+ * Update a stored credential label.
3844
+ */
3845
+ update(parameters, options) {
3846
+ const params = buildClientParams([parameters], [
3847
+ {
3848
+ args: [
3849
+ { in: "path", key: "credentialID" },
3850
+ { in: "query", key: "location" },
3851
+ { in: "body", key: "label" },
3852
+ ],
3853
+ },
3854
+ ]);
3855
+ return (options?.client ?? this.client).patch({
3856
+ url: "/api/credential/{credentialID}",
3857
+ ...options,
3858
+ ...params,
3859
+ headers: {
3860
+ "Content-Type": "application/json",
3861
+ ...options?.headers,
3862
+ ...params.headers,
3863
+ },
3864
+ });
3865
+ }
3866
+ }
3867
+ export class Request extends HeyApiClient {
3868
+ /**
3869
+ * List pending permission requests
3870
+ *
3871
+ * Retrieve pending permission requests for a location.
3872
+ */
3873
+ list(parameters, options) {
3874
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
3875
+ return (options?.client ?? this.client).get({
3876
+ url: "/api/permission/request",
3877
+ ...options,
3878
+ ...params,
3879
+ });
3880
+ }
3881
+ }
3882
+ export class Saved extends HeyApiClient {
3883
+ /**
3884
+ * List saved permissions
3885
+ *
3886
+ * Retrieve saved permissions, optionally filtered by project.
3887
+ */
3888
+ list(parameters, options) {
3889
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "projectID" }] }]);
3890
+ return (options?.client ?? this.client).get({
3891
+ url: "/api/permission/saved",
3892
+ ...options,
3893
+ ...params,
3894
+ });
3895
+ }
3896
+ /**
3897
+ * Remove saved permission
3898
+ *
3899
+ * Remove a saved permission by ID.
3900
+ */
3901
+ remove(parameters, options) {
3902
+ const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "id" }] }]);
3903
+ return (options?.client ?? this.client).delete({
3904
+ url: "/api/permission/saved/{id}",
3905
+ ...options,
3906
+ ...params,
3907
+ });
3908
+ }
3909
+ }
3910
+ export class Permission3 extends HeyApiClient {
3911
+ _request;
3912
+ get request() {
3913
+ return (this._request ??= new Request({ client: this.client }));
3914
+ }
3915
+ _saved;
3916
+ get saved() {
3917
+ return (this._saved ??= new Saved({ client: this.client }));
3918
+ }
3919
+ }
3920
+ export class Fs extends HeyApiClient {
3921
+ /**
3922
+ * Read file
3923
+ *
3924
+ * Serve one file relative to the requested location.
3925
+ */
3926
+ read(parameters, options) {
3927
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
3928
+ return (options?.client ?? this.client).get({
3929
+ url: "/api/fs/read/*",
3930
+ ...options,
3931
+ ...params,
3932
+ });
3933
+ }
3934
+ /**
3935
+ * List directory
3936
+ *
3937
+ * List direct children of one directory relative to the requested location.
3938
+ */
3939
+ list(parameters, options) {
3940
+ const params = buildClientParams([parameters], [
3941
+ {
3942
+ args: [
3943
+ { in: "query", key: "location" },
3944
+ { in: "query", key: "path" },
3945
+ ],
3946
+ },
3947
+ ]);
3948
+ return (options?.client ?? this.client).get({
3949
+ url: "/api/fs/list",
3950
+ ...options,
3951
+ ...params,
3952
+ });
3953
+ }
3954
+ /**
3955
+ * Find files
3956
+ *
3957
+ * Find recursively ranked filesystem entries relative to the requested location.
3958
+ */
3959
+ find(parameters, options) {
3960
+ const params = buildClientParams([parameters], [
3961
+ {
3962
+ args: [
3963
+ { in: "query", key: "location" },
3964
+ { in: "query", key: "query" },
3965
+ { in: "query", key: "type" },
3966
+ { in: "query", key: "limit" },
3967
+ ],
3968
+ },
3969
+ ]);
3970
+ return (options?.client ?? this.client).get({
3971
+ url: "/api/fs/find",
3972
+ ...options,
3973
+ ...params,
3974
+ });
3975
+ }
3976
+ }
3977
+ export class Command2 extends HeyApiClient {
3978
+ /**
3979
+ * List commands
3980
+ *
3981
+ * Retrieve currently registered commands.
3982
+ */
3983
+ list(parameters, options) {
3984
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
3985
+ return (options?.client ?? this.client).get({
3986
+ url: "/api/command",
3987
+ ...options,
3988
+ ...params,
3989
+ });
3990
+ }
3991
+ }
3992
+ export class Skill extends HeyApiClient {
3993
+ /**
3994
+ * List skills
3995
+ *
3996
+ * Retrieve currently registered skills.
3997
+ */
3998
+ list(parameters, options) {
3999
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
4000
+ return (options?.client ?? this.client).get({
4001
+ url: "/api/skill",
4002
+ ...options,
4003
+ ...params,
4004
+ });
4005
+ }
4006
+ }
4007
+ export class Event2 extends HeyApiClient {
4008
+ /**
4009
+ * Subscribe to events
4010
+ *
4011
+ * Subscribe to native event payloads for the server.
4012
+ */
4013
+ subscribe(options) {
4014
+ return (options?.client ?? this.client).sse.get({
4015
+ url: "/api/event",
4016
+ ...options,
4017
+ });
4018
+ }
4019
+ }
4020
+ export class Pty2 extends HeyApiClient {
4021
+ /**
4022
+ * List PTY sessions
4023
+ *
4024
+ * List PTY sessions for a location, including exited sessions retained until removal.
4025
+ */
4026
+ list(parameters, options) {
4027
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
4028
+ return (options?.client ?? this.client).get({
4029
+ url: "/api/pty",
4030
+ ...options,
4031
+ ...params,
4032
+ });
4033
+ }
4034
+ /**
4035
+ * Create PTY session
4036
+ *
4037
+ * Create a pseudo-terminal session for a location.
4038
+ */
4039
+ create(parameters, options) {
4040
+ const params = buildClientParams([parameters], [
4041
+ {
4042
+ args: [
4043
+ { in: "query", key: "location" },
4044
+ { in: "body", key: "command" },
4045
+ { in: "body", key: "args" },
4046
+ { in: "body", key: "cwd" },
4047
+ { in: "body", key: "title" },
4048
+ { in: "body", key: "env" },
4049
+ ],
4050
+ },
4051
+ ]);
4052
+ return (options?.client ?? this.client).post({
4053
+ url: "/api/pty",
4054
+ ...options,
4055
+ ...params,
4056
+ headers: {
4057
+ "Content-Type": "application/json",
4058
+ ...options?.headers,
4059
+ ...params.headers,
4060
+ },
4061
+ });
4062
+ }
4063
+ /**
4064
+ * Remove PTY session
4065
+ *
4066
+ * Terminate and remove one PTY session.
4067
+ */
4068
+ remove(parameters, options) {
4069
+ const params = buildClientParams([parameters], [
4070
+ {
4071
+ args: [
4072
+ { in: "path", key: "ptyID" },
4073
+ { in: "query", key: "location" },
4074
+ ],
4075
+ },
4076
+ ]);
4077
+ return (options?.client ?? this.client).delete({
4078
+ url: "/api/pty/{ptyID}",
4079
+ ...options,
4080
+ ...params,
4081
+ });
4082
+ }
4083
+ /**
4084
+ * Get PTY session
4085
+ *
4086
+ * Get one PTY session, including its exit code once exited.
4087
+ */
4088
+ get(parameters, options) {
4089
+ const params = buildClientParams([parameters], [
4090
+ {
4091
+ args: [
4092
+ { in: "path", key: "ptyID" },
4093
+ { in: "query", key: "location" },
4094
+ ],
4095
+ },
4096
+ ]);
4097
+ return (options?.client ?? this.client).get({
4098
+ url: "/api/pty/{ptyID}",
4099
+ ...options,
4100
+ ...params,
4101
+ });
4102
+ }
4103
+ /**
4104
+ * Update PTY session
4105
+ *
4106
+ * Update the title or viewport size of one PTY session.
4107
+ */
4108
+ update(parameters, options) {
4109
+ const params = buildClientParams([parameters], [
4110
+ {
4111
+ args: [
4112
+ { in: "path", key: "ptyID" },
4113
+ { in: "query", key: "location" },
4114
+ { in: "body", key: "title" },
4115
+ { in: "body", key: "size" },
4116
+ ],
4117
+ },
4118
+ ]);
4119
+ return (options?.client ?? this.client).put({
4120
+ url: "/api/pty/{ptyID}",
4121
+ ...options,
4122
+ ...params,
4123
+ headers: {
4124
+ "Content-Type": "application/json",
4125
+ ...options?.headers,
4126
+ ...params.headers,
4127
+ },
4128
+ });
4129
+ }
4130
+ /**
4131
+ * Create PTY WebSocket token
4132
+ *
4133
+ * Create a short-lived single-use ticket for opening a PTY WebSocket connection.
4134
+ */
4135
+ connectToken(parameters, options) {
4136
+ const params = buildClientParams([parameters], [
4137
+ {
4138
+ args: [
4139
+ { in: "path", key: "ptyID" },
4140
+ { in: "query", key: "location" },
4141
+ ],
4142
+ },
4143
+ ]);
4144
+ return (options?.client ?? this.client).post({
4145
+ url: "/api/pty/{ptyID}/connect-token",
4146
+ ...options,
4147
+ ...params,
4148
+ });
4149
+ }
4150
+ /**
4151
+ * Connect to PTY session
4152
+ *
4153
+ * Establish a WebSocket connection streaming PTY output and accepting terminal input.
4154
+ */
4155
+ connect(parameters, options) {
4156
+ const params = buildClientParams([parameters], [
4157
+ {
4158
+ args: [
4159
+ { in: "path", key: "ptyID" },
4160
+ { in: "query", key: "location[directory]" },
4161
+ { in: "query", key: "location[workspace]" },
4162
+ { in: "query", key: "cursor" },
4163
+ { in: "query", key: "ticket" },
4164
+ ],
4165
+ },
4166
+ ]);
4167
+ return (options?.client ?? this.client).get({
4168
+ url: "/api/pty/{ptyID}/connect",
4169
+ ...options,
4170
+ ...params,
4171
+ });
4172
+ }
4173
+ }
4174
+ export class Request2 extends HeyApiClient {
4175
+ /**
4176
+ * List pending question requests
4177
+ *
4178
+ * Retrieve pending question requests for a location.
4179
+ */
4180
+ list(parameters, options) {
4181
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
4182
+ return (options?.client ?? this.client).get({
4183
+ url: "/api/question/request",
4184
+ ...options,
4185
+ ...params,
4186
+ });
4187
+ }
4188
+ }
4189
+ export class Question3 extends HeyApiClient {
4190
+ _request;
4191
+ get request() {
4192
+ return (this._request ??= new Request2({ client: this.client }));
4193
+ }
4194
+ }
4195
+ export class Reference extends HeyApiClient {
4196
+ /**
4197
+ * List references
4198
+ *
4199
+ * List references available in the requested location.
4200
+ */
4201
+ list(parameters, options) {
4202
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
4203
+ return (options?.client ?? this.client).get({
4204
+ url: "/api/reference",
4205
+ ...options,
4206
+ ...params,
4207
+ });
4208
+ }
4209
+ }
4210
+ export class ProjectCopy2 extends HeyApiClient {
4211
+ remove(parameters, options) {
4212
+ const params = buildClientParams([parameters], [
4213
+ {
4214
+ args: [
4215
+ { in: "path", key: "projectID" },
4216
+ { in: "query", key: "location" },
4217
+ { in: "body", key: "directory" },
4218
+ { in: "body", key: "force" },
4219
+ ],
4220
+ },
4221
+ ]);
4222
+ return (options?.client ?? this.client).delete({
4223
+ url: "/experimental/project/{projectID}/copy",
4224
+ ...options,
4225
+ ...params,
4226
+ headers: {
4227
+ "Content-Type": "application/json",
4228
+ ...options?.headers,
4229
+ ...params.headers,
4230
+ },
4231
+ });
4232
+ }
4233
+ create(parameters, options) {
4234
+ const params = buildClientParams([parameters], [
4235
+ {
4236
+ args: [
4237
+ { in: "path", key: "projectID" },
4238
+ { in: "query", key: "location" },
4239
+ { in: "body", key: "strategy" },
4240
+ { in: "body", key: "directory" },
4241
+ { in: "body", key: "name" },
4242
+ ],
4243
+ },
4244
+ ]);
4245
+ return (options?.client ?? this.client).post({
4246
+ url: "/experimental/project/{projectID}/copy",
4247
+ ...options,
4248
+ ...params,
4249
+ headers: {
4250
+ "Content-Type": "application/json",
4251
+ ...options?.headers,
4252
+ ...params.headers,
4253
+ },
4254
+ });
4255
+ }
4256
+ refresh(parameters, options) {
4257
+ const params = buildClientParams([parameters], [
4258
+ {
4259
+ args: [
4260
+ { in: "path", key: "projectID" },
4261
+ { in: "query", key: "location" },
4262
+ ],
4263
+ },
4264
+ ]);
4265
+ return (options?.client ?? this.client).post({
4266
+ url: "/experimental/project/{projectID}/copy/refresh",
4267
+ ...options,
4268
+ ...params,
4269
+ });
4270
+ }
4271
+ }
4272
+ export class V2 extends HeyApiClient {
4273
+ _health;
4274
+ get health() {
4275
+ return (this._health ??= new Health({ client: this.client }));
4276
+ }
4277
+ _location;
4278
+ get location() {
4279
+ return (this._location ??= new Location({ client: this.client }));
4280
+ }
4281
+ _agent;
4282
+ get agent() {
4283
+ return (this._agent ??= new Agent({ client: this.client }));
4284
+ }
4285
+ _session;
4286
+ get session() {
4287
+ return (this._session ??= new Session3({ client: this.client }));
4288
+ }
4289
+ _model;
4290
+ get model() {
4291
+ return (this._model ??= new Model({ client: this.client }));
4292
+ }
4293
+ _provider;
4294
+ get provider() {
4295
+ return (this._provider ??= new Provider2({ client: this.client }));
4296
+ }
4297
+ _integration;
4298
+ get integration() {
4299
+ return (this._integration ??= new Integration({ client: this.client }));
4300
+ }
4301
+ _credential;
4302
+ get credential() {
4303
+ return (this._credential ??= new Credential({ client: this.client }));
4304
+ }
4305
+ _permission;
4306
+ get permission() {
4307
+ return (this._permission ??= new Permission3({ client: this.client }));
4308
+ }
4309
+ _fs;
4310
+ get fs() {
4311
+ return (this._fs ??= new Fs({ client: this.client }));
4312
+ }
4313
+ _command;
4314
+ get command() {
4315
+ return (this._command ??= new Command2({ client: this.client }));
4316
+ }
4317
+ _skill;
4318
+ get skill() {
4319
+ return (this._skill ??= new Skill({ client: this.client }));
4320
+ }
4321
+ _event;
4322
+ get event() {
4323
+ return (this._event ??= new Event2({ client: this.client }));
4324
+ }
4325
+ _pty;
4326
+ get pty() {
4327
+ return (this._pty ??= new Pty2({ client: this.client }));
4328
+ }
4329
+ _question;
4330
+ get question() {
4331
+ return (this._question ??= new Question3({ client: this.client }));
4332
+ }
4333
+ _reference;
4334
+ get reference() {
4335
+ return (this._reference ??= new Reference({ client: this.client }));
4336
+ }
4337
+ _projectCopy;
4338
+ get projectCopy() {
4339
+ return (this._projectCopy ??= new ProjectCopy2({ client: this.client }));
4340
+ }
4341
+ }
4342
+ export class OpencodeClient extends HeyApiClient {
4343
+ static __registry = new HeyApiRegistry();
4344
+ constructor(args) {
4345
+ super(args);
4346
+ OpencodeClient.__registry.set(this, args?.key);
4347
+ }
4348
+ _auth;
4349
+ get auth() {
4350
+ return (this._auth ??= new Auth({ client: this.client }));
4351
+ }
4352
+ _app;
4353
+ get app() {
4354
+ return (this._app ??= new App({ client: this.client }));
4355
  }
4356
  _experimental;
4357
  get experimental() {
4358
  return (this._experimental ??= new Experimental({ client: this.client }));
4359
  }
4360
+ _global;
4361
+ get global() {
4362
+ return (this._global ??= new Global({ client: this.client }));
4363
+ }
4364
+ _event;
4365
+ get event() {
4366
+ return (this._event ??= new Event({ client: this.client }));
4367
+ }
4368
+ _config;
4369
+ get config() {
4370
+ return (this._config ??= new Config2({ client: this.client }));
4371
+ }
4372
  _tool;
4373
  get tool() {
4374
  return (this._tool ??= new Tool({ client: this.client }));
 
4445
  get sync() {
4446
  return (this._sync ??= new Sync({ client: this.client }));
4447
  }
 
 
 
 
4448
  _tui;
4449
  get tui() {
4450
  return (this._tui ??= new Tui({ client: this.client }));
4451
  }
4452
+ _v2;
4453
+ get v2() {
4454
+ return (this._v2 ??= new V2({ client: this.client }));
4455
+ }
4456
  }
.opencode/node_modules/@opencode-ai/sdk/dist/v2/gen/types.gen.d.ts CHANGED
The diff for this file is too large to render. See raw diff
 
.opencode/node_modules/@opencode-ai/sdk/package.json CHANGED
@@ -1,10 +1,11 @@
1
  {
2
  "$schema": "https://json.schemastore.org/package.json",
3
  "name": "@opencode-ai/sdk",
4
- "version": "1.15.5",
5
  "type": "module",
6
  "license": "MIT",
7
  "scripts": {
 
8
  "typecheck": "tsgo --noEmit",
9
  "build": "bun ./script/build.ts"
10
  },
@@ -36,6 +37,10 @@
36
  "./v2/server": {
37
  "import": "./dist/v2/server.js",
38
  "types": "./dist/v2/server.d.ts"
 
 
 
 
39
  }
40
  },
41
  "files": [
 
1
  {
2
  "$schema": "https://json.schemastore.org/package.json",
3
  "name": "@opencode-ai/sdk",
4
+ "version": "1.18.21",
5
  "type": "module",
6
  "license": "MIT",
7
  "scripts": {
8
+ "test": "bun test",
9
  "typecheck": "tsgo --noEmit",
10
  "build": "bun ./script/build.ts"
11
  },
 
37
  "./v2/server": {
38
  "import": "./dist/v2/server.js",
39
  "types": "./dist/v2/server.d.ts"
40
+ },
41
+ "./v2/types": {
42
+ "import": "./dist/v2/gen/types.gen.js",
43
+ "types": "./dist/v2/gen/types.gen.d.ts"
44
  }
45
  },
46
  "files": [
.opencode/node_modules/effect/dist/Array.d.ts CHANGED
The diff for this file is too large to render. See raw diff
 
.opencode/node_modules/effect/dist/Array.d.ts.map CHANGED
The diff for this file is too large to render. See raw diff
 
.opencode/node_modules/effect/dist/Array.js CHANGED
@@ -1,85 +1,11 @@
1
  /**
2
- * Utilities for working with immutable arrays (and non-empty arrays) in a
3
- * functional style. All functions treat arrays as immutable — they return new
4
- * arrays rather than mutating the input.
5
- *
6
- * ## Mental model
7
- *
8
- * - **`Array<A>`** is a standard JS array. All functions in this module return
9
- * new arrays; the input is never mutated.
10
- * - **`NonEmptyReadonlyArray<A>`** (`readonly [A, ...Array<A>]`) is a readonly
11
- * array guaranteed to have at least one element. Many functions preserve or
12
- * require this guarantee at the type level.
13
- * - **`NonEmptyArray<A>`** is the mutable counterpart: `[A, ...Array<A>]`.
14
- * - Most functions are **dual** — they can be called either as
15
- * `Array.fn(array, arg)` (data-first) or piped as
16
- * `pipe(array, Array.fn(arg))` (data-last).
17
- * - Functions that access elements by index return `Option<A>` for safety; use
18
- * the `*NonEmpty` variants (e.g. {@link headNonEmpty}) when you already know
19
- * the array is non-empty.
20
- * - Set-like operations ({@link union}, {@link intersection},
21
- * {@link difference}) use `Equal.equivalence()` by default; use the `*With`
22
- * variants for custom equality.
23
- *
24
- * ## Common tasks
25
- *
26
- * - **Create** an array: {@link make}, {@link of}, {@link empty},
27
- * {@link fromIterable}, {@link range}, {@link makeBy}, {@link replicate},
28
- * {@link unfold}
29
- * - **Access** elements: {@link head}, {@link last}, {@link get}, {@link tail},
30
- * {@link init}
31
- * - **Transform**: {@link map}, {@link flatMap}, {@link flatten}
32
- * - **Filter**: {@link filter}, {@link partition}, {@link dedupe}
33
- * - **Combine**: {@link append}, {@link prepend}, {@link appendAll},
34
- * {@link prependAll}, {@link zip}, {@link cartesian}
35
- * - **Split**: {@link splitAt}, {@link chunksOf}, {@link span}, {@link window}
36
- * - **Search**: {@link findFirst}, {@link findLast}, {@link contains}
37
- * - **Sort**: {@link sort}, {@link sortBy}, {@link sortWith}
38
- * - **Fold**: {@link reduce}, {@link scan}, {@link join}
39
- * - **Group**: {@link groupBy}, {@link group}, {@link groupWith}
40
- * - **Set operations**: {@link union}, {@link intersection},
41
- * {@link difference}
42
- * - **Match** on empty vs non-empty: {@link match}, {@link matchLeft},
43
- * {@link matchRight}
44
- * - **Check** properties: {@link isArray}, {@link isArrayNonEmpty},
45
- * {@link every}, {@link some}
46
- *
47
- * ## Gotchas
48
- *
49
- * - {@link fromIterable} returns the original array reference when given an
50
- * array; if you need a copy, use {@link copy}.
51
- * - `sort`, `reverse`, etc. always allocate a new array — the input is never
52
- * mutated.
53
- * - {@link makeBy} and {@link replicate} normalize `n` to an integer >= 1 —
54
- * they never produce an empty array.
55
- * - {@link range}`(start, end)` is inclusive on both ends. If `start > end` it
56
- * returns `[start]`.
57
- * - Functions returning `Option` (e.g. {@link head}, {@link findFirst}) return
58
- * `Option.none()` for empty inputs — they never throw.
59
- *
60
- * ## Quickstart
61
- *
62
- * **Example** (Basic array operations)
63
- *
64
- * ```ts
65
- * import { Array } from "effect"
66
- *
67
- * const numbers = Array.make(1, 2, 3, 4, 5)
68
- *
69
- * const doubled = Array.map(numbers, (n) => n * 2)
70
- * console.log(doubled) // [2, 4, 6, 8, 10]
71
- *
72
- * const evens = Array.filter(numbers, (n) => n % 2 === 0)
73
- * console.log(evens) // [2, 4]
74
- *
75
- * const sum = Array.reduce(numbers, 0, (acc, n) => acc + n)
76
- * console.log(sum) // 15
77
- * ```
78
- *
79
- * @see {@link make} — create a non-empty array from elements
80
- * @see {@link map} — transform each element
81
- * @see {@link filter} — keep elements matching a predicate
82
- * @see {@link reduce} — fold an array to a single value
83
  *
84
  * @since 2.0.0
85
  */
@@ -96,10 +22,12 @@ import * as Reducer from "./Reducer.js";
96
  import * as Result from "./Result.js";
97
  import * as Tuple from "./Tuple.js";
98
  /**
99
- * Reference to the global `Array` constructor.
 
 
100
  *
101
- * Use this when you need the native `Array` constructor while the `Array`
102
- * namespace is in scope (e.g. `Array.Array.isArray`, `Array.Array.from`).
103
  *
104
  * **Example** (Using the Array constructor)
105
  *
@@ -117,9 +45,14 @@ export const Array = globalThis.Array;
117
  /**
118
  * Creates a `NonEmptyArray` from one or more elements.
119
  *
120
- * - Use when you have literal values and want a typed non-empty array.
121
- * - The element type is inferred as the union of all arguments.
122
- * - Always returns a `NonEmptyArray` since at least one argument is required.
 
 
 
 
 
123
  *
124
  * **Example** (Creating an array from values)
125
  *
@@ -140,9 +73,13 @@ export const make = (...elements) => elements;
140
  /**
141
  * Creates a new `Array` of the specified length with all slots uninitialized.
142
  *
143
- * - Use when you need a pre-sized array and will fill it imperatively.
144
- * - Elements are typed as `A | undefined` since slots are empty.
145
- * - Prefer {@link makeBy} when you can compute each element from its index.
 
 
 
 
146
  *
147
  * **Example** (Allocating a fixed-size array)
148
  *
@@ -162,9 +99,15 @@ export const allocate = n => new Array(n);
162
  /**
163
  * Creates a `NonEmptyArray` of length `n` where element `i` is computed by `f(i)`.
164
  *
165
- * - Use when you need an array whose values depend on the index.
166
- * - `n` is normalized to an integer >= 1 — always returns at least one element.
167
- * - Dual: `Array.makeBy(5, f)` or `pipe(5, Array.makeBy(f))`.
 
 
 
 
 
 
168
  *
169
  * **Example** (Generating values from indices)
170
  *
@@ -193,9 +136,13 @@ export const makeBy = /*#__PURE__*/dual(2, (n, f) => {
193
  * Creates a `NonEmptyArray` containing a range of integers, inclusive on both
194
  * ends.
195
  *
196
- * - Use when you need a sequence of consecutive integers.
197
- * - If `start > end`, returns `[start]`.
198
- * - Always returns a `NonEmptyArray`.
 
 
 
 
199
  *
200
  * **Example** (Creating a range)
201
  *
@@ -215,9 +162,15 @@ export const range = (start, end) => start <= end ? makeBy(end - start + 1, i =>
215
  /**
216
  * Creates a `NonEmptyArray` containing a value repeated `n` times.
217
  *
218
- * - Use when you need multiple copies of the same value.
219
- * - `n` is normalized to an integer >= 1 — always returns at least one element.
220
- * - Dual: `Array.replicate("a", 3)` or `pipe("a", Array.replicate(3))`.
 
 
 
 
 
 
221
  *
222
  * **Example** (Repeating a value)
223
  *
@@ -237,10 +190,15 @@ export const replicate = /*#__PURE__*/dual(2, (a, n) => makeBy(n, () => a));
237
  /**
238
  * Converts an `Iterable` to an `Array`.
239
  *
240
- * - If the input is already an array, returns it **by reference** (no copy).
241
- * - Otherwise, creates a new array from the iterable.
242
- * - Use {@link copy} if you need a fresh array even when the input is already
243
- * an array.
 
 
 
 
 
244
  *
245
  * **Example** (Converting a Set to an array)
246
  *
@@ -261,9 +219,16 @@ export const fromIterable = collection => Array.isArray(collection) ? collection
261
  /**
262
  * Normalizes a value that is either a single element or an array into an array.
263
  *
264
- * - If the input is already an array, returns it by reference.
265
- * - If the input is a single value, wraps it in a one-element array.
266
- * - Useful for APIs that accept `A | Array<A>`.
 
 
 
 
 
 
 
267
  *
268
  * **Example** (Normalizing input)
269
  *
@@ -284,8 +249,15 @@ export const ensure = self => Array.isArray(self) ? self : [self];
284
  /**
285
  * Converts a record into an array of `[key, value]` tuples.
286
  *
287
- * - Key order follows `Object.entries` semantics.
288
- * - Returns an empty array for an empty record.
 
 
 
 
 
 
 
289
  *
290
  * **Example** (Record to entries)
291
  *
@@ -296,13 +268,20 @@ export const ensure = self => Array.isArray(self) ? self : [self];
296
  * console.log(result) // [["a", 1], ["b", 2], ["c", 3]]
297
  * ```
298
  *
299
- * @category conversions
 
 
 
300
  * @since 2.0.0
301
  */
302
  export const fromRecord = Record.toEntries;
303
  /**
304
  * Converts an `Option` to an array: `Some(a)` becomes `[a]`, `None` becomes `[]`.
305
  *
 
 
 
 
306
  * **Example** (Option to array)
307
  *
308
  * ```ts
@@ -314,16 +293,21 @@ export const fromRecord = Record.toEntries;
314
  *
315
  * @see {@link getSomes} — extract `Some` values from an array of Options
316
  *
317
- * @category conversions
318
  * @since 2.0.0
319
  */
320
  export const fromOption = Option.toArray;
321
  /**
322
  * Pattern-matches on an array, handling empty and non-empty cases separately.
323
  *
324
- * - Use when you need to branch on whether an array has elements.
325
- * - `onNonEmpty` receives a `NonEmptyReadonlyArray`.
326
- * - Dual: data-first or data-last.
 
 
 
 
 
327
  *
328
  * **Example** (Branching on emptiness)
329
  *
@@ -352,8 +336,14 @@ export const match = /*#__PURE__*/dual(2, (self, {
352
  * Pattern-matches on an array from the left, providing the first element and
353
  * the remaining elements separately.
354
  *
355
- * - `onNonEmpty` receives `(head, tail)` where `tail` is the rest of the array.
356
- * - Use when you want to process the first element differently from the rest.
 
 
 
 
 
 
357
  *
358
  * **Example** (Head and tail destructuring)
359
  *
@@ -382,8 +372,14 @@ export const matchLeft = /*#__PURE__*/dual(2, (self, {
382
  * Pattern-matches on an array from the right, providing all elements except the
383
  * last and the last element separately.
384
  *
385
- * - `onNonEmpty` receives `(init, last)` where `init` is everything but the last element.
386
- * - Use when you want to process the last element differently from the rest.
 
 
 
 
 
 
387
  *
388
  * **Example** (Init and last destructuring)
389
  *
@@ -411,8 +407,10 @@ export const matchRight = /*#__PURE__*/dual(2, (self, {
411
  /**
412
  * Adds a single element to the front of an iterable, returning a `NonEmptyArray`.
413
  *
414
- * - Always returns a non-empty array.
415
- * - Does not mutate the input.
 
 
416
  *
417
  * **Example** (Prepending an element)
418
  *
@@ -426,15 +424,20 @@ export const matchRight = /*#__PURE__*/dual(2, (self, {
426
  * @see {@link append} — add to the end
427
  * @see {@link prependAll} — prepend multiple elements
428
  *
429
- * @category concatenating
430
  * @since 2.0.0
431
  */
432
  export const prepend = /*#__PURE__*/dual(2, (self, head) => [head, ...self]);
433
  /**
434
  * Prepends all elements from a prefix iterable to the front of an array.
435
  *
436
- * - If either input is non-empty, the result is a `NonEmptyArray`.
437
- * - Does not mutate the input.
 
 
 
 
 
438
  *
439
  * **Example** (Prepending multiple elements)
440
  *
@@ -448,15 +451,17 @@ export const prepend = /*#__PURE__*/dual(2, (self, head) => [head, ...self]);
448
  * @see {@link prepend} — add a single element to the front
449
  * @see {@link appendAll} — add elements to the end
450
  *
451
- * @category concatenating
452
  * @since 2.0.0
453
  */
454
  export const prependAll = /*#__PURE__*/dual(2, (self, that) => fromIterable(that).concat(fromIterable(self)));
455
  /**
456
  * Adds a single element to the end of an iterable, returning a `NonEmptyArray`.
457
  *
458
- * - Always returns a non-empty array.
459
- * - Does not mutate the input.
 
 
460
  *
461
  * **Example** (Appending an element)
462
  *
@@ -470,15 +475,21 @@ export const prependAll = /*#__PURE__*/dual(2, (self, that) => fromIterable(that
470
  * @see {@link prepend} — add to the front
471
  * @see {@link appendAll} — append multiple elements
472
  *
473
- * @category concatenating
474
  * @since 2.0.0
475
  */
476
  export const append = /*#__PURE__*/dual(2, (self, last) => [...self, last]);
477
  /**
478
  * Concatenates two iterables into a single array.
479
  *
480
- * - If either input is non-empty, the result is a `NonEmptyArray`.
481
- * - Does not mutate the inputs.
 
 
 
 
 
 
482
  *
483
  * **Example** (Concatenating arrays)
484
  *
@@ -492,16 +503,22 @@ export const append = /*#__PURE__*/dual(2, (self, last) => [...self, last]);
492
  * @see {@link append} — add a single element to the end
493
  * @see {@link prependAll} — add elements to the front
494
  *
495
- * @category concatenating
496
  * @since 2.0.0
497
  */
498
  export const appendAll = /*#__PURE__*/dual(2, (self, that) => fromIterable(self).concat(fromIterable(that)));
499
  /**
500
- * Left-to-right fold that keeps every intermediate accumulator value.
 
 
 
 
501
  *
502
- * - The output length is `input.length + 1` (starts with the initial value).
503
- * - Always returns a `NonEmptyArray` because the initial value is included.
504
- * - Use {@link reduce} if you only need the final accumulated value.
 
 
505
  *
506
  * **Example** (Running totals)
507
  *
@@ -528,10 +545,17 @@ export const scan = /*#__PURE__*/dual(3, (self, b, f) => {
528
  return out;
529
  });
530
  /**
531
- * Right-to-left fold that keeps every intermediate accumulator value.
 
 
 
 
 
532
  *
533
- * - The output length is `input.length + 1` (ends with the initial value).
534
- * - Always returns a `NonEmptyArray`.
 
 
535
  *
536
  * **Example** (Reverse running totals)
537
  *
@@ -558,10 +582,16 @@ export const scanRight = /*#__PURE__*/dual(3, (self, b, f) => {
558
  return out;
559
  });
560
  /**
561
- * Tests whether a value is an `Array`.
 
 
 
 
562
  *
563
- * - Acts as a type guard narrowing the input to `Array<unknown>`.
564
- * - Delegates to `globalThis.Array.isArray`.
 
 
565
  *
566
  * **Example** (Type-guarding an unknown value)
567
  *
@@ -580,7 +610,7 @@ export const scanRight = /*#__PURE__*/dual(3, (self, b, f) => {
580
  */
581
  export const isArray = Array.isArray;
582
  /**
583
- * Tests whether a mutable `Array` is empty, narrowing the type to `[]`.
584
  *
585
  * **Example** (Checking for an empty array)
586
  *
@@ -595,11 +625,11 @@ export const isArray = Array.isArray;
595
  * @see {@link isArrayNonEmpty} — opposite check
596
  *
597
  * @category guards
598
- * @since 2.0.0
599
  */
600
  export const isArrayEmpty = self => self.length === 0;
601
  /**
602
- * Tests whether a `ReadonlyArray` is empty, narrowing the type to `readonly []`.
603
  *
604
  * **Example** (Checking for an empty readonly array)
605
  *
@@ -614,13 +644,18 @@ export const isArrayEmpty = self => self.length === 0;
614
  * @see {@link isReadonlyArrayNonEmpty} — opposite check
615
  *
616
  * @category guards
617
- * @since 2.0.0
618
  */
619
  export const isReadonlyArrayEmpty = isArrayEmpty;
620
  /**
621
- * Tests whether a mutable `Array` is non-empty, narrowing the type to
622
  * `NonEmptyArray`.
623
  *
 
 
 
 
 
624
  * **Example** (Checking for a non-empty array)
625
  *
626
  * ```ts
@@ -634,13 +669,18 @@ export const isReadonlyArrayEmpty = isArrayEmpty;
634
  * @see {@link isArrayEmpty} — opposite check
635
  *
636
  * @category guards
637
- * @since 2.0.0
638
  */
639
  export const isArrayNonEmpty = internalArray.isArrayNonEmpty;
640
  /**
641
- * Tests whether a `ReadonlyArray` is non-empty, narrowing the type to
642
  * `NonEmptyReadonlyArray`.
643
  *
 
 
 
 
 
644
  * **Example** (Checking for a non-empty readonly array)
645
  *
646
  * ```ts
@@ -654,12 +694,16 @@ export const isArrayNonEmpty = internalArray.isArrayNonEmpty;
654
  * @see {@link isReadonlyArrayEmpty} — opposite check
655
  *
656
  * @category guards
657
- * @since 2.0.0
658
  */
659
  export const isReadonlyArrayNonEmpty = internalArray.isArrayNonEmpty;
660
  /**
661
  * Returns the number of elements in a `ReadonlyArray`.
662
  *
 
 
 
 
663
  * **Example** (Getting the length)
664
  *
665
  * ```ts
@@ -678,11 +722,17 @@ export function isOutOfBounds(i, as) {
678
  }
679
  const clamp = (i, as) => Math.floor(Math.min(Math.max(0, i), as.length));
680
  /**
681
- * Safely reads an element at the given index, returning `Option.some` or
682
  * `Option.none` if the index is out of bounds.
683
  *
684
- * - The index is floored to an integer.
685
- * - Never throws.
 
 
 
 
 
 
686
  *
687
  * **Example** (Safe index access)
688
  *
@@ -693,9 +743,9 @@ const clamp = (i, as) => Math.floor(Math.min(Math.max(0, i), as.length));
693
  * console.log(Array.get([1, 2, 3], 10)) // None
694
  * ```
695
  *
696
- * @see {@link getUnsafe} — throws on out of bounds
697
- * @see {@link head} — get the first element
698
- * @see {@link last} — get the last element
699
  *
700
  * @category getters
701
  * @since 2.0.0
@@ -707,8 +757,15 @@ export const get = /*#__PURE__*/dual(2, (self, index) => {
707
  /**
708
  * Reads an element at the given index, throwing if the index is out of bounds.
709
  *
710
- * - Throws an `Error` with the message `"Index out of bounds: <i>"`.
711
- * - Prefer {@link get} for safe access.
 
 
 
 
 
 
 
712
  *
713
  * **Example** (Unsafe index access)
714
  *
@@ -721,8 +778,8 @@ export const get = /*#__PURE__*/dual(2, (self, index) => {
721
  *
722
  * @see {@link get} — safe version returning `Option`
723
  *
724
- * @since 2.0.0
725
  * @category unsafe
 
726
  */
727
  export const getUnsafe = /*#__PURE__*/dual(2, (self, index) => {
728
  const i = Math.floor(index);
@@ -734,8 +791,14 @@ export const getUnsafe = /*#__PURE__*/dual(2, (self, index) => {
734
  /**
735
  * Splits a non-empty array into its first element and the remaining elements.
736
  *
737
- * - Returns a tuple `[head, tail]`.
738
- * - Requires a `NonEmptyReadonlyArray`.
 
 
 
 
 
 
739
  *
740
  * **Example** (Destructuring head and tail)
741
  *
@@ -746,9 +809,9 @@ export const getUnsafe = /*#__PURE__*/dual(2, (self, index) => {
746
  * console.log(result) // [1, [2, 3, 4]]
747
  * ```
748
  *
749
- * @see {@link unappend} — split into init + last
750
- * @see {@link headNonEmpty} — get only the head
751
- * @see {@link tailNonEmpty} — get only the tail
752
  *
753
  * @category splitting
754
  * @since 2.0.0
@@ -758,8 +821,14 @@ export const unprepend = self => [headNonEmpty(self), tailNonEmpty(self)];
758
  * Splits a non-empty array into all elements except the last, and the last
759
  * element.
760
  *
761
- * - Returns a tuple `[init, last]`.
762
- * - Requires a `NonEmptyReadonlyArray`.
 
 
 
 
 
 
763
  *
764
  * **Example** (Destructuring init and last)
765
  *
@@ -770,18 +839,22 @@ export const unprepend = self => [headNonEmpty(self), tailNonEmpty(self)];
770
  * console.log(result) // [[1, 2, 3], 4]
771
  * ```
772
  *
773
- * @see {@link unprepend} — split into head + tail
774
- * @see {@link initNonEmpty} — get only the init
775
- * @see {@link lastNonEmpty} — get only the last
776
  *
777
  * @category splitting
778
  * @since 2.0.0
779
  */
780
  export const unappend = self => [initNonEmpty(self), lastNonEmpty(self)];
781
  /**
782
- * Returns the first element of an array wrapped in `Option.some`, or
783
  * `Option.none` if the array is empty.
784
  *
 
 
 
 
785
  * **Example** (Getting the first element)
786
  *
787
  * ```ts
@@ -802,6 +875,11 @@ export const head = /*#__PURE__*/get(0);
802
  * Returns the first element of a `NonEmptyReadonlyArray` directly (no `Option`
803
  * wrapper).
804
  *
 
 
 
 
 
805
  * **Example** (Getting the head of a non-empty array)
806
  *
807
  * ```ts
@@ -817,9 +895,13 @@ export const head = /*#__PURE__*/get(0);
817
  */
818
  export const headNonEmpty = /*#__PURE__*/getUnsafe(0);
819
  /**
820
- * Returns the last element of an array wrapped in `Option.some`, or
821
  * `Option.none` if the array is empty.
822
  *
 
 
 
 
823
  * **Example** (Getting the last element)
824
  *
825
  * ```ts
@@ -840,6 +922,11 @@ export const last = self => isReadonlyArrayNonEmpty(self) ? Option.some(lastNonE
840
  * Returns the last element of a `NonEmptyReadonlyArray` directly (no `Option`
841
  * wrapper).
842
  *
 
 
 
 
 
843
  * **Example** (Getting the last of a non-empty array)
844
  *
845
  * ```ts
@@ -855,10 +942,15 @@ export const last = self => isReadonlyArrayNonEmpty(self) ? Option.some(lastNonE
855
  */
856
  export const lastNonEmpty = self => self[self.length - 1];
857
  /**
858
- * Returns all elements except the first, wrapped in an `Option`.
 
 
 
 
859
  *
860
- * - Allocates a new array via `slice(1)`.
861
- * - Returns `Option.none()` for empty inputs.
 
862
  *
863
  * **Example** (Getting the tail)
864
  *
@@ -882,6 +974,10 @@ export function tail(self) {
882
  /**
883
  * Returns all elements except the first of a `NonEmptyReadonlyArray`.
884
  *
 
 
 
 
885
  * **Example** (Getting the tail of a non-empty array)
886
  *
887
  * ```ts
@@ -898,10 +994,16 @@ export function tail(self) {
898
  */
899
  export const tailNonEmpty = self => self.slice(1);
900
  /**
901
- * Returns all elements except the last, wrapped in an `Option`.
 
 
 
 
 
 
902
  *
903
- * - Allocates a new array via `slice(0, -1)`.
904
- * - Returns `Option.none()` for empty inputs.
905
  *
906
  * **Example** (Getting init)
907
  *
@@ -925,6 +1027,10 @@ export function init(self) {
925
  /**
926
  * Returns all elements except the last of a `NonEmptyReadonlyArray`.
927
  *
 
 
 
 
928
  * **Example** (Getting init of a non-empty array)
929
  *
930
  * ```ts
@@ -943,8 +1049,13 @@ export const initNonEmpty = self => self.slice(0, -1);
943
  /**
944
  * Keeps the first `n` elements, creating a new array.
945
  *
946
- * - `n` is clamped to `[0, length]`.
947
- * - Returns an empty array when `n <= 0`.
 
 
 
 
 
948
  *
949
  * **Example** (Taking from the start)
950
  *
@@ -954,9 +1065,9 @@ export const initNonEmpty = self => self.slice(0, -1);
954
  * console.log(Array.take([1, 2, 3, 4, 5], 3)) // [1, 2, 3]
955
  * ```
956
  *
957
- * @see {@link takeRight} — keep from the end
958
- * @see {@link takeWhile} — keep while predicate holds
959
- * @see {@link drop} — remove from the start
960
  *
961
  * @category getters
962
  * @since 2.0.0
@@ -968,8 +1079,13 @@ export const take = /*#__PURE__*/dual(2, (self, n) => {
968
  /**
969
  * Keeps the last `n` elements, creating a new array.
970
  *
971
- * - `n` is clamped to `[0, length]`.
972
- * - Returns an empty array when `n <= 0`.
 
 
 
 
 
973
  *
974
  * **Example** (Taking from the end)
975
  *
@@ -994,8 +1110,15 @@ export const takeRight = /*#__PURE__*/dual(2, (self, n) => {
994
  * Takes elements from the start while the predicate holds, stopping at the
995
  * first element that fails.
996
  *
997
- * - Supports refinements for type narrowing.
998
- * - The predicate receives `(element, index)`.
 
 
 
 
 
 
 
999
  *
1000
  * **Example** (Taking while condition holds)
1001
  *
@@ -1005,9 +1128,9 @@ export const takeRight = /*#__PURE__*/dual(2, (self, n) => {
1005
  * console.log(Array.takeWhile([1, 3, 2, 4, 1, 2], (x) => x < 4)) // [1, 3, 2]
1006
  * ```
1007
  *
1008
- * @see {@link take} — take a fixed count
1009
- * @see {@link dropWhile} — drop while predicate holds
1010
- * @see {@link span} — split into matching prefix + rest
1011
  *
1012
  * @category getters
1013
  * @since 2.0.0
@@ -1027,8 +1150,18 @@ export const takeWhile = /*#__PURE__*/dual(2, (self, predicate) => {
1027
  /**
1028
  * Takes elements from the start while a `Filter` succeeds, collecting transformed values.
1029
  *
1030
- * - The filter receives `(element, index)`.
1031
- * - Stops at the first filter failure.
 
 
 
 
 
 
 
 
 
 
1032
  *
1033
  * @category getters
1034
  * @since 4.0.0
@@ -1060,9 +1193,16 @@ const spanIndex = (self, predicate) => {
1060
  * Splits an iterable into two arrays: the longest prefix where the predicate
1061
  * holds, and the remaining elements.
1062
  *
1063
- * - Equivalent to `[takeWhile(pred), dropWhile(pred)]` but more efficient
1064
- * (single pass).
1065
- * - Supports refinements for type narrowing of the prefix.
 
 
 
 
 
 
 
1066
  *
1067
  * **Example** (Splitting at predicate boundary)
1068
  *
@@ -1072,9 +1212,9 @@ const spanIndex = (self, predicate) => {
1072
  * console.log(Array.span([1, 3, 2, 4, 5], (x) => x % 2 === 1)) // [[1, 3], [2, 4, 5]]
1073
  * ```
1074
  *
1075
- * @see {@link takeWhile} — keep only the matching prefix
1076
- * @see {@link dropWhile} — keep only the rest
1077
- * @see {@link splitWhere} — split at the first element matching a predicate
1078
  *
1079
  * @category splitting
1080
  * @since 2.0.0
@@ -1086,8 +1226,15 @@ export const span = /*#__PURE__*/dual(2, (self, predicate) => {
1086
  /**
1087
  * Removes the first `n` elements, creating a new array.
1088
  *
1089
- * - `n` is clamped to `[0, length]`.
1090
- * - Returns a copy of the full array when `n <= 0`.
 
 
 
 
 
 
 
1091
  *
1092
  * **Example** (Dropping from the start)
1093
  *
@@ -1097,9 +1244,9 @@ export const span = /*#__PURE__*/dual(2, (self, predicate) => {
1097
  * console.log(Array.drop([1, 2, 3, 4, 5], 2)) // [3, 4, 5]
1098
  * ```
1099
  *
1100
- * @see {@link dropRight} — remove from the end
1101
- * @see {@link dropWhile} — remove while predicate holds
1102
- * @see {@link take} — keep from the start
1103
  *
1104
  * @category getters
1105
  * @since 2.0.0
@@ -1111,7 +1258,13 @@ export const drop = /*#__PURE__*/dual(2, (self, n) => {
1111
  /**
1112
  * Removes the last `n` elements, creating a new array.
1113
  *
1114
- * - `n` is clamped to `[0, length]`.
 
 
 
 
 
 
1115
  *
1116
  * **Example** (Dropping from the end)
1117
  *
@@ -1134,7 +1287,13 @@ export const dropRight = /*#__PURE__*/dual(2, (self, n) => {
1134
  /**
1135
  * Drops elements from the start while the predicate holds, returning the rest.
1136
  *
1137
- * - The predicate receives `(element, index)`.
 
 
 
 
 
 
1138
  *
1139
  * **Example** (Dropping while condition holds)
1140
  *
@@ -1164,8 +1323,18 @@ export const dropWhile = /*#__PURE__*/dual(2, (self, predicate) => {
1164
  /**
1165
  * Drops elements from the start while a `Filter` succeeds.
1166
  *
1167
- * - The filter receives `(element, index)`.
1168
- * - Returns the remaining original elements after the first filter failure.
 
 
 
 
 
 
 
 
 
 
1169
  *
1170
  * @category getters
1171
  * @since 4.0.0
@@ -1185,6 +1354,11 @@ export const dropWhileFilter = /*#__PURE__*/dual(2, (self, f) => {
1185
  * Returns the index of the first element matching the predicate, wrapped in an
1186
  * `Option`.
1187
  *
 
 
 
 
 
1188
  * **Example** (Finding an index)
1189
  *
1190
  * ```ts
@@ -1213,6 +1387,10 @@ export const findFirstIndex = /*#__PURE__*/dual(2, (self, predicate) => {
1213
  * Returns the index of the last element matching the predicate, wrapped in an
1214
  * `Option`.
1215
  *
 
 
 
 
1216
  * **Example** (Finding the last matching index)
1217
  *
1218
  * ```ts
@@ -1240,9 +1418,16 @@ export const findLastIndex = /*#__PURE__*/dual(2, (self, predicate) => {
1240
  * Returns the first element matching a predicate, refinement, or mapping
1241
  * function, wrapped in `Option`.
1242
  *
1243
- * - Accepts a predicate `(a, i) => boolean`, a refinement, or a function
1244
- * `(a, i) => Option<B>` for simultaneous find-and-transform.
1245
- * - Returns `Option.none()` if no element matches.
 
 
 
 
 
 
 
1246
  *
1247
  * **Example** (Finding the first match)
1248
  *
@@ -1261,8 +1446,18 @@ export const findLastIndex = /*#__PURE__*/dual(2, (self, predicate) => {
1261
  */
1262
  export const findFirst = moduleIterable.findFirst;
1263
  /**
1264
- * Returns a tuple `[element, index]` of the first element matching a
1265
- * predicate, wrapped in an `Option`.
 
 
 
 
 
 
 
 
 
 
1266
  *
1267
  * **Example** (Finding element with its index)
1268
  *
@@ -1299,8 +1494,14 @@ export const findFirstWithIndex = /*#__PURE__*/dual(2, (self, f) => {
1299
  * Returns the last element matching a predicate, refinement, or mapping
1300
  * function, wrapped in `Option`.
1301
  *
1302
- * - Searches from the end of the array.
1303
- * - Returns `Option.none()` if no element matches.
 
 
 
 
 
 
1304
  *
1305
  * **Example** (Finding the last match)
1306
  *
@@ -1334,11 +1535,16 @@ export const findLast = /*#__PURE__*/dual(2, (self, f) => {
1334
  return Option.none();
1335
  });
1336
  /**
1337
- * Inserts an element at the specified index, returning a new `NonEmptyArray`
1338
  * wrapped in an `Option`.
1339
  *
1340
- * - Valid indices: `0` to `length` (inclusive — inserting at `length` appends).
1341
- * - Does not mutate the input.
 
 
 
 
 
1342
  *
1343
  * **Example** (Inserting at an index)
1344
  *
@@ -1363,10 +1569,16 @@ export const insertAt = /*#__PURE__*/dual(3, (self, i, b) => {
1363
  return Option.some(out);
1364
  });
1365
  /**
1366
- * Replaces the element at the specified index with a new value, returning a new
1367
- * array, wrapped in an `Option`.
 
 
1368
  *
1369
- * - Does not mutate the input.
 
 
 
 
1370
  *
1371
  * **Example** (Replacing an element)
1372
  *
@@ -1384,10 +1596,17 @@ export const insertAt = /*#__PURE__*/dual(3, (self, i, b) => {
1384
  */
1385
  export const replace = /*#__PURE__*/dual(3, (self, i, b) => modify(self, i, () => b));
1386
  /**
1387
- * Applies a function to the element at the specified index, returning a new
1388
- * array, wrapped in an `Option`.
 
 
1389
  *
1390
- * - Does not mutate the input.
 
 
 
 
 
1391
  *
1392
  * **Example** (Modifying an element)
1393
  *
@@ -1419,7 +1638,10 @@ export const modify = /*#__PURE__*/dual(3, (self, i, f) => {
1419
  * Removes the element at the specified index, returning a new array. If the
1420
  * index is out of bounds, returns a copy of the original.
1421
  *
1422
- * - Does not mutate the input.
 
 
 
1423
  *
1424
  * **Example** (Removing an element)
1425
  *
@@ -1447,8 +1669,14 @@ export const remove = /*#__PURE__*/dual(2, (self, i) => {
1447
  /**
1448
  * Reverses an iterable into a new array.
1449
  *
1450
- * - Does not mutate the input.
1451
- * - Preserves `NonEmptyArray` in the return type.
 
 
 
 
 
 
1452
  *
1453
  * **Example** (Reversing an array)
1454
  *
@@ -1465,10 +1693,14 @@ export const reverse = self => Array.from(self).reverse();
1465
  /**
1466
  * Sorts an array by the given `Order`, returning a new array.
1467
  *
1468
- * - Does not mutate the input.
1469
- * - Preserves `NonEmptyArray` in the return type.
1470
- * - Use {@link sortWith} to sort by a derived key, or {@link sortBy} for
1471
- * multi-key sorting.
 
 
 
 
1472
  *
1473
  * **Example** (Sorting numbers)
1474
  *
@@ -1493,8 +1725,14 @@ export const sort = /*#__PURE__*/dual(2, (self, O) => {
1493
  * Sorts an array by a derived key using a mapping function and an `Order` for
1494
  * that key.
1495
  *
1496
- * - Equivalent to `sort(Order.mapInput(order, f))` but more convenient.
1497
- * - Does not mutate the input.
 
 
 
 
 
 
1498
  *
1499
  * **Example** (Sorting strings by length)
1500
  *
@@ -1505,19 +1743,26 @@ export const sort = /*#__PURE__*/dual(2, (self, O) => {
1505
  * // ["b", "cc", "aaa"]
1506
  * ```
1507
  *
1508
- * @see {@link sort} — sort by a direct `Order`
1509
- * @see {@link sortBy} — sort by multiple orders
1510
  *
1511
- * @since 2.0.0
1512
  * @category elements
 
1513
  */
1514
  export const sortWith = /*#__PURE__*/dual(3, (self, f, order) => Array.from(self).map(a => [a, f(a)]).sort(([, a], [, b]) => order(a, b)).map(([_]) => _));
1515
  /**
1516
  * Sorts an array by multiple `Order`s applied in sequence: the first order is
1517
  * used first; ties are broken by the second order, and so on.
1518
  *
1519
- * - Data-last only (returns a function).
1520
- * - Preserves `NonEmptyArray` in the return type.
 
 
 
 
 
 
 
1521
  *
1522
  * **Example** (Multi-key sorting)
1523
  *
@@ -1561,7 +1806,13 @@ export const sortBy = (...orders) => {
1561
  * Pairs elements from two iterables by position. If the iterables differ in
1562
  * length, the extra elements from the longer one are discarded.
1563
  *
1564
- * - Returns `NonEmptyArray` when both inputs are non-empty.
 
 
 
 
 
 
1565
  *
1566
  * **Example** (Zipping two arrays)
1567
  *
@@ -1582,6 +1833,11 @@ export const zip = /*#__PURE__*/dual(2, (self, that) => zipWith(self, that, Tupl
1582
  * Combines elements from two iterables pairwise using a function. If the
1583
  * iterables differ in length, extra elements are discarded.
1584
  *
 
 
 
 
 
1585
  * **Example** (Zipping with addition)
1586
  *
1587
  * ```ts
@@ -1640,8 +1896,14 @@ export const unzip = self => {
1640
  /**
1641
  * Places a separator element between every pair of elements.
1642
  *
1643
- * - Preserves `NonEmptyArray` in the return type.
1644
- * - An empty input produces an empty result.
 
 
 
 
 
 
1645
  *
1646
  * **Example** (Interspersing a separator)
1647
  *
@@ -1675,6 +1937,10 @@ export const intersperse = /*#__PURE__*/dual(2, (self, middle) => {
1675
  * Applies a function to the first element of a non-empty array, returning a
1676
  * new array.
1677
  *
 
 
 
 
1678
  * **Example** (Modifying the head)
1679
  *
1680
  * ```ts
@@ -1687,12 +1953,17 @@ export const intersperse = /*#__PURE__*/dual(2, (self, middle) => {
1687
  * @see {@link modifyLastNonEmpty} — modify the last element
1688
  *
1689
  * @category elements
1690
- * @since 2.0.0
1691
  */
1692
  export const modifyHeadNonEmpty = /*#__PURE__*/dual(2, (self, f) => [f(headNonEmpty(self)), ...tailNonEmpty(self)]);
1693
  /**
1694
  * Replaces the first element of a non-empty array with a new value.
1695
  *
 
 
 
 
 
1696
  * **Example** (Setting the head)
1697
  *
1698
  * ```ts
@@ -1705,13 +1976,18 @@ export const modifyHeadNonEmpty = /*#__PURE__*/dual(2, (self, f) => [f(headNonEm
1705
  * @see {@link setLastNonEmpty} — replace the last element
1706
  *
1707
  * @category elements
1708
- * @since 2.0.0
1709
  */
1710
  export const setHeadNonEmpty = /*#__PURE__*/dual(2, (self, b) => modifyHeadNonEmpty(self, () => b));
1711
  /**
1712
  * Applies a function to the last element of a non-empty array, returning a
1713
  * new array.
1714
  *
 
 
 
 
 
1715
  * **Example** (Modifying the last element)
1716
  *
1717
  * ```ts
@@ -1724,12 +2000,17 @@ export const setHeadNonEmpty = /*#__PURE__*/dual(2, (self, b) => modifyHeadNonEm
1724
  * @see {@link modifyHeadNonEmpty} — modify the first element
1725
  *
1726
  * @category elements
1727
- * @since 2.0.0
1728
  */
1729
  export const modifyLastNonEmpty = /*#__PURE__*/dual(2, (self, f) => append(initNonEmpty(self), f(lastNonEmpty(self))));
1730
  /**
1731
  * Replaces the last element of a non-empty array with a new value.
1732
  *
 
 
 
 
 
1733
  * **Example** (Setting the last element)
1734
  *
1735
  * ```ts
@@ -1742,15 +2023,23 @@ export const modifyLastNonEmpty = /*#__PURE__*/dual(2, (self, f) => append(initN
1742
  * @see {@link setHeadNonEmpty} — replace the first element
1743
  *
1744
  * @category elements
1745
- * @since 2.0.0
1746
  */
1747
  export const setLastNonEmpty = /*#__PURE__*/dual(2, (self, b) => modifyLastNonEmpty(self, () => b));
1748
  /**
1749
- * Rotates an array by `n` steps. Positive `n` rotates left (front elements
1750
- * move to the back).
 
 
1751
  *
1752
- * - Preserves `NonEmptyArray` in the return type.
1753
- * - Returns a copy for empty arrays or `n === 0`.
 
 
 
 
 
 
1754
  *
1755
  * **Example** (Rotating elements)
1756
  *
@@ -1760,6 +2049,9 @@ export const setLastNonEmpty = /*#__PURE__*/dual(2, (self, b) => modifyLastNonEm
1760
  * console.log(Array.rotate(["a", "b", "c", "d"], 2)) // ["c", "d", "a", "b"]
1761
  * ```
1762
  *
 
 
 
1763
  * @category elements
1764
  * @since 2.0.0
1765
  */
@@ -1783,6 +2075,11 @@ export const rotate = /*#__PURE__*/dual(2, (self, n) => {
1783
  /**
1784
  * Returns a membership-test function using a custom equivalence.
1785
  *
 
 
 
 
 
1786
  * **Example** (Custom equality check)
1787
  *
1788
  * ```ts
@@ -1792,7 +2089,7 @@ export const rotate = /*#__PURE__*/dual(2, (self, n) => {
1792
  * console.log(pipe([1, 2, 3, 4], containsNumber(3))) // true
1793
  * ```
1794
  *
1795
- * @see {@link contains} — uses default `Equal.equivalence()`
1796
  *
1797
  * @category elements
1798
  * @since 2.0.0
@@ -1806,9 +2103,14 @@ export const containsWith = isEquivalent => dual(2, (self, a) => {
1806
  return false;
1807
  });
1808
  /**
1809
- * Tests whether an array contains a value, using `Equal.equivalence()` for
1810
  * comparison.
1811
  *
 
 
 
 
 
1812
  * **Example** (Checking membership)
1813
  *
1814
  * ```ts
@@ -1824,13 +2126,18 @@ export const containsWith = isEquivalent => dual(2, (self, a) => {
1824
  */
1825
  export const contains = /*#__PURE__*/containsWith(/*#__PURE__*/Equal.asEquivalence());
1826
  /**
1827
- * Repeatedly applies a function that consumes a prefix of the array and
1828
- * produces a value plus the remaining elements, collecting the values.
 
 
1829
  *
1830
- * - The function receives a `NonEmptyReadonlyArray` and returns
1831
- * `[value, rest]`.
1832
- * - Continues until the remaining array is empty.
1833
- * - Useful for custom splitting/grouping logic.
 
 
 
1834
  *
1835
  * **Example** (Chopping an array)
1836
  *
@@ -1868,8 +2175,14 @@ export const chop = /*#__PURE__*/dual(2, (self, f) => {
1868
  /**
1869
  * Splits an iterable into two arrays at the given index.
1870
  *
1871
- * - `n` can be `0` (all elements in the second array).
1872
- * - `n` is floored to an integer.
 
 
 
 
 
 
1873
  *
1874
  * **Example** (Splitting at an index)
1875
  *
@@ -1900,6 +2213,11 @@ export const splitAt = /*#__PURE__*/dual(2, (self, n) => {
1900
  * Splits a non-empty array into two parts at the given index. The first part
1901
  * is guaranteed to be non-empty (`n` is clamped to >= 1).
1902
  *
 
 
 
 
 
1903
  * **Example** (Splitting a non-empty array)
1904
  *
1905
  * ```ts
@@ -1912,7 +2230,7 @@ export const splitAt = /*#__PURE__*/dual(2, (self, n) => {
1912
  * @see {@link splitAt} — for possibly-empty arrays
1913
  *
1914
  * @category splitting
1915
- * @since 2.0.0
1916
  */
1917
  export const splitAtNonEmpty = /*#__PURE__*/dual(2, (self, n) => {
1918
  const _n = Math.max(1, Math.floor(n));
@@ -1921,8 +2239,13 @@ export const splitAtNonEmpty = /*#__PURE__*/dual(2, (self, n) => {
1921
  /**
1922
  * Splits an iterable into `n` roughly equal-sized chunks.
1923
  *
1924
- * - Uses `chunksOf(ceil(length / n))` internally.
1925
- * - The last chunk may be shorter.
 
 
 
 
 
1926
  *
1927
  * **Example** (Splitting into groups)
1928
  *
@@ -1934,8 +2257,8 @@ export const splitAtNonEmpty = /*#__PURE__*/dual(2, (self, n) => {
1934
  *
1935
  * @see {@link chunksOf} — split into fixed-size chunks
1936
  *
1937
- * @since 2.0.0
1938
  * @category splitting
 
1939
  */
1940
  export const split = /*#__PURE__*/dual(2, (self, n) => {
1941
  const input = fromIterable(self);
@@ -1945,6 +2268,11 @@ export const split = /*#__PURE__*/dual(2, (self, n) => {
1945
  * Splits an iterable at the first element matching the predicate. The matching
1946
  * element is included in the second array.
1947
  *
 
 
 
 
 
1948
  * **Example** (Splitting at a condition)
1949
  *
1950
  * ```ts
@@ -1963,8 +2291,15 @@ export const splitWhere = /*#__PURE__*/dual(2, (self, predicate) => span(self, (
1963
  /**
1964
  * Creates a shallow copy of an array.
1965
  *
1966
- * - Preserves `NonEmptyArray` in the return type.
1967
- * - Useful when you need a distinct reference (e.g. before mutating).
 
 
 
 
 
 
 
1968
  *
1969
  * **Example** (Copying an array)
1970
  *
@@ -1987,7 +2322,13 @@ export const copy = self => self.slice();
1987
  * Pads or truncates an array to exactly `n` elements, filling with `fill`
1988
  * if the array is shorter, or slicing if longer.
1989
  *
1990
- * - Returns an empty array when `n <= 0`.
 
 
 
 
 
 
1991
  *
1992
  * **Example** (Padding an array)
1993
  *
@@ -2013,9 +2354,15 @@ export const pad = /*#__PURE__*/dual(3, (self, n, fill) => {
2013
  * Splits an iterable into chunks of length `n`. The last chunk may be shorter
2014
  * if `n` does not evenly divide the length.
2015
  *
2016
- * - `chunksOf(n)([])` is `[]`, not `[[]]`.
2017
- * - Each chunk is a `NonEmptyArray`.
2018
- * - Preserves `NonEmptyArray` in the outer return type.
 
 
 
 
 
 
2019
  *
2020
  * **Example** (Chunking an array)
2021
  *
@@ -2041,8 +2388,14 @@ export const chunksOf = /*#__PURE__*/dual(2, (self, n) => {
2041
  /**
2042
  * Creates overlapping sliding windows of size `n`.
2043
  *
2044
- * - Returns an empty array if `n <= 0` or the array has fewer than `n` elements.
2045
- * - Each window is a tuple of exactly `n` elements.
 
 
 
 
 
 
2046
  *
2047
  * **Example** (Sliding windows)
2048
  *
@@ -2070,8 +2423,15 @@ export const window = /*#__PURE__*/dual(2, (self, n) => {
2070
  /**
2071
  * Groups consecutive equal elements using a custom equivalence function.
2072
  *
2073
- * - Only groups **adjacent** elements — non-adjacent duplicates stay separate.
2074
- * - Requires a `NonEmptyReadonlyArray`.
 
 
 
 
 
 
 
2075
  *
2076
  * **Example** (Grouping consecutive equal elements)
2077
  *
@@ -2082,8 +2442,8 @@ export const window = /*#__PURE__*/dual(2, (self, n) => {
2082
  * // [["a", "a"], ["b", "b", "b"], ["c"], ["a"]]
2083
  * ```
2084
  *
2085
- * @see {@link group} — uses default equality
2086
- * @see {@link groupBy} — group by a key function into a record
2087
  *
2088
  * @category grouping
2089
  * @since 2.0.0
@@ -2105,7 +2465,14 @@ export const groupWith = /*#__PURE__*/dual(2, (self, isEquivalent) => chop(self,
2105
  /**
2106
  * Groups consecutive equal elements using `Equal.equivalence()`.
2107
  *
2108
- * - Only groups **adjacent** elements.
 
 
 
 
 
 
 
2109
  *
2110
  * **Example** (Grouping adjacent equal elements)
2111
  *
@@ -2126,9 +2493,14 @@ export const group = /*#__PURE__*/groupWith(/*#__PURE__*/Equal.asEquivalence());
2126
  * Groups elements into a record by a key-returning function. Each key maps
2127
  * to a `NonEmptyArray` of elements that produced that key.
2128
  *
2129
- * - Unlike {@link group}/{@link groupWith}, elements do not need to be
2130
- * adjacent to be grouped together.
2131
- * - Key function must return a `string` or `symbol`.
 
 
 
 
 
2132
  *
2133
  * **Example** (Grouping by a property)
2134
  *
@@ -2168,6 +2540,11 @@ export const groupBy = /*#__PURE__*/dual(2, (self, f) => {
2168
  * Computes the union of two arrays using a custom equivalence, removing
2169
  * duplicates.
2170
  *
 
 
 
 
 
2171
  * **Example** (Union with custom equality)
2172
  *
2173
  * ```ts
@@ -2176,9 +2553,9 @@ export const groupBy = /*#__PURE__*/dual(2, (self, f) => {
2176
  * console.log(Array.unionWith([1, 2], [2, 3], (a, b) => a === b)) // [1, 2, 3]
2177
  * ```
2178
  *
2179
- * @see {@link union} — uses default equality
2180
- * @see {@link intersection} — elements in both arrays
2181
- * @see {@link difference} — elements only in the first array
2182
  *
2183
  * @category elements
2184
  * @since 2.0.0
@@ -2219,6 +2596,11 @@ export const union = /*#__PURE__*/dual(2, (self, that) => unionWith(self, that,
2219
  * Computes the intersection of two arrays using a custom equivalence. Order is
2220
  * determined by the first array.
2221
  *
 
 
 
 
 
2222
  * **Example** (Intersection with custom equality)
2223
  *
2224
  * ```ts
@@ -2230,9 +2612,9 @@ export const union = /*#__PURE__*/dual(2, (self, that) => unionWith(self, that,
2230
  * console.log(Array.intersectionWith(isEquivalent)(array2)(array1)) // [{ id: 1 }, { id: 3 }]
2231
  * ```
2232
  *
2233
- * @see {@link intersection} — uses default equality
2234
- * @see {@link union} — elements in either array
2235
- * @see {@link difference} — elements only in the first array
2236
  *
2237
  * @category elements
2238
  * @since 2.0.0
@@ -2248,6 +2630,11 @@ export const intersectionWith = isEquivalent => {
2248
  * Computes the intersection of two arrays using `Equal.equivalence()`. Order is
2249
  * determined by the first array.
2250
  *
 
 
 
 
 
2251
  * **Example** (Array intersection)
2252
  *
2253
  * ```ts
@@ -2268,6 +2655,11 @@ export const intersection = /*#__PURE__*/intersectionWith(/*#__PURE__*/Equal.asE
2268
  * Computes elements in the first array that are not in the second, using a
2269
  * custom equivalence.
2270
  *
 
 
 
 
 
2271
  * **Example** (Difference with custom equality)
2272
  *
2273
  * ```ts
@@ -2277,9 +2669,9 @@ export const intersection = /*#__PURE__*/intersectionWith(/*#__PURE__*/Equal.asE
2277
  * console.log(diff) // [1]
2278
  * ```
2279
  *
2280
- * @see {@link difference} — uses default equality
2281
- * @see {@link union} — elements in either array
2282
- * @see {@link intersection} — elements in both arrays
2283
  *
2284
  * @category elements
2285
  * @since 2.0.0
@@ -2295,6 +2687,11 @@ export const differenceWith = isEquivalent => {
2295
  * Computes elements in the first array that are not in the second, using
2296
  * `Equal.equivalence()`.
2297
  *
 
 
 
 
 
2298
  * **Example** (Array difference)
2299
  *
2300
  * ```ts
@@ -2314,6 +2711,10 @@ export const difference = /*#__PURE__*/differenceWith(/*#__PURE__*/Equal.asEquiv
2314
  /**
2315
  * Creates an empty array.
2316
  *
 
 
 
 
2317
  * **Example** (Creating an empty array)
2318
  *
2319
  * ```ts
@@ -2351,8 +2752,14 @@ export const of = a => [a];
2351
  /**
2352
  * Transforms each element using a function, returning a new array.
2353
  *
2354
- * - The function receives `(element, index)`.
2355
- * - Preserves `NonEmptyArray` in the return type.
 
 
 
 
 
 
2356
  *
2357
  * **Example** (Doubling values)
2358
  *
@@ -2371,8 +2778,15 @@ export const map = /*#__PURE__*/dual(2, (self, f) => self.map(f));
2371
  /**
2372
  * Maps each element to an array and flattens the results into a single array.
2373
  *
2374
- * - The function receives `(element, index)`.
2375
- * - Returns `NonEmptyArray` when both input and mapped arrays are non-empty.
 
 
 
 
 
 
 
2376
  *
2377
  * **Example** (FlatMapping an array)
2378
  *
@@ -2404,6 +2818,11 @@ export const flatMap = /*#__PURE__*/dual(2, (self, f) => {
2404
  /**
2405
  * Flattens a nested array of arrays into a single array.
2406
  *
 
 
 
 
 
2407
  * **Example** (Flattening nested arrays)
2408
  *
2409
  * ```ts
@@ -2421,6 +2840,11 @@ export const flatten = /*#__PURE__*/flatMap(identity);
2421
  /**
2422
  * Extracts all `Some` values from an iterable of `Option`s, discarding `None`s.
2423
  *
 
 
 
 
 
2424
  * **Example** (Extracting Some values)
2425
  *
2426
  * ```ts
@@ -2448,6 +2872,11 @@ export const getSomes = self => {
2448
  * Extracts all failure values from an iterable of `Result`s, discarding
2449
  * successes.
2450
  *
 
 
 
 
 
2451
  * **Example** (Extracting failures)
2452
  *
2453
  * ```ts
@@ -2461,7 +2890,7 @@ export const getSomes = self => {
2461
  * @see {@link separate} — split into failures and successes
2462
  *
2463
  * @category filtering
2464
- * @since 2.0.0
2465
  */
2466
  export const getFailures = self => {
2467
  const out = [];
@@ -2476,6 +2905,11 @@ export const getFailures = self => {
2476
  * Extracts all success values from an iterable of `Result`s, discarding
2477
  * failures.
2478
  *
 
 
 
 
 
2479
  * **Example** (Extracting successes)
2480
  *
2481
  * ```ts
@@ -2489,7 +2923,7 @@ export const getFailures = self => {
2489
  * @see {@link separate} — split into failures and successes
2490
  *
2491
  * @category filtering
2492
- * @since 2.0.0
2493
  */
2494
  export const getSuccesses = self => {
2495
  const out = [];
@@ -2503,8 +2937,14 @@ export const getSuccesses = self => {
2503
  /**
2504
  * Keeps transformed values for elements where a `Filter` succeeds.
2505
  *
2506
- * - The filter receives `(element, index)`.
2507
- * - Failures are discarded.
 
 
 
 
 
 
2508
  *
2509
  * **Example** (Filter and transform)
2510
  *
@@ -2516,9 +2956,10 @@ export const getSuccesses = self => {
2516
  * ```
2517
  *
2518
  * @see {@link filter} — keep original elements matching a predicate
 
2519
  *
2520
  * @category filtering
2521
- * @since 4.0.0
2522
  */
2523
  export const filterMap = /*#__PURE__*/dual(2, (self, f) => {
2524
  const as = fromIterable(self);
@@ -2534,8 +2975,15 @@ export const filterMap = /*#__PURE__*/dual(2, (self, f) => {
2534
  /**
2535
  * Keeps only elements satisfying a predicate (or refinement).
2536
  *
2537
- * - The predicate receives `(element, index)`.
2538
- * - Supports refinements for type narrowing.
 
 
 
 
 
 
 
2539
  *
2540
  * **Example** (Filtering even numbers)
2541
  *
@@ -2546,6 +2994,7 @@ export const filterMap = /*#__PURE__*/dual(2, (self, f) => {
2546
  * ```
2547
  *
2548
  * @see {@link partition} — split into matching and non-matching
 
2549
  *
2550
  * @category filtering
2551
  * @since 2.0.0
@@ -2563,8 +3012,14 @@ export const filter = /*#__PURE__*/dual(2, (self, predicate) => {
2563
  /**
2564
  * Splits an iterable using a `Filter` into failures and successes.
2565
  *
2566
- * - Returns `[excluded, satisfying]`.
2567
- * - The filter receives `(element, index)`.
 
 
 
 
 
 
2568
  *
2569
  * **Example** (Partitioning with a filter)
2570
  *
@@ -2578,7 +3033,8 @@ export const filter = /*#__PURE__*/dual(2, (self, predicate) => {
2578
  * ```
2579
  *
2580
  * @see {@link filter} — keep only matching elements
2581
- * @see {@link partitionMap} — partition using a Result-returning function
 
2582
  *
2583
  * @category filtering
2584
  * @since 2.0.0
@@ -2598,9 +3054,16 @@ export const partition = /*#__PURE__*/dual(2, (self, f) => {
2598
  return [excluded, satisfying];
2599
  });
2600
  /**
2601
- * Separates an iterable of `Result`s into two arrays: failures and successes.
2602
  *
2603
- * - Equivalent to `partitionMap(identity)`.
 
 
 
 
 
 
 
2604
  *
2605
  * **Example** (Separating Results)
2606
  *
@@ -2616,6 +3079,7 @@ export const partition = /*#__PURE__*/dual(2, (self, f) => {
2616
  *
2617
  * @see {@link getFailures} — extract only failures
2618
  * @see {@link getSuccesses} — extract only successes
 
2619
  *
2620
  * @category filtering
2621
  * @since 2.0.0
@@ -2624,7 +3088,13 @@ export const separate = /*#__PURE__*/partition(identity);
2624
  /**
2625
  * Folds an iterable from left to right into a single value.
2626
  *
2627
- * - The function receives `(accumulator, element, index)`.
 
 
 
 
 
 
2628
  *
2629
  * **Example** (Summing an array)
2630
  *
@@ -2644,7 +3114,13 @@ export const reduce = /*#__PURE__*/dual(3, (self, b, f) => fromIterable(self).re
2644
  /**
2645
  * Folds an iterable from right to left into a single value.
2646
  *
2647
- * - The function receives `(accumulator, element, index)`.
 
 
 
 
 
 
2648
  *
2649
  * **Example** (Right-to-left fold)
2650
  *
@@ -2686,6 +3162,11 @@ export const liftPredicate = predicate => b => predicate(b) ? [b] : [];
2686
  * Lifts an `Option`-returning function into one that returns an array:
2687
  * `Some(a)` becomes `[a]`, `None` becomes `[]`.
2688
  *
 
 
 
 
 
2689
  * **Example** (Lifting an Option function)
2690
  *
2691
  * ```ts
@@ -2710,6 +3191,10 @@ export const liftOption = f => (...a) => fromOption(f(...a));
2710
  * Converts a nullable value to an array: `null`/`undefined` becomes `[]`,
2711
  * anything else becomes `[value]`.
2712
  *
 
 
 
 
2713
  * **Example** (Nullable to array)
2714
  *
2715
  * ```ts
@@ -2723,8 +3208,8 @@ export const liftOption = f => (...a) => fromOption(f(...a));
2723
  * @see {@link liftNullishOr} — lift a nullable-returning function
2724
  * @see {@link fromOption} — convert from Option
2725
  *
2726
- * @category conversions
2727
- * @since 2.0.0
2728
  */
2729
  export const fromNullishOr = a => a == null ? empty() : [a];
2730
  /**
@@ -2748,13 +3233,18 @@ export const fromNullishOr = a => a == null ? empty() : [a];
2748
  * @see {@link liftOption} — lift an Option-returning function
2749
  *
2750
  * @category lifting
2751
- * @since 2.0.0
2752
  */
2753
  export const liftNullishOr = f => (...a) => fromNullishOr(f(...a));
2754
  /**
2755
  * Maps each element with a nullable-returning function, keeping only non-null /
2756
  * non-undefined results.
2757
  *
 
 
 
 
 
2758
  * **Example** (FlatMapping with nullable)
2759
  *
2760
  * ```ts
@@ -2764,14 +3254,22 @@ export const liftNullishOr = f => (...a) => fromNullishOr(f(...a));
2764
  * // [1, 3]
2765
  * ```
2766
  *
 
 
 
2767
  * @category sequencing
2768
- * @since 2.0.0
2769
  */
2770
  export const flatMapNullishOr = /*#__PURE__*/dual(2, (self, f) => flatMap(self, a => fromNullishOr(f(a))));
2771
  /**
2772
  * Lifts a `Result`-returning function into one that returns an array: failures
2773
  * produce `[]`, successes produce `[value]`.
2774
  *
 
 
 
 
 
2775
  * **Example** (Lifting a Result function)
2776
  *
2777
  * ```ts
@@ -2791,16 +3289,21 @@ export const flatMapNullishOr = /*#__PURE__*/dual(2, (self, f) => flatMap(self,
2791
  * @see {@link liftPredicate} — lift a boolean predicate
2792
  *
2793
  * @category lifting
2794
- * @since 2.0.0
2795
  */
2796
  export const liftResult = f => (...a) => {
2797
  const e = f(...a);
2798
  return Result.isFailure(e) ? [] : [e.success];
2799
  };
2800
  /**
2801
- * Tests whether all elements satisfy the predicate. Supports refinements for
2802
  * type narrowing.
2803
  *
 
 
 
 
 
2804
  * **Example** (Testing all elements)
2805
  *
2806
  * ```ts
@@ -2817,7 +3320,7 @@ export const liftResult = f => (...a) => {
2817
  */
2818
  export const every = /*#__PURE__*/dual(2, (self, refinement) => self.every(refinement));
2819
  /**
2820
- * Tests whether at least one element satisfies the predicate. Narrows the type
2821
  * to `NonEmptyReadonlyArray` on success.
2822
  *
2823
  * **Example** (Testing for any match)
@@ -2840,7 +3343,14 @@ export const some = /*#__PURE__*/dual(2, (self, predicate) => self.some(predicat
2840
  * Applies a function to each suffix of the array (starting from each index),
2841
  * collecting the results.
2842
  *
2843
- * - For index `i`, the function receives `self.slice(i)`.
 
 
 
 
 
 
 
2844
  *
2845
  * **Example** (Suffix lengths)
2846
  *
@@ -2850,6 +3360,8 @@ export const some = /*#__PURE__*/dual(2, (self, predicate) => self.some(predicat
2850
  * console.log(Array.extend([1, 2, 3], (as) => as.length)) // [3, 2, 1]
2851
  * ```
2852
  *
 
 
2853
  * @category mapping
2854
  * @since 2.0.0
2855
  */
@@ -2943,7 +3455,7 @@ export const unfold = (b, f) => {
2943
  * @see {@link makeEquivalence} — create an equivalence for arrays
2944
  *
2945
  * @category instances
2946
- * @since 2.0.0
2947
  */
2948
  export const makeOrder = Order.Array;
2949
  /**
@@ -2963,12 +3475,17 @@ export const makeOrder = Order.Array;
2963
  * @see {@link makeOrder} — create an ordering for arrays
2964
  *
2965
  * @category instances
2966
- * @since 2.0.0
2967
  */
2968
  export const makeEquivalence = Equivalence.Array;
2969
  /**
2970
  * Runs a side-effect for each element. The callback receives `(element, index)`.
2971
  *
 
 
 
 
 
2972
  * **Example** (Iterating with side-effects)
2973
  *
2974
  * ```ts
@@ -2977,6 +3494,8 @@ export const makeEquivalence = Equivalence.Array;
2977
  * Array.forEach([1, 2, 3], (n) => console.log(n)) // 1, 2, 3
2978
  * ```
2979
  *
 
 
2980
  * @category elements
2981
  * @since 2.0.0
2982
  */
@@ -2985,6 +3504,11 @@ export const forEach = /*#__PURE__*/dual(2, (self, f) => fromIterable(self).forE
2985
  * Removes duplicates using a custom equivalence, preserving the order of the
2986
  * first occurrence.
2987
  *
 
 
 
 
 
2988
  * **Example** (Deduplicating with custom equality)
2989
  *
2990
  * ```ts
@@ -3017,6 +3541,11 @@ export const dedupeWith = /*#__PURE__*/dual(2, (self, isEquivalent) => {
3017
  * Removes duplicates using `Equal.equivalence()`, preserving the order of the
3018
  * first occurrence.
3019
  *
 
 
 
 
 
3020
  * **Example** (Removing duplicates)
3021
  *
3022
  * ```ts
@@ -3035,7 +3564,15 @@ export const dedupe = self => dedupeWith(self, Equal.asEquivalence());
3035
  /**
3036
  * Removes consecutive duplicate elements using a custom equivalence.
3037
  *
3038
- * - Non-adjacent duplicates are preserved.
 
 
 
 
 
 
 
 
3039
  *
3040
  * **Example** (Deduplicating adjacent elements)
3041
  *
@@ -3066,6 +3603,11 @@ export const dedupeAdjacentWith = /*#__PURE__*/dual(2, (self, isEquivalent) => {
3066
  /**
3067
  * Removes consecutive duplicate elements using `Equal.equivalence()`.
3068
  *
 
 
 
 
 
3069
  * **Example** (Removing adjacent duplicates)
3070
  *
3071
  * ```ts
@@ -3094,17 +3636,24 @@ export const dedupeAdjacent = /*#__PURE__*/dedupeAdjacentWith(/*#__PURE__*/Equal
3094
  *
3095
  * @see {@link intersperse} — insert separator elements without joining
3096
  *
3097
- * @since 2.0.0
3098
  * @category folding
 
3099
  */
3100
  export const join = /*#__PURE__*/dual(2, (self, sep) => fromIterable(self).join(sep));
3101
  /**
3102
  * Maps over an array while threading an accumulator through each step, returning both the final state and the mapped array.
3103
  *
3104
- * - Combines `map` and `reduce` in a single pass.
3105
- * - The callback receives the current state, element, and index, and returns `[nextState, mappedValue]`.
3106
- * - Returns `[finalState, mappedArray]`.
3107
- * - Dual: can be used in both data-first and data-last style.
 
 
 
 
 
 
 
3108
  *
3109
  * **Example** (Running sum alongside mapped values)
3110
  *
@@ -3118,8 +3667,8 @@ export const join = /*#__PURE__*/dual(2, (self, sep) => fromIterable(self).join(
3118
  * @see {@link scan} — when you only need the accumulated results (not the final state)
3119
  * @see {@link reduce} — when you only need the final accumulated value
3120
  *
3121
- * @since 2.0.0
3122
  * @category folding
 
3123
  */
3124
  export const mapAccum = /*#__PURE__*/dual(3, (self, s, f) => {
3125
  let i = 0;
@@ -3136,9 +3685,16 @@ export const mapAccum = /*#__PURE__*/dual(3, (self, s, f) => {
3136
  /**
3137
  * Computes the cartesian product of two arrays, applying a combiner to each pair.
3138
  *
3139
- * - Produces every combination of an element from `self` with an element from `that`.
3140
- * - Result length is `self.length * that.length`.
3141
- * - Order: iterates `that` for each element of `self`.
 
 
 
 
 
 
 
3142
  *
3143
  * **Example** (Combining numbers and letters)
3144
  *
@@ -3149,17 +3705,23 @@ export const mapAccum = /*#__PURE__*/dual(3, (self, s, f) => {
3149
  * console.log(result) // ["1-a", "1-b", "2-a", "2-b"]
3150
  * ```
3151
  *
3152
- * @see {@link cartesian} — returns tuples instead of applying a combiner
3153
  *
3154
- * @since 2.0.0
3155
  * @category elements
 
3156
  */
3157
  export const cartesianWith = /*#__PURE__*/dual(3, (self, that, f) => flatMap(self, a => map(that, b => f(a, b))));
3158
  /**
3159
  * Computes the cartesian product of two arrays, returning all pairs as tuples.
3160
  *
3161
- * - Produces every `[a, b]` combination of an element from `self` with an element from `that`.
3162
- * - Result length is `self.length * that.length`.
 
 
 
 
 
 
3163
  *
3164
  * **Example** (All pairs of two arrays)
3165
  *
@@ -3172,19 +3734,26 @@ export const cartesianWith = /*#__PURE__*/dual(3, (self, that, f) => flatMap(sel
3172
  *
3173
  * @see {@link cartesianWith} — apply a combiner to each pair
3174
  *
3175
- * @since 2.0.0
3176
  * @category elements
 
3177
  */
3178
  export const cartesian = /*#__PURE__*/dual(2, (self, that) => cartesianWith(self, that, (a, b) => [a, b]));
3179
  // -------------------------------------------------------------------------------------
3180
  // do notation
3181
  // -------------------------------------------------------------------------------------
3182
  /**
3183
- * Starting point for the "do simulation" — an array comprehension pattern.
3184
  *
3185
- * - Begin a pipeline with `Do`, then use {@link bind} to introduce array variables and {@link let_ let} for plain values.
3186
- * - Each `bind` produces the cartesian product of all bound variables (like nested loops).
3187
- * - Use `filter` and `map` in the pipeline to add conditions and transformations.
 
 
 
 
 
 
 
3188
  *
3189
  * **Example** (Array comprehension with do notation)
3190
  *
@@ -3210,11 +3779,18 @@ export const cartesian = /*#__PURE__*/dual(2, (self, that) => cartesianWith(self
3210
  */
3211
  export const Do = /*#__PURE__*/of({});
3212
  /**
3213
- * Introduces a new array variable into a do-notation scope, producing the cartesian product with all previous bindings.
 
 
 
 
 
 
 
3214
  *
3215
- * - Each `bind` call adds a named property to the accumulated object.
3216
- * - The callback receives the current scope and must return an array.
3217
- * - Equivalent to `flatMap` + merging the new value into the scope object.
3218
  *
3219
  * **Example** (Binding two arrays)
3220
  *
@@ -3239,10 +3815,17 @@ export const Do = /*#__PURE__*/of({});
3239
  */
3240
  export const bind = /*#__PURE__*/internalDoNotation.bind(map, flatMap);
3241
  /**
3242
- * Names the elements of an array by wrapping each in an object with the given key, starting a do-notation scope.
3243
  *
3244
- * - Equivalent to `Array.map(self, (a) => ({ [tag]: a }))`.
3245
- * - Alternative to starting with `Do` + `bind`; useful when you already have an array.
 
 
 
 
 
 
 
3246
  *
3247
  * **Example** (Naming an existing array)
3248
  *
@@ -3268,8 +3851,16 @@ export {
3268
  /**
3269
  * Adds a computed plain value to the do-notation scope without introducing a new array dimension.
3270
  *
3271
- * - Unlike {@link bind}, the callback returns a single value (not an array), so no cartesian product occurs.
3272
- * - Useful for derived or intermediate values that depend on previously bound variables.
 
 
 
 
 
 
 
 
3273
  *
3274
  * **Example** (Adding a computed value)
3275
  *
@@ -3298,6 +3889,7 @@ const reducer = /*#__PURE__*/Reducer.make((a, b) => a.concat(b), []);
3298
  *
3299
  * @see {@link makeReducerConcat} — mutable `Array` variant
3300
  *
 
3301
  * @since 4.0.0
3302
  */
3303
  export function getReadonlyReducerConcat() {
@@ -3308,16 +3900,24 @@ export function getReadonlyReducerConcat() {
3308
  *
3309
  * @see {@link getReadonlyReducerConcat} — readonly variant
3310
  *
 
3311
  * @since 4.0.0
3312
  */
3313
  export function makeReducerConcat() {
3314
  return reducer;
3315
  }
3316
  /**
3317
- * Counts the elements in an iterable that satisfy a predicate.
 
 
 
 
 
 
 
3318
  *
3319
- * - The predicate receives both the element and its index.
3320
- * - Returns `0` for an empty iterable.
3321
  *
3322
  * **Example** (Counting even numbers)
3323
  *
 
1
  /**
2
+ * Works with JavaScript arrays, readonly arrays, and non-empty arrays.
3
+ *
4
+ * The helpers cover common collection work such as creating arrays, reading
5
+ * elements, transforming values, sorting, grouping, splitting, combining, and
6
+ * reducing many values to one result. Helpers that change contents return new
7
+ * arrays and preserve non-empty array types when the result is guaranteed to
8
+ * contain values.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  *
10
  * @since 2.0.0
11
  */
 
22
  import * as Result from "./Result.js";
23
  import * as Tuple from "./Tuple.js";
24
  /**
25
+ * Exposes the global array constructor.
26
+ *
27
+ * **When to use**
28
  *
29
+ * Use to access native JavaScript array constructor methods such as `isArray`
30
+ * or `from` from the Effect module namespace.
31
  *
32
  * **Example** (Using the Array constructor)
33
  *
 
45
  /**
46
  * Creates a `NonEmptyArray` from one or more elements.
47
  *
48
+ * **When to use**
49
+ *
50
+ * Use when you need to create a typed non-empty array from literal values.
51
+ *
52
+ * **Details**
53
+ *
54
+ * The element type is inferred as the union of all arguments. Because at least
55
+ * one argument is required, this always returns a `NonEmptyArray`.
56
  *
57
  * **Example** (Creating an array from values)
58
  *
 
73
  /**
74
  * Creates a new `Array` of the specified length with all slots uninitialized.
75
  *
76
+ * **When to use**
77
+ *
78
+ * Use when you need a pre-sized array that will be filled imperatively.
79
+ *
80
+ * **Details**
81
+ *
82
+ * Elements are typed as `A | undefined` because the slots are empty.
83
  *
84
  * **Example** (Allocating a fixed-size array)
85
  *
 
99
  /**
100
  * Creates a `NonEmptyArray` of length `n` where element `i` is computed by `f(i)`.
101
  *
102
+ * **When to use**
103
+ *
104
+ * Use when you need to compute each array element from its index.
105
+ *
106
+ * **Details**
107
+ *
108
+ * `n` is normalized to an integer greater than or equal to 1, so this function
109
+ * always returns at least one element. Supports both data-first and data-last
110
+ * usage.
111
  *
112
  * **Example** (Generating values from indices)
113
  *
 
136
  * Creates a `NonEmptyArray` containing a range of integers, inclusive on both
137
  * ends.
138
  *
139
+ * **When to use**
140
+ *
141
+ * Use when you need a non-empty sequence of consecutive integers.
142
+ *
143
+ * **Details**
144
+ *
145
+ * If `start > end`, returns `[start]`.
146
  *
147
  * **Example** (Creating a range)
148
  *
 
162
  /**
163
  * Creates a `NonEmptyArray` containing a value repeated `n` times.
164
  *
165
+ * **When to use**
166
+ *
167
+ * Use when you need a non-empty array containing repeated copies of one value.
168
+ *
169
+ * **Details**
170
+ *
171
+ * `n` is normalized to an integer greater than or equal to 1, so this function
172
+ * always returns at least one element. Supports both data-first and data-last
173
+ * usage.
174
  *
175
  * **Example** (Repeating a value)
176
  *
 
190
  /**
191
  * Converts an `Iterable` to an `Array`.
192
  *
193
+ * **When to use**
194
+ *
195
+ * Use to convert any `Iterable` (Set, Generator, etc.) into an array.
196
+ *
197
+ * **Details**
198
+ *
199
+ * If the input is already an array, this returns it by reference without
200
+ * copying. Otherwise, it creates a new array from the iterable. Use `copy` if
201
+ * you need a fresh array even when the input is already an array.
202
  *
203
  * **Example** (Converting a Set to an array)
204
  *
 
219
  /**
220
  * Normalizes a value that is either a single element or an array into an array.
221
  *
222
+ * **When to use**
223
+ *
224
+ * Use to normalize input that may be a single value or an array into a consistent
225
+ * array.
226
+ *
227
+ * **Details**
228
+ *
229
+ * If the input is already an array, this returns it by reference. If the input
230
+ * is a single value, this wraps it in a one-element array. This is useful for
231
+ * APIs that accept `A | Array<A>`.
232
  *
233
  * **Example** (Normalizing input)
234
  *
 
249
  /**
250
  * Converts a record into an array of `[key, value]` tuples.
251
  *
252
+ * **When to use**
253
+ *
254
+ * Use to convert a record into an array of key-value tuples for iteration or
255
+ * transformation.
256
+ *
257
+ * **Details**
258
+ *
259
+ * Key order follows `Object.entries` semantics. Empty records produce an empty
260
+ * array.
261
  *
262
  * **Example** (Record to entries)
263
  *
 
268
  * console.log(result) // [["a", 1], ["b", 2], ["c", 3]]
269
  * ```
270
  *
271
+ * @see {@link Record.toEntries} the equivalent function from the Record module
272
+ * @see {@link Record.fromEntries} to build a record from an array of tuples
273
+ *
274
+ * @category converting
275
  * @since 2.0.0
276
  */
277
  export const fromRecord = Record.toEntries;
278
  /**
279
  * Converts an `Option` to an array: `Some(a)` becomes `[a]`, `None` becomes `[]`.
280
  *
281
+ * **When to use**
282
+ *
283
+ * Use to convert a single `Option` into an array for downstream array operations.
284
+ *
285
  * **Example** (Option to array)
286
  *
287
  * ```ts
 
293
  *
294
  * @see {@link getSomes} — extract `Some` values from an array of Options
295
  *
296
+ * @category converting
297
  * @since 2.0.0
298
  */
299
  export const fromOption = Option.toArray;
300
  /**
301
  * Pattern-matches on an array, handling empty and non-empty cases separately.
302
  *
303
+ * **When to use**
304
+ *
305
+ * Use when you need to branch on whether an array is empty.
306
+ *
307
+ * **Details**
308
+ *
309
+ * `onNonEmpty` receives a `NonEmptyReadonlyArray`. Supports both data-first and
310
+ * data-last usage.
311
  *
312
  * **Example** (Branching on emptiness)
313
  *
 
336
  * Pattern-matches on an array from the left, providing the first element and
337
  * the remaining elements separately.
338
  *
339
+ * **When to use**
340
+ *
341
+ * Use when you need to branch on an array and handle the non-empty case as the
342
+ * first element plus the remaining elements.
343
+ *
344
+ * **Details**
345
+ *
346
+ * `onNonEmpty` receives `(head, tail)` where `tail` is the rest of the array.
347
  *
348
  * **Example** (Head and tail destructuring)
349
  *
 
372
  * Pattern-matches on an array from the right, providing all elements except the
373
  * last and the last element separately.
374
  *
375
+ * **When to use**
376
+ *
377
+ * Use when you need to branch on an array and handle the non-empty case as the
378
+ * elements before the last plus the last element.
379
+ *
380
+ * **Details**
381
+ *
382
+ * `onNonEmpty` receives `(init, last)` where `init` is everything but the last element.
383
  *
384
  * **Example** (Init and last destructuring)
385
  *
 
407
  /**
408
  * Adds a single element to the front of an iterable, returning a `NonEmptyArray`.
409
  *
410
+ * **When to use**
411
+ *
412
+ * Use when you need to guarantee a non-empty result after adding a required
413
+ * leading value.
414
  *
415
  * **Example** (Prepending an element)
416
  *
 
424
  * @see {@link append} — add to the end
425
  * @see {@link prependAll} — prepend multiple elements
426
  *
427
+ * @category combining
428
  * @since 2.0.0
429
  */
430
  export const prepend = /*#__PURE__*/dual(2, (self, head) => [head, ...self]);
431
  /**
432
  * Prepends all elements from a prefix iterable to the front of an array.
433
  *
434
+ * **When to use**
435
+ *
436
+ * Use to prepend multiple elements from an iterable to the front of an array.
437
+ *
438
+ * **Details**
439
+ *
440
+ * If either input is non-empty, the result is a `NonEmptyArray`.
441
  *
442
  * **Example** (Prepending multiple elements)
443
  *
 
451
  * @see {@link prepend} — add a single element to the front
452
  * @see {@link appendAll} — add elements to the end
453
  *
454
+ * @category combining
455
  * @since 2.0.0
456
  */
457
  export const prependAll = /*#__PURE__*/dual(2, (self, that) => fromIterable(that).concat(fromIterable(self)));
458
  /**
459
  * Adds a single element to the end of an iterable, returning a `NonEmptyArray`.
460
  *
461
+ * **When to use**
462
+ *
463
+ * Use when you need to guarantee a non-empty result after adding a required
464
+ * trailing value.
465
  *
466
  * **Example** (Appending an element)
467
  *
 
475
  * @see {@link prepend} — add to the front
476
  * @see {@link appendAll} — append multiple elements
477
  *
478
+ * @category combining
479
  * @since 2.0.0
480
  */
481
  export const append = /*#__PURE__*/dual(2, (self, last) => [...self, last]);
482
  /**
483
  * Concatenates two iterables into a single array.
484
  *
485
+ * **When to use**
486
+ *
487
+ * Use to combine two iterable inputs into a new array with the second input's
488
+ * elements after the first.
489
+ *
490
+ * **Details**
491
+ *
492
+ * If either input is non-empty, the result is a `NonEmptyArray`.
493
  *
494
  * **Example** (Concatenating arrays)
495
  *
 
503
  * @see {@link append} — add a single element to the end
504
  * @see {@link prependAll} — add elements to the front
505
  *
506
+ * @category combining
507
  * @since 2.0.0
508
  */
509
  export const appendAll = /*#__PURE__*/dual(2, (self, that) => fromIterable(self).concat(fromIterable(that)));
510
  /**
511
+ * Folds left-to-right while keeping every intermediate accumulator value.
512
+ *
513
+ * **When to use**
514
+ *
515
+ * Use to compute a running accumulator where each intermediate value is needed.
516
  *
517
+ * **Details**
518
+ *
519
+ * The output length is `input.length + 1` because it starts with the initial
520
+ * value. The result is always a `NonEmptyArray`. Use `reduce` if you only need
521
+ * the final accumulated value.
522
  *
523
  * **Example** (Running totals)
524
  *
 
545
  return out;
546
  });
547
  /**
548
+ * Folds right-to-left while keeping every intermediate accumulator value.
549
+ *
550
+ * **When to use**
551
+ *
552
+ * Use to compute a running accumulator from right to left where each intermediate
553
+ * value is needed.
554
  *
555
+ * **Details**
556
+ *
557
+ * The output length is `input.length + 1` because it ends with the initial
558
+ * value. The result is always a `NonEmptyArray`.
559
  *
560
  * **Example** (Reverse running totals)
561
  *
 
582
  return out;
583
  });
584
  /**
585
+ * Checks whether a value is an `Array`.
586
+ *
587
+ * **When to use**
588
+ *
589
+ * Use to verify a value is a mutable array, narrowing its type to `Array<unknown>`.
590
  *
591
+ * **Details**
592
+ *
593
+ * Acts as a type guard narrowing the input to `Array<unknown>` and delegates to
594
+ * `globalThis.Array.isArray`.
595
  *
596
  * **Example** (Type-guarding an unknown value)
597
  *
 
610
  */
611
  export const isArray = Array.isArray;
612
  /**
613
+ * Checks whether a mutable `Array` is empty, narrowing the type to `[]`.
614
  *
615
  * **Example** (Checking for an empty array)
616
  *
 
625
  * @see {@link isArrayNonEmpty} — opposite check
626
  *
627
  * @category guards
628
+ * @since 4.0.0
629
  */
630
  export const isArrayEmpty = self => self.length === 0;
631
  /**
632
+ * Checks whether a `ReadonlyArray` is empty, narrowing the type to `readonly []`.
633
  *
634
  * **Example** (Checking for an empty readonly array)
635
  *
 
644
  * @see {@link isReadonlyArrayNonEmpty} — opposite check
645
  *
646
  * @category guards
647
+ * @since 4.0.0
648
  */
649
  export const isReadonlyArrayEmpty = isArrayEmpty;
650
  /**
651
+ * Checks whether a mutable `Array` is non-empty, narrowing the type to
652
  * `NonEmptyArray`.
653
  *
654
+ * **When to use**
655
+ *
656
+ * Use when you need the narrowed value to remain a mutable `Array` after proving
657
+ * it has at least one element.
658
+ *
659
  * **Example** (Checking for a non-empty array)
660
  *
661
  * ```ts
 
669
  * @see {@link isArrayEmpty} — opposite check
670
  *
671
  * @category guards
672
+ * @since 4.0.0
673
  */
674
  export const isArrayNonEmpty = internalArray.isArrayNonEmpty;
675
  /**
676
+ * Checks whether a `ReadonlyArray` is non-empty, narrowing the type to
677
  * `NonEmptyReadonlyArray`.
678
  *
679
+ * **When to use**
680
+ *
681
+ * Use when you need to prove a readonly array has at least one element without
682
+ * requiring mutable array methods afterward.
683
+ *
684
  * **Example** (Checking for a non-empty readonly array)
685
  *
686
  * ```ts
 
694
  * @see {@link isReadonlyArrayEmpty} — opposite check
695
  *
696
  * @category guards
697
+ * @since 4.0.0
698
  */
699
  export const isReadonlyArrayNonEmpty = internalArray.isArrayNonEmpty;
700
  /**
701
  * Returns the number of elements in a `ReadonlyArray`.
702
  *
703
+ * **When to use**
704
+ *
705
+ * Use when you need length as a composable function rather than a property access.
706
+ *
707
  * **Example** (Getting the length)
708
  *
709
  * ```ts
 
722
  }
723
  const clamp = (i, as) => Math.floor(Math.min(Math.max(0, i), as.length));
724
  /**
725
+ * Reads an element at the given index safely, returning `Option.some` or
726
  * `Option.none` if the index is out of bounds.
727
  *
728
+ * **When to use**
729
+ *
730
+ * Use when you need to read an array element by index and handle an
731
+ * out-of-bounds index as `Option.none`.
732
+ *
733
+ * **Details**
734
+ *
735
+ * The index is floored to an integer. This never throws.
736
  *
737
  * **Example** (Safe index access)
738
  *
 
743
  * console.log(Array.get([1, 2, 3], 10)) // None
744
  * ```
745
  *
746
+ * @see {@link getUnsafe} for indexed access that throws when the index is out of bounds
747
+ * @see {@link head} for reading the first element as an `Option`
748
+ * @see {@link last} for reading the last element as an `Option`
749
  *
750
  * @category getters
751
  * @since 2.0.0
 
757
  /**
758
  * Reads an element at the given index, throwing if the index is out of bounds.
759
  *
760
+ * **When to use**
761
+ *
762
+ * Use to read an array element at a known valid index when out-of-bounds would
763
+ * be a programming error.
764
+ *
765
+ * **Details**
766
+ *
767
+ * Throws an `Error` with the message `"Index out of bounds: <i>"`. Prefer
768
+ * `get` for safe access.
769
  *
770
  * **Example** (Unsafe index access)
771
  *
 
778
  *
779
  * @see {@link get} — safe version returning `Option`
780
  *
 
781
  * @category unsafe
782
+ * @since 4.0.0
783
  */
784
  export const getUnsafe = /*#__PURE__*/dual(2, (self, index) => {
785
  const i = Math.floor(index);
 
791
  /**
792
  * Splits a non-empty array into its first element and the remaining elements.
793
  *
794
+ * **When to use**
795
+ *
796
+ * Use when you have a `NonEmptyReadonlyArray` and need both its first element
797
+ * and the remaining elements as separate values.
798
+ *
799
+ * **Details**
800
+ *
801
+ * Returns a tuple `[head, tail]` and requires a `NonEmptyReadonlyArray`.
802
  *
803
  * **Example** (Destructuring head and tail)
804
  *
 
809
  * console.log(result) // [1, [2, 3, 4]]
810
  * ```
811
  *
812
+ * @see {@link unappend} for splitting a non-empty array into init and last
813
+ * @see {@link headNonEmpty} for getting only the first element
814
+ * @see {@link tailNonEmpty} for getting only the elements after the first
815
  *
816
  * @category splitting
817
  * @since 2.0.0
 
821
  * Splits a non-empty array into all elements except the last, and the last
822
  * element.
823
  *
824
+ * **When to use**
825
+ *
826
+ * Use when you need to split a non-empty array into the elements before the
827
+ * last element and the last element.
828
+ *
829
+ * **Details**
830
+ *
831
+ * Returns a tuple `[init, last]` and requires a `NonEmptyReadonlyArray`.
832
  *
833
  * **Example** (Destructuring init and last)
834
  *
 
839
  * console.log(result) // [[1, 2, 3], 4]
840
  * ```
841
  *
842
+ * @see {@link unprepend} for splitting a non-empty array into head and tail
843
+ * @see {@link initNonEmpty} for getting only the elements before the last
844
+ * @see {@link lastNonEmpty} for getting only the last element
845
  *
846
  * @category splitting
847
  * @since 2.0.0
848
  */
849
  export const unappend = self => [initNonEmpty(self), lastNonEmpty(self)];
850
  /**
851
+ * Returns the first element of an array safely wrapped in `Option.some`, or
852
  * `Option.none` if the array is empty.
853
  *
854
+ * **When to use**
855
+ *
856
+ * Use to safely get the first element of an array that may be empty.
857
+ *
858
  * **Example** (Getting the first element)
859
  *
860
  * ```ts
 
875
  * Returns the first element of a `NonEmptyReadonlyArray` directly (no `Option`
876
  * wrapper).
877
  *
878
+ * **When to use**
879
+ *
880
+ * Use to get the first element without `Option` wrapping when the array is known
881
+ * to be non-empty.
882
+ *
883
  * **Example** (Getting the head of a non-empty array)
884
  *
885
  * ```ts
 
895
  */
896
  export const headNonEmpty = /*#__PURE__*/getUnsafe(0);
897
  /**
898
+ * Returns the last element of an array safely wrapped in `Option.some`, or
899
  * `Option.none` if the array is empty.
900
  *
901
+ * **When to use**
902
+ *
903
+ * Use to safely get the last element of an array that may be empty.
904
+ *
905
  * **Example** (Getting the last element)
906
  *
907
  * ```ts
 
922
  * Returns the last element of a `NonEmptyReadonlyArray` directly (no `Option`
923
  * wrapper).
924
  *
925
+ * **When to use**
926
+ *
927
+ * Use to get the last element without `Option` wrapping when the array is known
928
+ * to be non-empty.
929
+ *
930
  * **Example** (Getting the last of a non-empty array)
931
  *
932
  * ```ts
 
942
  */
943
  export const lastNonEmpty = self => self[self.length - 1];
944
  /**
945
+ * Returns all elements except the first safely, wrapped in an `Option`.
946
+ *
947
+ * **When to use**
948
+ *
949
+ * Use to safely get all elements after the first when the iterable may be empty.
950
  *
951
+ * **Details**
952
+ *
953
+ * Allocates a new array via `slice(1)`. Empty inputs return `Option.none()`.
954
  *
955
  * **Example** (Getting the tail)
956
  *
 
974
  /**
975
  * Returns all elements except the first of a `NonEmptyReadonlyArray`.
976
  *
977
+ * **When to use**
978
+ *
979
+ * Use to get all elements after the first when the array is known to be non-empty.
980
+ *
981
  * **Example** (Getting the tail of a non-empty array)
982
  *
983
  * ```ts
 
994
  */
995
  export const tailNonEmpty = self => self.slice(1);
996
  /**
997
+ * Returns all elements except the last safely, wrapped in an `Option`.
998
+ *
999
+ * **When to use**
1000
+ *
1001
+ * Use to safely get all elements before the last when the iterable may be empty.
1002
+ *
1003
+ * **Details**
1004
  *
1005
+ * Allocates a new array via `slice(0, -1)`. Empty inputs return
1006
+ * `Option.none()`.
1007
  *
1008
  * **Example** (Getting init)
1009
  *
 
1027
  /**
1028
  * Returns all elements except the last of a `NonEmptyReadonlyArray`.
1029
  *
1030
+ * **When to use**
1031
+ *
1032
+ * Use to get all elements before the last when the array is known to be non-empty.
1033
+ *
1034
  * **Example** (Getting init of a non-empty array)
1035
  *
1036
  * ```ts
 
1049
  /**
1050
  * Keeps the first `n` elements, creating a new array.
1051
  *
1052
+ * **When to use**
1053
+ *
1054
+ * Use to keep up to the first `n` elements from an iterable as a new array.
1055
+ *
1056
+ * **Details**
1057
+ *
1058
+ * `n` is clamped to `[0, length]`. Returns an empty array when `n <= 0`.
1059
  *
1060
  * **Example** (Taking from the start)
1061
  *
 
1065
  * console.log(Array.take([1, 2, 3, 4, 5], 3)) // [1, 2, 3]
1066
  * ```
1067
  *
1068
+ * @see {@link takeRight} for keeping elements from the end
1069
+ * @see {@link takeWhile} for keeping an initial prefix while a predicate holds
1070
+ * @see {@link drop} for removing elements from the start
1071
  *
1072
  * @category getters
1073
  * @since 2.0.0
 
1079
  /**
1080
  * Keeps the last `n` elements, creating a new array.
1081
  *
1082
+ * **When to use**
1083
+ *
1084
+ * Use to keep the last `n` elements of an iterable.
1085
+ *
1086
+ * **Details**
1087
+ *
1088
+ * `n` is clamped to `[0, length]`. Returns an empty array when `n <= 0`.
1089
  *
1090
  * **Example** (Taking from the end)
1091
  *
 
1110
  * Takes elements from the start while the predicate holds, stopping at the
1111
  * first element that fails.
1112
  *
1113
+ * **When to use**
1114
+ *
1115
+ * Use to keep the leading elements of an iterable while each element satisfies
1116
+ * a predicate, returning the retained prefix as an array.
1117
+ *
1118
+ * **Details**
1119
+ *
1120
+ * Supports refinements for type narrowing. The predicate receives
1121
+ * `(element, index)`.
1122
  *
1123
  * **Example** (Taking while condition holds)
1124
  *
 
1128
  * console.log(Array.takeWhile([1, 3, 2, 4, 1, 2], (x) => x < 4)) // [1, 3, 2]
1129
  * ```
1130
  *
1131
+ * @see {@link take} for keeping a fixed number of leading elements
1132
+ * @see {@link dropWhile} for removing the matching prefix and keeping the rest
1133
+ * @see {@link span} for splitting the matching prefix from the remaining elements
1134
  *
1135
  * @category getters
1136
  * @since 2.0.0
 
1150
  /**
1151
  * Takes elements from the start while a `Filter` succeeds, collecting transformed values.
1152
  *
1153
+ * **When to use**
1154
+ *
1155
+ * Use when you need to take a prefix from an iterable while a function can
1156
+ * successfully extract or transform elements, stopping at the first element
1157
+ * that produces a failure result.
1158
+ *
1159
+ * **Details**
1160
+ *
1161
+ * The filter receives `(element, index)` and processing stops at the first
1162
+ * filter failure.
1163
+ *
1164
+ * @see {@link takeWhile} for taking a prefix based on a boolean predicate
1165
  *
1166
  * @category getters
1167
  * @since 4.0.0
 
1193
  * Splits an iterable into two arrays: the longest prefix where the predicate
1194
  * holds, and the remaining elements.
1195
  *
1196
+ * **When to use**
1197
+ *
1198
+ * Use when you need both the longest predicate-matching prefix and the
1199
+ * remaining elements.
1200
+ *
1201
+ * **Details**
1202
+ *
1203
+ * Equivalent to `[takeWhile(pred), dropWhile(pred)]`, but more efficient
1204
+ * because it runs in a single pass. Supports refinements for type narrowing of
1205
+ * the prefix.
1206
  *
1207
  * **Example** (Splitting at predicate boundary)
1208
  *
 
1212
  * console.log(Array.span([1, 3, 2, 4, 5], (x) => x % 2 === 1)) // [[1, 3], [2, 4, 5]]
1213
  * ```
1214
  *
1215
+ * @see {@link takeWhile} for keeping only the matching prefix
1216
+ * @see {@link dropWhile} for keeping only the elements after the matching prefix
1217
+ * @see {@link splitWhere} for splitting at the first element that satisfies a predicate
1218
  *
1219
  * @category splitting
1220
  * @since 2.0.0
 
1226
  /**
1227
  * Removes the first `n` elements, creating a new array.
1228
  *
1229
+ * **When to use**
1230
+ *
1231
+ * Use to keep the suffix of an iterable after skipping a fixed number of
1232
+ * leading elements.
1233
+ *
1234
+ * **Details**
1235
+ *
1236
+ * `n` is clamped to `[0, length]`. When `n <= 0`, this returns a copy of the
1237
+ * full array.
1238
  *
1239
  * **Example** (Dropping from the start)
1240
  *
 
1244
  * console.log(Array.drop([1, 2, 3, 4, 5], 2)) // [3, 4, 5]
1245
  * ```
1246
  *
1247
+ * @see {@link dropRight} for removing a fixed number of elements from the end
1248
+ * @see {@link dropWhile} for removing a prefix based on a predicate instead of a fixed count
1249
+ * @see {@link take} for keeping a fixed number of elements from the start
1250
  *
1251
  * @category getters
1252
  * @since 2.0.0
 
1258
  /**
1259
  * Removes the last `n` elements, creating a new array.
1260
  *
1261
+ * **When to use**
1262
+ *
1263
+ * Use to remove the last `n` elements from an iterable.
1264
+ *
1265
+ * **Details**
1266
+ *
1267
+ * `n` is clamped to `[0, length]`.
1268
  *
1269
  * **Example** (Dropping from the end)
1270
  *
 
1287
  /**
1288
  * Drops elements from the start while the predicate holds, returning the rest.
1289
  *
1290
+ * **When to use**
1291
+ *
1292
+ * Use to remove a leading prefix of elements that satisfy a predicate.
1293
+ *
1294
+ * **Details**
1295
+ *
1296
+ * The predicate receives `(element, index)`.
1297
  *
1298
  * **Example** (Dropping while condition holds)
1299
  *
 
1323
  /**
1324
  * Drops elements from the start while a `Filter` succeeds.
1325
  *
1326
+ * **When to use**
1327
+ *
1328
+ * Use when you need to drop a prefix from an iterable by computing a `Result`
1329
+ * per element instead of using a simple boolean predicate.
1330
+ *
1331
+ * **Details**
1332
+ *
1333
+ * The filter receives `(element, index)`. The result contains the remaining
1334
+ * original elements after the first filter failure.
1335
+ *
1336
+ * @see {@link dropWhile} for dropping a prefix with a simple boolean predicate
1337
+ * @see {@link takeWhileFilter} for keeping only the matching prefix
1338
  *
1339
  * @category getters
1340
  * @since 4.0.0
 
1354
  * Returns the index of the first element matching the predicate, wrapped in an
1355
  * `Option`.
1356
  *
1357
+ * **When to use**
1358
+ *
1359
+ * Use to find the index of the first matching element from the start of an
1360
+ * iterable.
1361
+ *
1362
  * **Example** (Finding an index)
1363
  *
1364
  * ```ts
 
1387
  * Returns the index of the last element matching the predicate, wrapped in an
1388
  * `Option`.
1389
  *
1390
+ * **When to use**
1391
+ *
1392
+ * Use to find the index of the last matching element from the end of an array.
1393
+ *
1394
  * **Example** (Finding the last matching index)
1395
  *
1396
  * ```ts
 
1418
  * Returns the first element matching a predicate, refinement, or mapping
1419
  * function, wrapped in `Option`.
1420
  *
1421
+ * **When to use**
1422
+ *
1423
+ * Use to scan an iterable in iteration order and return the first selected
1424
+ * element or mapped value as an `Option`.
1425
+ *
1426
+ * **Details**
1427
+ *
1428
+ * Accepts a predicate `(a, i) => boolean`, a refinement, or a function
1429
+ * `(a, i) => Option<B>` for simultaneous find-and-transform. If no element
1430
+ * matches, this returns `Option.none()`.
1431
  *
1432
  * **Example** (Finding the first match)
1433
  *
 
1446
  */
1447
  export const findFirst = moduleIterable.findFirst;
1448
  /**
1449
+ * Returns the first selected value together with its index, wrapped in an
1450
+ * `Option`.
1451
+ *
1452
+ * **When to use**
1453
+ *
1454
+ * Use to find both the first matching element and its index in one pass.
1455
+ *
1456
+ * **Details**
1457
+ *
1458
+ * Accepts a predicate, a refinement, or a function returning `Option`. For an
1459
+ * `Option`-returning function, returns `[mappedValue, index]` for the first
1460
+ * `Some`, or `Option.none()` if no element is selected.
1461
  *
1462
  * **Example** (Finding element with its index)
1463
  *
 
1494
  * Returns the last element matching a predicate, refinement, or mapping
1495
  * function, wrapped in `Option`.
1496
  *
1497
+ * **When to use**
1498
+ *
1499
+ * Use to find the last matching element from the end of an array.
1500
+ *
1501
+ * **Details**
1502
+ *
1503
+ * Searches from the end of the array. If no element matches, this returns
1504
+ * `Option.none()`.
1505
  *
1506
  * **Example** (Finding the last match)
1507
  *
 
1535
  return Option.none();
1536
  });
1537
  /**
1538
+ * Inserts an element at the specified index safely, returning a new `NonEmptyArray`
1539
  * wrapped in an `Option`.
1540
  *
1541
+ * **When to use**
1542
+ *
1543
+ * Use to insert a single element at a specific position in an array.
1544
+ *
1545
+ * **Details**
1546
+ *
1547
+ * Valid indices are `0` to `length`, inclusive. Inserting at `length` appends.
1548
  *
1549
  * **Example** (Inserting at an index)
1550
  *
 
1569
  return Option.some(out);
1570
  });
1571
  /**
1572
+ * Replaces the element at the specified index safely with a new value, returning the
1573
+ * updated array in `Option.some`.
1574
+ *
1575
+ * **When to use**
1576
  *
1577
+ * Use to set a fixed replacement value at a specific index.
1578
+ *
1579
+ * **Details**
1580
+ *
1581
+ * Returns `Option.none()` when the index is out of bounds.
1582
  *
1583
  * **Example** (Replacing an element)
1584
  *
 
1596
  */
1597
  export const replace = /*#__PURE__*/dual(3, (self, i, b) => modify(self, i, () => b));
1598
  /**
1599
+ * Applies a function to the element at the specified index safely, returning the
1600
+ * updated array in `Option.some`.
1601
+ *
1602
+ * **When to use**
1603
  *
1604
+ * Use to derive a replacement value from an array element at a specific index
1605
+ * while leaving the other elements unchanged.
1606
+ *
1607
+ * **Details**
1608
+ *
1609
+ * Returns `Option.none()` when the index is out of bounds.
1610
  *
1611
  * **Example** (Modifying an element)
1612
  *
 
1638
  * Removes the element at the specified index, returning a new array. If the
1639
  * index is out of bounds, returns a copy of the original.
1640
  *
1641
+ * **When to use**
1642
+ *
1643
+ * Use when you want a missing index to be a no-op and need a fresh array result
1644
+ * instead of an optional failure.
1645
  *
1646
  * **Example** (Removing an element)
1647
  *
 
1669
  /**
1670
  * Reverses an iterable into a new array.
1671
  *
1672
+ * **When to use**
1673
+ *
1674
+ * Use to reverse an iterable into a new array without mutating the original
1675
+ * input.
1676
+ *
1677
+ * **Details**
1678
+ *
1679
+ * Preserves `NonEmptyArray` in the return type.
1680
  *
1681
  * **Example** (Reversing an array)
1682
  *
 
1693
  /**
1694
  * Sorts an array by the given `Order`, returning a new array.
1695
  *
1696
+ * **When to use**
1697
+ *
1698
+ * Use to sort an array using a single `Order` comparator.
1699
+ *
1700
+ * **Details**
1701
+ *
1702
+ * Preserves `NonEmptyArray` in the return type. Use `sortWith` to sort by a
1703
+ * derived key, or `sortBy` for multi-key sorting.
1704
  *
1705
  * **Example** (Sorting numbers)
1706
  *
 
1725
  * Sorts an array by a derived key using a mapping function and an `Order` for
1726
  * that key.
1727
  *
1728
+ * **When to use**
1729
+ *
1730
+ * Use when you need to sort values by a derived key, such as a string length or
1731
+ * object field, while keeping the original values.
1732
+ *
1733
+ * **Details**
1734
+ *
1735
+ * Equivalent to `sort(Order.mapInput(order, f))`, but more convenient.
1736
  *
1737
  * **Example** (Sorting strings by length)
1738
  *
 
1743
  * // ["b", "cc", "aaa"]
1744
  * ```
1745
  *
1746
+ * @see {@link sort} for sorting with an `Order` that compares the elements directly
1747
+ * @see {@link sortBy} for sorting with multiple `Order`s applied in sequence
1748
  *
 
1749
  * @category elements
1750
+ * @since 2.0.0
1751
  */
1752
  export const sortWith = /*#__PURE__*/dual(3, (self, f, order) => Array.from(self).map(a => [a, f(a)]).sort(([, a], [, b]) => order(a, b)).map(([_]) => _));
1753
  /**
1754
  * Sorts an array by multiple `Order`s applied in sequence: the first order is
1755
  * used first; ties are broken by the second order, and so on.
1756
  *
1757
+ * **When to use**
1758
+ *
1759
+ * Use to sort by multiple criteria where later orders break ties from earlier
1760
+ * ones.
1761
+ *
1762
+ * **Details**
1763
+ *
1764
+ * This is data-last only and returns a function. The return type preserves
1765
+ * `NonEmptyArray`.
1766
  *
1767
  * **Example** (Multi-key sorting)
1768
  *
 
1806
  * Pairs elements from two iterables by position. If the iterables differ in
1807
  * length, the extra elements from the longer one are discarded.
1808
  *
1809
+ * **When to use**
1810
+ *
1811
+ * Use when you need simple pairs of corresponding elements from two iterables.
1812
+ *
1813
+ * **Details**
1814
+ *
1815
+ * Returns `NonEmptyArray` when both inputs are non-empty.
1816
  *
1817
  * **Example** (Zipping two arrays)
1818
  *
 
1833
  * Combines elements from two iterables pairwise using a function. If the
1834
  * iterables differ in length, extra elements are discarded.
1835
  *
1836
+ * **When to use**
1837
+ *
1838
+ * Use when zipping two iterables in an array pipeline and each pair should
1839
+ * become a computed array element instead of a tuple.
1840
+ *
1841
  * **Example** (Zipping with addition)
1842
  *
1843
  * ```ts
 
1896
  /**
1897
  * Places a separator element between every pair of elements.
1898
  *
1899
+ * **When to use**
1900
+ *
1901
+ * Use to insert a separator between elements, for example when preparing data for display or concatenation.
1902
+ *
1903
+ * **Details**
1904
+ *
1905
+ * The return type preserves `NonEmptyArray`. Empty inputs produce an empty
1906
+ * result.
1907
  *
1908
  * **Example** (Interspersing a separator)
1909
  *
 
1937
  * Applies a function to the first element of a non-empty array, returning a
1938
  * new array.
1939
  *
1940
+ * **When to use**
1941
+ *
1942
+ * Use to transform the first element of a non-empty array while preserving the rest.
1943
+ *
1944
  * **Example** (Modifying the head)
1945
  *
1946
  * ```ts
 
1953
  * @see {@link modifyLastNonEmpty} — modify the last element
1954
  *
1955
  * @category elements
1956
+ * @since 4.0.0
1957
  */
1958
  export const modifyHeadNonEmpty = /*#__PURE__*/dual(2, (self, f) => [f(headNonEmpty(self)), ...tailNonEmpty(self)]);
1959
  /**
1960
  * Replaces the first element of a non-empty array with a new value.
1961
  *
1962
+ * **When to use**
1963
+ *
1964
+ * Use when you already know the array is non-empty and the replacement value
1965
+ * does not depend on the current first element.
1966
+ *
1967
  * **Example** (Setting the head)
1968
  *
1969
  * ```ts
 
1976
  * @see {@link setLastNonEmpty} — replace the last element
1977
  *
1978
  * @category elements
1979
+ * @since 4.0.0
1980
  */
1981
  export const setHeadNonEmpty = /*#__PURE__*/dual(2, (self, b) => modifyHeadNonEmpty(self, () => b));
1982
  /**
1983
  * Applies a function to the last element of a non-empty array, returning a
1984
  * new array.
1985
  *
1986
+ * **When to use**
1987
+ *
1988
+ * Use when you already know the array is non-empty and the new last element
1989
+ * depends on the current last element.
1990
+ *
1991
  * **Example** (Modifying the last element)
1992
  *
1993
  * ```ts
 
2000
  * @see {@link modifyHeadNonEmpty} — modify the first element
2001
  *
2002
  * @category elements
2003
+ * @since 4.0.0
2004
  */
2005
  export const modifyLastNonEmpty = /*#__PURE__*/dual(2, (self, f) => append(initNonEmpty(self), f(lastNonEmpty(self))));
2006
  /**
2007
  * Replaces the last element of a non-empty array with a new value.
2008
  *
2009
+ * **When to use**
2010
+ *
2011
+ * Use when you already know the array is non-empty and the replacement value
2012
+ * does not depend on the current last element.
2013
+ *
2014
  * **Example** (Setting the last element)
2015
  *
2016
  * ```ts
 
2023
  * @see {@link setHeadNonEmpty} — replace the first element
2024
  *
2025
  * @category elements
2026
+ * @since 4.0.0
2027
  */
2028
  export const setLastNonEmpty = /*#__PURE__*/dual(2, (self, b) => modifyLastNonEmpty(self, () => b));
2029
  /**
2030
+ * Transforms an array by rotating it `n` steps. Positive `n` rotates right; negative `n`
2031
+ * rotates left.
2032
+ *
2033
+ * **When to use**
2034
  *
2035
+ * Use when elements should wrap around the end of the array rather than being
2036
+ * dropped.
2037
+ *
2038
+ * **Details**
2039
+ *
2040
+ * `n` is rounded to the nearest integer before rotating. The return type
2041
+ * preserves `NonEmptyArray`. Empty arrays, or rotations normalized to `0`,
2042
+ * return a copy.
2043
  *
2044
  * **Example** (Rotating elements)
2045
  *
 
2049
  * console.log(Array.rotate(["a", "b", "c", "d"], 2)) // ["c", "d", "a", "b"]
2050
  * ```
2051
  *
2052
+ * @see {@link take} for taking a fixed number of elements from the start
2053
+ * @see {@link drop} for dropping a fixed number of elements from the start
2054
+ *
2055
  * @category elements
2056
  * @since 2.0.0
2057
  */
 
2075
  /**
2076
  * Returns a membership-test function using a custom equivalence.
2077
  *
2078
+ * **When to use**
2079
+ *
2080
+ * Use when checking membership with caller-provided equality instead of
2081
+ * `Equal.equivalence()`.
2082
+ *
2083
  * **Example** (Custom equality check)
2084
  *
2085
  * ```ts
 
2089
  * console.log(pipe([1, 2, 3, 4], containsNumber(3))) // true
2090
  * ```
2091
  *
2092
+ * @see {@link contains} for the `Equal.equivalence()` variant
2093
  *
2094
  * @category elements
2095
  * @since 2.0.0
 
2103
  return false;
2104
  });
2105
  /**
2106
+ * Checks whether an array contains a value, using `Equal.equivalence()` for
2107
  * comparison.
2108
  *
2109
+ * **When to use**
2110
+ *
2111
+ * Use to check whether an iterable contains a value using Effect's default
2112
+ * equality instead of providing a comparison function.
2113
+ *
2114
  * **Example** (Checking membership)
2115
  *
2116
  * ```ts
 
2126
  */
2127
  export const contains = /*#__PURE__*/containsWith(/*#__PURE__*/Equal.asEquivalence());
2128
  /**
2129
+ * Applies a function repeatedly to consume prefixes of the array and collect
2130
+ * the values it produces.
2131
+ *
2132
+ * **When to use**
2133
  *
2134
+ * Use when you need custom grouping logic where each step returns both a value
2135
+ * and the remaining input.
2136
+ *
2137
+ * **Details**
2138
+ *
2139
+ * The function receives a `NonEmptyReadonlyArray` and returns `[value, rest]`.
2140
+ * Processing continues until the remaining array is empty.
2141
  *
2142
  * **Example** (Chopping an array)
2143
  *
 
2175
  /**
2176
  * Splits an iterable into two arrays at the given index.
2177
  *
2178
+ * **When to use**
2179
+ *
2180
+ * Use to divide an array into a prefix and suffix at a specific position.
2181
+ *
2182
+ * **Details**
2183
+ *
2184
+ * `n` can be `0`, in which case all elements are placed in the second array.
2185
+ * The index is floored to an integer.
2186
  *
2187
  * **Example** (Splitting at an index)
2188
  *
 
2213
  * Splits a non-empty array into two parts at the given index. The first part
2214
  * is guaranteed to be non-empty (`n` is clamped to >= 1).
2215
  *
2216
+ * **When to use**
2217
+ *
2218
+ * Use when downstream code requires the left side of the split to contain at
2219
+ * least one element.
2220
+ *
2221
  * **Example** (Splitting a non-empty array)
2222
  *
2223
  * ```ts
 
2230
  * @see {@link splitAt} — for possibly-empty arrays
2231
  *
2232
  * @category splitting
2233
+ * @since 4.0.0
2234
  */
2235
  export const splitAtNonEmpty = /*#__PURE__*/dual(2, (self, n) => {
2236
  const _n = Math.max(1, Math.floor(n));
 
2239
  /**
2240
  * Splits an iterable into `n` roughly equal-sized chunks.
2241
  *
2242
+ * **When to use**
2243
+ *
2244
+ * Use to distribute elements across a fixed number of groups, such as when splitting work across threads.
2245
+ *
2246
+ * **Details**
2247
+ *
2248
+ * Uses `chunksOf(ceil(length / n))` internally. The last chunk may be shorter.
2249
  *
2250
  * **Example** (Splitting into groups)
2251
  *
 
2257
  *
2258
  * @see {@link chunksOf} — split into fixed-size chunks
2259
  *
 
2260
  * @category splitting
2261
+ * @since 2.0.0
2262
  */
2263
  export const split = /*#__PURE__*/dual(2, (self, n) => {
2264
  const input = fromIterable(self);
 
2268
  * Splits an iterable at the first element matching the predicate. The matching
2269
  * element is included in the second array.
2270
  *
2271
+ * **When to use**
2272
+ *
2273
+ * Use when you need to split an array at the first element that marks a
2274
+ * condition boundary.
2275
+ *
2276
  * **Example** (Splitting at a condition)
2277
  *
2278
  * ```ts
 
2291
  /**
2292
  * Creates a shallow copy of an array.
2293
  *
2294
+ * **When to use**
2295
+ *
2296
+ * Use to create a distinct array reference for an existing array, for example
2297
+ * before mutating the returned array.
2298
+ *
2299
+ * **Details**
2300
+ *
2301
+ * The return type preserves `NonEmptyArray`. Use this when you need a distinct
2302
+ * reference, for example before mutating the returned array.
2303
  *
2304
  * **Example** (Copying an array)
2305
  *
 
2322
  * Pads or truncates an array to exactly `n` elements, filling with `fill`
2323
  * if the array is shorter, or slicing if longer.
2324
  *
2325
+ * **When to use**
2326
+ *
2327
+ * Use to ensure an array has a specific length, padding with a fill value or truncating as needed.
2328
+ *
2329
+ * **Details**
2330
+ *
2331
+ * Returns an empty array when `n <= 0`.
2332
  *
2333
  * **Example** (Padding an array)
2334
  *
 
2354
  * Splits an iterable into chunks of length `n`. The last chunk may be shorter
2355
  * if `n` does not evenly divide the length.
2356
  *
2357
+ * **When to use**
2358
+ *
2359
+ * Use to divide an iterable into a new array of non-overlapping chunks with a
2360
+ * maximum chunk size.
2361
+ *
2362
+ * **Details**
2363
+ *
2364
+ * `chunksOf(n)([])` is `[]`, not `[[]]`. Each chunk is a `NonEmptyArray`, and
2365
+ * the outer return type preserves `NonEmptyArray`.
2366
  *
2367
  * **Example** (Chunking an array)
2368
  *
 
2388
  /**
2389
  * Creates overlapping sliding windows of size `n`.
2390
  *
2391
+ * **When to use**
2392
+ *
2393
+ * Use to process sequences with a moving window, such as for computing running averages or detecting patterns.
2394
+ *
2395
+ * **Details**
2396
+ *
2397
+ * Returns an empty array if `n <= 0` or the array has fewer than `n` elements.
2398
+ * Each window is a tuple of exactly `n` elements.
2399
  *
2400
  * **Example** (Sliding windows)
2401
  *
 
2423
  /**
2424
  * Groups consecutive equal elements using a custom equivalence function.
2425
  *
2426
+ * **When to use**
2427
+ *
2428
+ * Use when you already have a non-empty array arranged so matching elements are
2429
+ * adjacent and need a custom equivalence function.
2430
+ *
2431
+ * **Details**
2432
+ *
2433
+ * Only adjacent elements are grouped. Non-adjacent duplicates stay separate.
2434
+ * Requires a `NonEmptyReadonlyArray`.
2435
  *
2436
  * **Example** (Grouping consecutive equal elements)
2437
  *
 
2442
  * // [["a", "a"], ["b", "b", "b"], ["c"], ["a"]]
2443
  * ```
2444
  *
2445
+ * @see {@link group} for grouping adjacent elements with `Equal.equivalence()`
2446
+ * @see {@link groupBy} for grouping all elements into a record by key, regardless of adjacency
2447
  *
2448
  * @category grouping
2449
  * @since 2.0.0
 
2465
  /**
2466
  * Groups consecutive equal elements using `Equal.equivalence()`.
2467
  *
2468
+ * **When to use**
2469
+ *
2470
+ * Use when you already have adjacent equal values and Effect's default equality
2471
+ * is the right comparison.
2472
+ *
2473
+ * **Details**
2474
+ *
2475
+ * Only adjacent elements are grouped.
2476
  *
2477
  * **Example** (Grouping adjacent equal elements)
2478
  *
 
2493
  * Groups elements into a record by a key-returning function. Each key maps
2494
  * to a `NonEmptyArray` of elements that produced that key.
2495
  *
2496
+ * **When to use**
2497
+ *
2498
+ * Use to build buckets of elements indexed by a computed string or symbol key.
2499
+ *
2500
+ * **Details**
2501
+ *
2502
+ * Unlike `group` and `groupWith`, elements do not need to be adjacent to be
2503
+ * grouped together. The key function must return a `string` or `symbol`.
2504
  *
2505
  * **Example** (Grouping by a property)
2506
  *
 
2540
  * Computes the union of two arrays using a custom equivalence, removing
2541
  * duplicates.
2542
  *
2543
+ * **When to use**
2544
+ *
2545
+ * Use when you need the union of two arrays but duplicate detection must use a
2546
+ * custom equivalence instead of the default `Equal.equivalence()`.
2547
+ *
2548
  * **Example** (Union with custom equality)
2549
  *
2550
  * ```ts
 
2553
  * console.log(Array.unionWith([1, 2], [2, 3], (a, b) => a === b)) // [1, 2, 3]
2554
  * ```
2555
  *
2556
+ * @see {@link union} for the `Equal.equivalence()` variant
2557
+ * @see {@link intersectionWith} for keeping elements present in both arrays
2558
+ * @see {@link differenceWith} for keeping elements present only in the first array
2559
  *
2560
  * @category elements
2561
  * @since 2.0.0
 
2596
  * Computes the intersection of two arrays using a custom equivalence. Order is
2597
  * determined by the first array.
2598
  *
2599
+ * **When to use**
2600
+ *
2601
+ * Use when you need to keep only values present in both arrays and equality
2602
+ * must be defined by a custom comparator, such as matching objects by id.
2603
+ *
2604
  * **Example** (Intersection with custom equality)
2605
  *
2606
  * ```ts
 
2612
  * console.log(Array.intersectionWith(isEquivalent)(array2)(array1)) // [{ id: 1 }, { id: 3 }]
2613
  * ```
2614
  *
2615
+ * @see {@link intersection} for the `Equal.equivalence()` variant
2616
+ * @see {@link unionWith} for keeping values from either array with custom equality
2617
+ * @see {@link differenceWith} for keeping values only from the first array with custom equality
2618
  *
2619
  * @category elements
2620
  * @since 2.0.0
 
2630
  * Computes the intersection of two arrays using `Equal.equivalence()`. Order is
2631
  * determined by the first array.
2632
  *
2633
+ * **When to use**
2634
+ *
2635
+ * Use when Effect equality is the right membership test and you want to keep
2636
+ * values present in both inputs while preserving the first input's order.
2637
+ *
2638
  * **Example** (Array intersection)
2639
  *
2640
  * ```ts
 
2655
  * Computes elements in the first array that are not in the second, using a
2656
  * custom equivalence.
2657
  *
2658
+ * **When to use**
2659
+ *
2660
+ * Use when you need to keep only values from the first array and equality must
2661
+ * be defined by a custom comparator, such as matching objects by id.
2662
+ *
2663
  * **Example** (Difference with custom equality)
2664
  *
2665
  * ```ts
 
2669
  * console.log(diff) // [1]
2670
  * ```
2671
  *
2672
+ * @see {@link difference} for the `Equal.equivalence()` variant
2673
+ * @see {@link unionWith} for keeping values from either array with custom equality
2674
+ * @see {@link intersectionWith} for keeping values present in both arrays with custom equality
2675
  *
2676
  * @category elements
2677
  * @since 2.0.0
 
2687
  * Computes elements in the first array that are not in the second, using
2688
  * `Equal.equivalence()`.
2689
  *
2690
+ * **When to use**
2691
+ *
2692
+ * Use when you need to keep values from the first array that are absent from
2693
+ * the second and the default `Equal.equivalence()` comparison is appropriate.
2694
+ *
2695
  * **Example** (Array difference)
2696
  *
2697
  * ```ts
 
2711
  /**
2712
  * Creates an empty array.
2713
  *
2714
+ * **When to use**
2715
+ *
2716
+ * Use to create a typed empty array without allocating placeholder elements.
2717
+ *
2718
  * **Example** (Creating an empty array)
2719
  *
2720
  * ```ts
 
2752
  /**
2753
  * Transforms each element using a function, returning a new array.
2754
  *
2755
+ * **When to use**
2756
+ *
2757
+ * Use to transform each element independently while preserving the array shape.
2758
+ *
2759
+ * **Details**
2760
+ *
2761
+ * The function receives `(element, index)`. The return type preserves
2762
+ * `NonEmptyArray`.
2763
  *
2764
  * **Example** (Doubling values)
2765
  *
 
2778
  /**
2779
  * Maps each element to an array and flattens the results into a single array.
2780
  *
2781
+ * **When to use**
2782
+ *
2783
+ * Use to map each array element to zero or more values and concatenate the
2784
+ * results in one pass.
2785
+ *
2786
+ * **Details**
2787
+ *
2788
+ * The function receives `(element, index)`. This returns `NonEmptyArray` when
2789
+ * both the input and mapped arrays are non-empty.
2790
  *
2791
  * **Example** (FlatMapping an array)
2792
  *
 
2818
  /**
2819
  * Flattens a nested array of arrays into a single array.
2820
  *
2821
+ * **When to use**
2822
+ *
2823
+ * Use to collapse one level of nested arrays when no per-element mapping is
2824
+ * needed.
2825
+ *
2826
  * **Example** (Flattening nested arrays)
2827
  *
2828
  * ```ts
 
2840
  /**
2841
  * Extracts all `Some` values from an iterable of `Option`s, discarding `None`s.
2842
  *
2843
+ * **When to use**
2844
+ *
2845
+ * Use to collect only present values from an iterable of `Option` values while
2846
+ * discarding `None` values.
2847
+ *
2848
  * **Example** (Extracting Some values)
2849
  *
2850
  * ```ts
 
2872
  * Extracts all failure values from an iterable of `Result`s, discarding
2873
  * successes.
2874
  *
2875
+ * **When to use**
2876
+ *
2877
+ * Use when you can drop the success channel and only need the failure
2878
+ * payloads, not the original result wrappers.
2879
+ *
2880
  * **Example** (Extracting failures)
2881
  *
2882
  * ```ts
 
2890
  * @see {@link separate} — split into failures and successes
2891
  *
2892
  * @category filtering
2893
+ * @since 4.0.0
2894
  */
2895
  export const getFailures = self => {
2896
  const out = [];
 
2905
  * Extracts all success values from an iterable of `Result`s, discarding
2906
  * failures.
2907
  *
2908
+ * **When to use**
2909
+ *
2910
+ * Use when you can drop the failure channel and only need the success
2911
+ * payloads, not the original result wrappers.
2912
+ *
2913
  * **Example** (Extracting successes)
2914
  *
2915
  * ```ts
 
2923
  * @see {@link separate} — split into failures and successes
2924
  *
2925
  * @category filtering
2926
+ * @since 4.0.0
2927
  */
2928
  export const getSuccesses = self => {
2929
  const out = [];
 
2937
  /**
2938
  * Keeps transformed values for elements where a `Filter` succeeds.
2939
  *
2940
+ * **When to use**
2941
+ *
2942
+ * Use to filter an iterable with a `Result`-returning transformation while
2943
+ * discarding failures.
2944
+ *
2945
+ * **Details**
2946
+ *
2947
+ * The filter receives `(element, index)`. Failures are discarded.
2948
  *
2949
  * **Example** (Filter and transform)
2950
  *
 
2956
  * ```
2957
  *
2958
  * @see {@link filter} — keep original elements matching a predicate
2959
+ * @see {@link partition} for keeping both failures and successes
2960
  *
2961
  * @category filtering
2962
+ * @since 2.0.0
2963
  */
2964
  export const filterMap = /*#__PURE__*/dual(2, (self, f) => {
2965
  const as = fromIterable(self);
 
2975
  /**
2976
  * Keeps only elements satisfying a predicate (or refinement).
2977
  *
2978
+ * **When to use**
2979
+ *
2980
+ * Use to filter an iterable into a new array of original elements that satisfy
2981
+ * a boolean predicate or refinement.
2982
+ *
2983
+ * **Details**
2984
+ *
2985
+ * The predicate receives `(element, index)`. Refinements are supported for type
2986
+ * narrowing.
2987
  *
2988
  * **Example** (Filtering even numbers)
2989
  *
 
2994
  * ```
2995
  *
2996
  * @see {@link partition} — split into matching and non-matching
2997
+ * @see {@link filterMap} for transforming while filtering
2998
  *
2999
  * @category filtering
3000
  * @since 2.0.0
 
3012
  /**
3013
  * Splits an iterable using a `Filter` into failures and successes.
3014
  *
3015
+ * **When to use**
3016
+ *
3017
+ * Use to partition an iterable by evaluating each element with a
3018
+ * `Result`-returning filter and keeping both failure and success values.
3019
+ *
3020
+ * **Details**
3021
+ *
3022
+ * Returns `[excluded, satisfying]`. The filter receives `(element, index)`.
3023
  *
3024
  * **Example** (Partitioning with a filter)
3025
  *
 
3033
  * ```
3034
  *
3035
  * @see {@link filter} — keep only matching elements
3036
+ * @see {@link filterMap} for discarding failures
3037
+ * @see {@link separate} — split an iterable of `Result` values
3038
  *
3039
  * @category filtering
3040
  * @since 2.0.0
 
3054
  return [excluded, satisfying];
3055
  });
3056
  /**
3057
+ * Separates an iterable of `Result`s into failure values and success values.
3058
  *
3059
+ * **When to use**
3060
+ *
3061
+ * Use to split an iterable of `Result` values into failure and success arrays.
3062
+ *
3063
+ * **Details**
3064
+ *
3065
+ * Returns `[failures, successes]`. This is equivalent to
3066
+ * `partition(identity)`.
3067
  *
3068
  * **Example** (Separating Results)
3069
  *
 
3079
  *
3080
  * @see {@link getFailures} — extract only failures
3081
  * @see {@link getSuccesses} — extract only successes
3082
+ * @see {@link partition} for computing `Result` values while splitting
3083
  *
3084
  * @category filtering
3085
  * @since 2.0.0
 
3088
  /**
3089
  * Folds an iterable from left to right into a single value.
3090
  *
3091
+ * **When to use**
3092
+ *
3093
+ * Use to combine all elements into one accumulated value from left to right.
3094
+ *
3095
+ * **Details**
3096
+ *
3097
+ * The function receives `(accumulator, element, index)`.
3098
  *
3099
  * **Example** (Summing an array)
3100
  *
 
3114
  /**
3115
  * Folds an iterable from right to left into a single value.
3116
  *
3117
+ * **When to use**
3118
+ *
3119
+ * Use when you need to fold values from right to left.
3120
+ *
3121
+ * **Details**
3122
+ *
3123
+ * The function receives `(accumulator, element, index)`.
3124
  *
3125
  * **Example** (Right-to-left fold)
3126
  *
 
3162
  * Lifts an `Option`-returning function into one that returns an array:
3163
  * `Some(a)` becomes `[a]`, `None` becomes `[]`.
3164
  *
3165
+ * **When to use**
3166
+ *
3167
+ * Use when an optional parser or lookup should participate in array pipelines
3168
+ * as zero-or-one results.
3169
+ *
3170
  * **Example** (Lifting an Option function)
3171
  *
3172
  * ```ts
 
3191
  * Converts a nullable value to an array: `null`/`undefined` becomes `[]`,
3192
  * anything else becomes `[value]`.
3193
  *
3194
+ * **When to use**
3195
+ *
3196
+ * Use to treat a nullable single value as zero or one array element.
3197
+ *
3198
  * **Example** (Nullable to array)
3199
  *
3200
  * ```ts
 
3208
  * @see {@link liftNullishOr} — lift a nullable-returning function
3209
  * @see {@link fromOption} — convert from Option
3210
  *
3211
+ * @category converting
3212
+ * @since 4.0.0
3213
  */
3214
  export const fromNullishOr = a => a == null ? empty() : [a];
3215
  /**
 
3233
  * @see {@link liftOption} — lift an Option-returning function
3234
  *
3235
  * @category lifting
3236
+ * @since 4.0.0
3237
  */
3238
  export const liftNullishOr = f => (...a) => fromNullishOr(f(...a));
3239
  /**
3240
  * Maps each element with a nullable-returning function, keeping only non-null /
3241
  * non-undefined results.
3242
  *
3243
+ * **When to use**
3244
+ *
3245
+ * Use when you need to map and filter in one step, where the mapper can return
3246
+ * `null` or `undefined` to skip elements.
3247
+ *
3248
  * **Example** (FlatMapping with nullable)
3249
  *
3250
  * ```ts
 
3254
  * // [1, 3]
3255
  * ```
3256
  *
3257
+ * @see {@link flatMap} for mapping each element to an array and flattening
3258
+ * @see {@link fromNullishOr} for converting a single nullable value to an array
3259
+ *
3260
  * @category sequencing
3261
+ * @since 4.0.0
3262
  */
3263
  export const flatMapNullishOr = /*#__PURE__*/dual(2, (self, f) => flatMap(self, a => fromNullishOr(f(a))));
3264
  /**
3265
  * Lifts a `Result`-returning function into one that returns an array: failures
3266
  * produce `[]`, successes produce `[value]`.
3267
  *
3268
+ * **When to use**
3269
+ *
3270
+ * Use when a fallible parser or lookup should participate in array pipelines as
3271
+ * zero-or-one results and the failure value should be discarded.
3272
+ *
3273
  * **Example** (Lifting a Result function)
3274
  *
3275
  * ```ts
 
3289
  * @see {@link liftPredicate} — lift a boolean predicate
3290
  *
3291
  * @category lifting
3292
+ * @since 4.0.0
3293
  */
3294
  export const liftResult = f => (...a) => {
3295
  const e = f(...a);
3296
  return Result.isFailure(e) ? [] : [e.success];
3297
  };
3298
  /**
3299
+ * Checks whether all elements satisfy the predicate. Supports refinements for
3300
  * type narrowing.
3301
  *
3302
+ * **When to use**
3303
+ *
3304
+ * Use to check whether every array element satisfies a predicate, including
3305
+ * refinement-based type narrowing.
3306
+ *
3307
  * **Example** (Testing all elements)
3308
  *
3309
  * ```ts
 
3320
  */
3321
  export const every = /*#__PURE__*/dual(2, (self, refinement) => self.every(refinement));
3322
  /**
3323
+ * Checks whether at least one element satisfies the predicate. Narrows the type
3324
  * to `NonEmptyReadonlyArray` on success.
3325
  *
3326
  * **Example** (Testing for any match)
 
3343
  * Applies a function to each suffix of the array (starting from each index),
3344
  * collecting the results.
3345
  *
3346
+ * **When to use**
3347
+ *
3348
+ * Use when you need to compute a result from every suffix of an array, such as
3349
+ * cumulative aggregations from each position.
3350
+ *
3351
+ * **Details**
3352
+ *
3353
+ * For index `i`, the function receives `self.slice(i)`.
3354
  *
3355
  * **Example** (Suffix lengths)
3356
  *
 
3360
  * console.log(Array.extend([1, 2, 3], (as) => as.length)) // [3, 2, 1]
3361
  * ```
3362
  *
3363
+ * @see {@link scan} for keeping intermediate accumulator values during a fold
3364
+ *
3365
  * @category mapping
3366
  * @since 2.0.0
3367
  */
 
3455
  * @see {@link makeEquivalence} — create an equivalence for arrays
3456
  *
3457
  * @category instances
3458
+ * @since 4.0.0
3459
  */
3460
  export const makeOrder = Order.Array;
3461
  /**
 
3475
  * @see {@link makeOrder} — create an ordering for arrays
3476
  *
3477
  * @category instances
3478
+ * @since 4.0.0
3479
  */
3480
  export const makeEquivalence = Equivalence.Array;
3481
  /**
3482
  * Runs a side-effect for each element. The callback receives `(element, index)`.
3483
  *
3484
+ * **When to use**
3485
+ *
3486
+ * Use to iterate over an array for side-effects only, when no transformed
3487
+ * result is needed.
3488
+ *
3489
  * **Example** (Iterating with side-effects)
3490
  *
3491
  * ```ts
 
3494
  * Array.forEach([1, 2, 3], (n) => console.log(n)) // 1, 2, 3
3495
  * ```
3496
  *
3497
+ * @see {@link map} for transforming each element into a new array
3498
+ *
3499
  * @category elements
3500
  * @since 2.0.0
3501
  */
 
3504
  * Removes duplicates using a custom equivalence, preserving the order of the
3505
  * first occurrence.
3506
  *
3507
+ * **When to use**
3508
+ *
3509
+ * Use to remove all duplicate elements with a custom equivalence when default
3510
+ * equality is not appropriate.
3511
+ *
3512
  * **Example** (Deduplicating with custom equality)
3513
  *
3514
  * ```ts
 
3541
  * Removes duplicates using `Equal.equivalence()`, preserving the order of the
3542
  * first occurrence.
3543
  *
3544
+ * **When to use**
3545
+ *
3546
+ * Use to remove repeated values from an iterable when Effect's default equality
3547
+ * is the right comparison, preserving the first occurrence.
3548
+ *
3549
  * **Example** (Removing duplicates)
3550
  *
3551
  * ```ts
 
3564
  /**
3565
  * Removes consecutive duplicate elements using a custom equivalence.
3566
  *
3567
+ * **When to use**
3568
+ *
3569
+ * Use when consecutive duplicates should be collapsed using a custom
3570
+ * equivalence, while equivalent values that appear later should remain in the
3571
+ * result.
3572
+ *
3573
+ * **Details**
3574
+ *
3575
+ * Non-adjacent duplicates are preserved.
3576
  *
3577
  * **Example** (Deduplicating adjacent elements)
3578
  *
 
3603
  /**
3604
  * Removes consecutive duplicate elements using `Equal.equivalence()`.
3605
  *
3606
+ * **When to use**
3607
+ *
3608
+ * Use when you need to collapse consecutive duplicates while preserving later
3609
+ * non-consecutive repeats, and the default equality is sufficient.
3610
+ *
3611
  * **Example** (Removing adjacent duplicates)
3612
  *
3613
  * ```ts
 
3636
  *
3637
  * @see {@link intersperse} — insert separator elements without joining
3638
  *
 
3639
  * @category folding
3640
+ * @since 2.0.0
3641
  */
3642
  export const join = /*#__PURE__*/dual(2, (self, sep) => fromIterable(self).join(sep));
3643
  /**
3644
  * Maps over an array while threading an accumulator through each step, returning both the final state and the mapped array.
3645
  *
3646
+ * **When to use**
3647
+ *
3648
+ * Use when you need to map while threading state through each element and keep
3649
+ * the final state.
3650
+ *
3651
+ * **Details**
3652
+ *
3653
+ * Combines `map` and `reduce` in a single pass. The callback receives the
3654
+ * current state, element, and index, and returns `[nextState, mappedValue]`.
3655
+ * The result is `[finalState, mappedArray]`. This can be used in both
3656
+ * data-first and data-last style.
3657
  *
3658
  * **Example** (Running sum alongside mapped values)
3659
  *
 
3667
  * @see {@link scan} — when you only need the accumulated results (not the final state)
3668
  * @see {@link reduce} — when you only need the final accumulated value
3669
  *
 
3670
  * @category folding
3671
+ * @since 2.0.0
3672
  */
3673
  export const mapAccum = /*#__PURE__*/dual(3, (self, s, f) => {
3674
  let i = 0;
 
3685
  /**
3686
  * Computes the cartesian product of two arrays, applying a combiner to each pair.
3687
  *
3688
+ * **When to use**
3689
+ *
3690
+ * Use to compute every combination from two arrays and immediately transform
3691
+ * each pair into a custom result.
3692
+ *
3693
+ * **Details**
3694
+ *
3695
+ * Produces every combination of an element from `self` with an element from
3696
+ * `that`, so the result length is `self.length * that.length`. Iteration visits
3697
+ * every element of `that` for each element of `self`.
3698
  *
3699
  * **Example** (Combining numbers and letters)
3700
  *
 
3705
  * console.log(result) // ["1-a", "1-b", "2-a", "2-b"]
3706
  * ```
3707
  *
3708
+ * @see {@link cartesian} for returning tuples instead of applying a combiner
3709
  *
 
3710
  * @category elements
3711
+ * @since 2.0.0
3712
  */
3713
  export const cartesianWith = /*#__PURE__*/dual(3, (self, that, f) => flatMap(self, a => map(that, b => f(a, b))));
3714
  /**
3715
  * Computes the cartesian product of two arrays, returning all pairs as tuples.
3716
  *
3717
+ * **When to use**
3718
+ *
3719
+ * Use when you need every `[a, b]` pair from two arrays as tuples.
3720
+ *
3721
+ * **Details**
3722
+ *
3723
+ * Produces every `[a, b]` combination of an element from `self` with an element
3724
+ * from `that`, so the result length is `self.length * that.length`.
3725
  *
3726
  * **Example** (All pairs of two arrays)
3727
  *
 
3734
  *
3735
  * @see {@link cartesianWith} — apply a combiner to each pair
3736
  *
 
3737
  * @category elements
3738
+ * @since 2.0.0
3739
  */
3740
  export const cartesian = /*#__PURE__*/dual(2, (self, that) => cartesianWith(self, that, (a, b) => [a, b]));
3741
  // -------------------------------------------------------------------------------------
3742
  // do notation
3743
  // -------------------------------------------------------------------------------------
3744
  /**
3745
+ * Provides the starting point for the "do simulation" — an array comprehension pattern.
3746
  *
3747
+ * **When to use**
3748
+ *
3749
+ * Use when you want array-comprehension style code with do notation.
3750
+ *
3751
+ * **Details**
3752
+ *
3753
+ * Use {@link bind} to introduce array variables and {@link let_ let} for plain
3754
+ * values. Each `bind` produces the cartesian product of all bound variables,
3755
+ * like nested loops. Use `filter` and `map` in the pipeline to add conditions
3756
+ * and transformations.
3757
  *
3758
  * **Example** (Array comprehension with do notation)
3759
  *
 
3779
  */
3780
  export const Do = /*#__PURE__*/of({});
3781
  /**
3782
+ * Adds a new array variable to a do-notation scope, producing the cartesian product with all previous bindings.
3783
+ *
3784
+ * **When to use**
3785
+ *
3786
+ * Use to add another array-producing binding to an `Array.Do` pipeline, pairing
3787
+ * each existing scope with every value returned by the callback.
3788
+ *
3789
+ * **Details**
3790
  *
3791
+ * Each `bind` call adds a named property to the accumulated object. The
3792
+ * callback receives the current scope and must return an array. This is
3793
+ * equivalent to `flatMap` plus merging the new value into the scope object.
3794
  *
3795
  * **Example** (Binding two arrays)
3796
  *
 
3815
  */
3816
  export const bind = /*#__PURE__*/internalDoNotation.bind(map, flatMap);
3817
  /**
3818
+ * Wraps each array element in an object with the given key, starting a do-notation scope.
3819
  *
3820
+ * **When to use**
3821
+ *
3822
+ * Use when you already have an array and want to start a do-notation pipeline
3823
+ * by naming each element.
3824
+ *
3825
+ * **Details**
3826
+ *
3827
+ * Equivalent to `Array.map(self, (a) => ({ [tag]: a }))`. This is an
3828
+ * alternative to starting with `Do` plus `bind` when you already have an array.
3829
  *
3830
  * **Example** (Naming an existing array)
3831
  *
 
3851
  /**
3852
  * Adds a computed plain value to the do-notation scope without introducing a new array dimension.
3853
  *
3854
+ * **When to use**
3855
+ *
3856
+ * Use when each do-notation branch needs a derived field from the current
3857
+ * bindings without multiplying the number of branches.
3858
+ *
3859
+ * **Details**
3860
+ *
3861
+ * Unlike `bind`, the callback returns a single value instead of an array, so
3862
+ * no cartesian product occurs. Use this for derived or intermediate values
3863
+ * that depend on previously bound variables.
3864
  *
3865
  * **Example** (Adding a computed value)
3866
  *
 
3889
  *
3890
  * @see {@link makeReducerConcat} — mutable `Array` variant
3891
  *
3892
+ * @category folding
3893
  * @since 4.0.0
3894
  */
3895
  export function getReadonlyReducerConcat() {
 
3900
  *
3901
  * @see {@link getReadonlyReducerConcat} — readonly variant
3902
  *
3903
+ * @category folding
3904
  * @since 4.0.0
3905
  */
3906
  export function makeReducerConcat() {
3907
  return reducer;
3908
  }
3909
  /**
3910
+ * Computes the number of elements in an iterable that satisfy a predicate.
3911
+ *
3912
+ * **When to use**
3913
+ *
3914
+ * Use when you need to count how many elements of an iterable satisfy a
3915
+ * predicate.
3916
+ *
3917
+ * **Details**
3918
  *
3919
+ * The predicate receives both the element and its index. Empty iterables return
3920
+ * `0`.
3921
  *
3922
  * **Example** (Counting even numbers)
3923
  *
.opencode/node_modules/effect/dist/Array.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Array.js","names":["Equal","Equivalence","dual","identity","internalArray","internalDoNotation","moduleIterable","Option","Order","Record","Reducer","Result","Tuple","Array","globalThis","make","elements","allocate","n","makeBy","f","max","Math","floor","out","i","range","start","end","replicate","a","fromIterable","collection","isArray","from","ensure","self","fromRecord","toEntries","fromOption","toArray","match","onEmpty","onNonEmpty","isReadonlyArrayNonEmpty","matchLeft","headNonEmpty","tailNonEmpty","matchRight","initNonEmpty","lastNonEmpty","prepend","head","prependAll","that","concat","append","last","appendAll","scan","b","scanRight","input","length","isArrayEmpty","isReadonlyArrayEmpty","isArrayNonEmpty","isOutOfBounds","as","clamp","min","get","index","none","some","getUnsafe","Error","unprepend","unappend","tail","slice","init","take","takeRight","takeWhile","predicate","push","takeWhileFilter","result","isFailure","success","spanIndex","span","splitAt","drop","dropRight","dropWhile","dropWhileFilter","findFirstIndex","findLastIndex","findFirst","findFirstWithIndex","o","isSome","value","findLast","insertAt","splice","replace","modify","arr","remove","reverse","sort","O","sortWith","order","map","_","sortBy","orders","sortByAll","combineAll","zip","zipWith","bs","len","unzip","fa","fb","intersperse","middle","modifyHeadNonEmpty","setHeadNonEmpty","modifyLastNonEmpty","setLastNonEmpty","rotate","m","round","abs","copy","s","splitAtNonEmpty","containsWith","isEquivalent","contains","asEquivalence","chop","rest","next","_n","split","chunksOf","ceil","splitWhere","pad","fill","window","groupWith","h","group","groupBy","k","Object","hasOwn","unionWith","dedupe","dedupeWith","union","intersectionWith","has","thatArray","filter","intersection","differenceWith","difference","empty","of","flatMap","inner","j","flatten","getSomes","getFailures","failure","getSuccesses","isSuccess","filterMap","partition","excluded","satisfying","separate","reduce","reduceRight","liftPredicate","liftOption","fromNullishOr","liftNullishOr","flatMapNullishOr","liftResult","e","every","refinement","extend","unfold","isNone","makeOrder","makeEquivalence","forEach","r","dedupeAdjacentWith","lastA","dedupeAdjacent","join","sep","mapAccum","s1","cartesianWith","cartesian","Do","bind","bindTo","let_","let","reducer","getReadonlyReducerConcat","makeReducerConcat","countBy","count"],"sources":["../src/Array.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqFA,OAAO,KAAKA,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAE/C,SAASC,IAAI,EAAEC,QAAQ,QAAQ,eAAe;AAE9C,OAAO,KAAKC,aAAa,MAAM,qBAAqB;AACpD,OAAO,KAAKC,kBAAkB,MAAM,0BAA0B;AAC9D,OAAO,KAAKC,cAAc,MAAM,eAAe;AAC/C,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,KAAK,MAAM,YAAY;AAEnC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,KAAK,MAA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"Array.js","names":["Equal","Equivalence","dual","identity","internalArray","internalDoNotation","moduleIterable","Option","Order","Record","Reducer","Result","Tuple","Array","globalThis","make","elements","allocate","n","makeBy","f","max","Math","floor","out","i","range","start","end","replicate","a","fromIterable","collection","isArray","from","ensure","self","fromRecord","toEntries","fromOption","toArray","match","onEmpty","onNonEmpty","isReadonlyArrayNonEmpty","matchLeft","headNonEmpty","tailNonEmpty","matchRight","initNonEmpty","lastNonEmpty","prepend","head","prependAll","that","concat","append","last","appendAll","scan","b","scanRight","input","length","isArrayEmpty","isReadonlyArrayEmpty","isArrayNonEmpty","isOutOfBounds","as","clamp","min","get","index","none","some","getUnsafe","Error","unprepend","unappend","tail","slice","init","take","takeRight","takeWhile","predicate","push","takeWhileFilter","result","isFailure","success","spanIndex","span","splitAt","drop","dropRight","dropWhile","dropWhileFilter","findFirstIndex","findLastIndex","findFirst","findFirstWithIndex","o","isSome","value","findLast","insertAt","splice","replace","modify","arr","remove","reverse","sort","O","sortWith","order","map","_","sortBy","orders","sortByAll","combineAll","zip","zipWith","bs","len","unzip","fa","fb","intersperse","middle","modifyHeadNonEmpty","setHeadNonEmpty","modifyLastNonEmpty","setLastNonEmpty","rotate","m","round","abs","copy","s","splitAtNonEmpty","containsWith","isEquivalent","contains","asEquivalence","chop","rest","next","_n","split","chunksOf","ceil","splitWhere","pad","fill","window","groupWith","h","group","groupBy","k","Object","hasOwn","unionWith","dedupe","dedupeWith","union","intersectionWith","has","thatArray","filter","intersection","differenceWith","difference","empty","of","flatMap","inner","j","flatten","getSomes","getFailures","failure","getSuccesses","isSuccess","filterMap","partition","excluded","satisfying","separate","reduce","reduceRight","liftPredicate","liftOption","fromNullishOr","liftNullishOr","flatMapNullishOr","liftResult","e","every","refinement","extend","unfold","isNone","makeOrder","makeEquivalence","forEach","r","dedupeAdjacentWith","lastA","dedupeAdjacent","join","sep","mapAccum","s1","cartesianWith","cartesian","Do","bind","bindTo","let_","let","reducer","getReadonlyReducerConcat","makeReducerConcat","countB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CAAC,CAAC,EAAE;MACX2M,KAAK,EAAE;IACT;EACF;EACA,OAAOA,KAAK;AACd,CAAC,CACF","ignoreList":[]}
.opencode/node_modules/effect/dist/BigDecimal.d.ts CHANGED
The diff for this file is too large to render. See raw diff
 
.opencode/node_modules/effect/dist/BigDecimal.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"BigDecimal.d.ts","sourceRoot":"","sources":["../src/BigDecimal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,GAAG,MAAM,kBAAkB,CAAA;AAGvC,OAAO,EAAE,KAAK,WAAW,EAAqB,MAAM,kBAAkB,CAAA;AACtE,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,EAAE,KAAK,QAAQ,EAAiB,MAAM,eAAe,CAAA;AAM5D,QAAA,MAAM,MAAM,uBAAuB,CAAA;AAEnC;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,KAAK,EAAE,QAAQ,EAAE,WAAW;IACpE,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,MAAM,CAAA;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAGvB;AA6BD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,YAAY,GAAI,GAAG,OAAO,KAAG,CAAC,IAAI,UAAoC,CAAA;AAEnF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,IAAI,GAAI,OAAO,MAAM,EAAE,OAAO,MAAM,KAAG,UAKnD,CAAA;AA2BD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,SAAS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;;;;;;OA6BG;IACH,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,IAAI,EAAE,UAAU,KAAK,UAAU,CAAA;IACjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,UAAU,CAAA;CAS9C,CAAA"}
.opencode/node_modules/effect/dist/BigDecimal.js CHANGED
@@ -1,15 +1,9 @@
1
  /**
2
- * This module provides utility functions and type class instances for working with the `BigDecimal` type in TypeScript.
3
- * It includes functions for basic arithmetic operations.
4
- *
5
- * A `BigDecimal` allows storing any real number to arbitrary precision; which avoids common floating point errors
6
- * (such as 0.1 + 0.2 ≠ 0.3) at the cost of complexity.
7
- *
8
- * Internally, `BigDecimal` uses a `BigInt` object, paired with a 64-bit integer which determines the position of the
9
- * decimal point. Therefore, the precision *is not* actually arbitrary, but limited to 2<sup>63</sup> decimal places.
10
- *
11
- * It is not recommended to convert a floating point number to a decimal directly, as the floating point representation
12
- * may be unexpected.
13
  *
14
  * @since 2.0.0
15
  */
@@ -52,9 +46,14 @@ const BigDecimalProto = {
52
  }
53
  };
54
  /**
55
- * Checks if a given value is a `BigDecimal`.
 
 
 
 
 
 
56
  *
57
- * @example
58
  * ```ts
59
  * import { BigDecimal } from "effect"
60
  *
@@ -64,14 +63,20 @@ const BigDecimalProto = {
64
  * console.log(BigDecimal.isBigDecimal("123.45")) // false
65
  * ```
66
  *
67
- * @since 2.0.0
68
  * @category guards
 
69
  */
70
  export const isBigDecimal = u => hasProperty(u, TypeId);
71
  /**
72
  * Creates a `BigDecimal` from a `bigint` value and a scale.
73
  *
74
- * @example
 
 
 
 
 
 
75
  * ```ts
76
  * import { BigDecimal } from "effect"
77
  *
@@ -84,8 +89,10 @@ export const isBigDecimal = u => hasProperty(u, TypeId);
84
  * console.log(BigDecimal.format(integer)) // "42"
85
  * ```
86
  *
87
- * @since 2.0.0
 
88
  * @category constructors
 
89
  */
90
  export const make = (value, scale) => {
91
  const o = Object.create(BigDecimalProto);
@@ -118,23 +125,31 @@ const one = /*#__PURE__*/makeNormalizedUnsafe(bigint1, 0);
118
  /**
119
  * Normalizes a given `BigDecimal` by removing trailing zeros.
120
  *
121
- * @example
 
 
 
 
 
 
122
  * ```ts
123
- * import { fromStringUnsafe, make, normalize } from "effect/BigDecimal"
124
  * import * as assert from "node:assert"
125
  *
126
  * assert.deepStrictEqual(
127
- * normalize(fromStringUnsafe("123.00000")),
128
- * normalize(make(123n, 0))
129
  * )
130
  * assert.deepStrictEqual(
131
- * normalize(fromStringUnsafe("12300000")),
132
- * normalize(make(123n, -5))
133
  * )
134
  * ```
135
  *
136
- * @since 2.0.0
 
137
  * @category scaling
 
138
  */
139
  export const normalize = self => {
140
  if (self.normalized === undefined) {
@@ -161,12 +176,20 @@ export const normalize = self => {
161
  return self.normalized;
162
  };
163
  /**
164
- * Scales a given `BigDecimal` to the specified scale.
 
 
 
 
 
 
 
 
 
 
165
  *
166
- * If the given scale is smaller than the current scale, the value will be rounded down to
167
- * the nearest integer.
168
  *
169
- * @example
170
  * ```ts
171
  * import { BigDecimal } from "effect"
172
  *
@@ -181,8 +204,10 @@ export const normalize = self => {
181
  * console.log(BigDecimal.format(reduced)) // "123.4"
182
  * ```
183
  *
184
- * @since 2.0.0
 
185
  * @category scaling
 
186
  */
187
  export const scale = /*#__PURE__*/dual(2, (self, scale) => {
188
  if (scale > self.scale) {
@@ -196,19 +221,27 @@ export const scale = /*#__PURE__*/dual(2, (self, scale) => {
196
  /**
197
  * Provides an addition operation on `BigDecimal`s.
198
  *
199
- * @example
 
 
 
 
 
 
200
  * ```ts
201
- * import { fromStringUnsafe, sum } from "effect/BigDecimal"
202
  * import * as assert from "node:assert"
203
  *
204
  * assert.deepStrictEqual(
205
- * sum(fromStringUnsafe("2"), fromStringUnsafe("3")),
206
- * fromStringUnsafe("5")
207
  * )
208
  * ```
209
  *
210
- * @since 2.0.0
 
211
  * @category math
 
212
  */
213
  export const sum = /*#__PURE__*/dual(2, (self, that) => {
214
  if (that.value === bigint0) {
@@ -228,19 +261,27 @@ export const sum = /*#__PURE__*/dual(2, (self, that) => {
228
  /**
229
  * Takes an `Iterable` of `BigDecimal`s and returns their sum as a single `BigDecimal`.
230
  *
231
- * @example
 
 
 
 
 
 
232
  * ```ts
233
- * import { fromStringUnsafe, sumAll } from "effect/BigDecimal"
234
  * import * as assert from "node:assert"
235
  *
236
  * assert.deepStrictEqual(
237
- * sumAll([fromStringUnsafe("2"), fromStringUnsafe("3"), fromStringUnsafe("4")]),
238
- * fromStringUnsafe("9")
239
  * )
240
  * ```
241
  *
242
- * @since 4.0.0
 
243
  * @category math
 
244
  */
245
  export const sumAll = collection => {
246
  let out = zero;
@@ -252,19 +293,26 @@ export const sumAll = collection => {
252
  /**
253
  * Provides a multiplication operation on `BigDecimal`s.
254
  *
255
- * @example
 
 
 
 
 
256
  * ```ts
257
- * import { fromStringUnsafe, multiply } from "effect/BigDecimal"
258
  * import * as assert from "node:assert"
259
  *
260
  * assert.deepStrictEqual(
261
- * multiply(fromStringUnsafe("2"), fromStringUnsafe("3")),
262
- * fromStringUnsafe("6")
263
  * )
264
  * ```
265
  *
266
- * @since 2.0.0
 
267
  * @category math
 
268
  */
269
  export const multiply = /*#__PURE__*/dual(2, (self, that) => {
270
  if (that.value === bigint0 || self.value === bigint0) {
@@ -275,19 +323,26 @@ export const multiply = /*#__PURE__*/dual(2, (self, that) => {
275
  /**
276
  * Takes an `Iterable` of `BigDecimal`s and returns their multiplication as a single `BigDecimal`.
277
  *
278
- * @example
 
 
 
 
 
279
  * ```ts
280
- * import { fromStringUnsafe, multiplyAll } from "effect/BigDecimal"
281
  * import * as assert from "node:assert"
282
  *
283
  * assert.deepStrictEqual(
284
- * multiplyAll([fromStringUnsafe("2"), fromStringUnsafe("3"), fromStringUnsafe("4")]),
285
- * fromStringUnsafe("24")
286
  * )
287
  * ```
288
  *
289
- * @since 4.0.0
 
290
  * @category math
 
291
  */
292
  export const multiplyAll = collection => {
293
  let out = one;
@@ -302,19 +357,24 @@ export const multiplyAll = collection => {
302
  /**
303
  * Provides a subtraction operation on `BigDecimal`s.
304
  *
305
- * @example
 
 
 
 
 
306
  * ```ts
307
- * import { fromStringUnsafe, subtract } from "effect/BigDecimal"
308
  * import * as assert from "node:assert"
309
  *
310
  * assert.deepStrictEqual(
311
- * subtract(fromStringUnsafe("2"), fromStringUnsafe("3")),
312
- * fromStringUnsafe("-1")
313
  * )
314
  * ```
315
  *
316
- * @since 2.0.0
317
  * @category math
 
318
  */
319
  export const subtract = /*#__PURE__*/dual(2, (self, that) => {
320
  if (that.value === bigint0) {
@@ -384,43 +444,55 @@ export const roundTerminal = n => {
384
  return Number(`${n}`[pos]) < 5 ? bigint0 : bigint1;
385
  };
386
  /**
387
- * Provides a division operation on `BigDecimal`s.
388
  *
389
- * If the dividend is not a multiple of the divisor the result will be a `BigDecimal` value
390
- * which represents the integer division rounded down to the nearest integer.
391
  *
392
- * If the divisor is `0`, the result will be `Option.none()`.
 
 
 
 
 
 
 
 
 
393
  *
394
- * @example
395
  * ```ts
396
  * import { BigDecimal, Option } from "effect"
397
- * import * as assert from "node:assert"
398
  *
399
- * assert.deepStrictEqual(
400
- * BigDecimal.divide(
401
- * BigDecimal.fromStringUnsafe("6"),
402
- * BigDecimal.fromStringUnsafe("3")
403
- * ),
404
- * Option.some(BigDecimal.fromStringUnsafe("2"))
405
- * )
406
- * assert.deepStrictEqual(
407
- * BigDecimal.divide(
408
- * BigDecimal.fromStringUnsafe("6"),
409
- * BigDecimal.fromStringUnsafe("4")
410
- * ),
411
- * Option.some(BigDecimal.fromStringUnsafe("1.5"))
412
- * )
413
- * assert.deepStrictEqual(
414
- * BigDecimal.divide(
415
- * BigDecimal.fromStringUnsafe("6"),
416
- * BigDecimal.fromStringUnsafe("0")
417
- * ),
418
- * Option.none()
419
- * )
 
 
 
420
  * ```
421
  *
422
- * @since 2.0.0
 
 
423
  * @category math
 
424
  */
425
  export const divide = /*#__PURE__*/dual(2, (self, that) => {
426
  if (that.value === bigint0) {
@@ -438,28 +510,33 @@ export const divide = /*#__PURE__*/dual(2, (self, that) => {
438
  /**
439
  * Provides an unsafe division operation on `BigDecimal`s.
440
  *
441
- * If the dividend is not a multiple of the divisor the result will be a `BigDecimal` value
442
- * which represents the integer division rounded down to the nearest integer.
 
 
 
 
 
 
 
 
 
443
  *
444
  * Throws a `RangeError` if the divisor is `0`.
445
  *
446
- * @example
 
447
  * ```ts
448
- * import { divideUnsafe, fromStringUnsafe } from "effect/BigDecimal"
449
- * import * as assert from "node:assert"
450
  *
451
- * assert.deepStrictEqual(
452
- * divideUnsafe(fromStringUnsafe("6"), fromStringUnsafe("3")),
453
- * fromStringUnsafe("2")
454
- * )
455
- * assert.deepStrictEqual(
456
- * divideUnsafe(fromStringUnsafe("6"), fromStringUnsafe("4")),
457
- * fromStringUnsafe("1.5")
458
- * )
459
  * ```
460
  *
461
- * @since 2.0.0
 
462
  * @category math
 
463
  */
464
  export const divideUnsafe = /*#__PURE__*/dual(2, (self, that) => {
465
  if (that.value === bigint0) {
@@ -477,7 +554,13 @@ export const divideUnsafe = /*#__PURE__*/dual(2, (self, that) => {
477
  /**
478
  * Provides an `Order` instance for `BigDecimal` that allows comparing and sorting BigDecimal values.
479
  *
480
- * @example
 
 
 
 
 
 
481
  * ```ts
482
  * import { BigDecimal } from "effect"
483
  *
@@ -490,8 +573,8 @@ export const divideUnsafe = /*#__PURE__*/dual(2, (self, that) => {
490
  * console.log(BigDecimal.Order(a, c)) // 0 (a === c)
491
  * ```
492
  *
493
- * @since 2.0.0
494
  * @category instances
 
495
  */
496
  export const Order = /*#__PURE__*/order.make((self, that) => {
497
  const scmp = order.Number(sign(self), sign(that));
@@ -509,111 +592,136 @@ export const Order = /*#__PURE__*/order.make((self, that) => {
509
  /**
510
  * Returns `true` if the first argument is less than the second, otherwise `false`.
511
  *
512
- * @example
 
 
 
 
 
513
  * ```ts
514
- * import { fromStringUnsafe, isLessThan } from "effect/BigDecimal"
515
  * import * as assert from "node:assert"
516
  *
517
  * assert.deepStrictEqual(
518
- * isLessThan(fromStringUnsafe("2"), fromStringUnsafe("3")),
519
  * true
520
  * )
521
  * assert.deepStrictEqual(
522
- * isLessThan(fromStringUnsafe("3"), fromStringUnsafe("3")),
523
  * false
524
  * )
525
  * assert.deepStrictEqual(
526
- * isLessThan(fromStringUnsafe("4"), fromStringUnsafe("3")),
527
  * false
528
  * )
529
  * ```
530
  *
531
- * @since 2.0.0
532
  * @category predicates
 
533
  */
534
  export const isLessThan = /*#__PURE__*/order.isLessThan(Order);
535
  /**
536
- * Checks if a given `BigDecimal` is less than or equal to the provided one.
 
 
 
 
 
 
537
  *
538
- * @example
539
  * ```ts
540
- * import { fromStringUnsafe, isLessThanOrEqualTo } from "effect/BigDecimal"
541
  * import * as assert from "node:assert"
542
  *
543
  * assert.deepStrictEqual(
544
- * isLessThanOrEqualTo(fromStringUnsafe("2"), fromStringUnsafe("3")),
545
  * true
546
  * )
547
  * assert.deepStrictEqual(
548
- * isLessThanOrEqualTo(fromStringUnsafe("3"), fromStringUnsafe("3")),
549
  * true
550
  * )
551
  * assert.deepStrictEqual(
552
- * isLessThanOrEqualTo(fromStringUnsafe("4"), fromStringUnsafe("3")),
553
  * false
554
  * )
555
  * ```
556
  *
557
- * @since 2.0.0
558
  * @category predicates
 
559
  */
560
  export const isLessThanOrEqualTo = /*#__PURE__*/order.isLessThanOrEqualTo(Order);
561
  /**
562
  * Returns `true` if the first argument is greater than the second, otherwise `false`.
563
  *
564
- * @example
 
 
 
 
 
565
  * ```ts
566
- * import { fromStringUnsafe, isGreaterThan } from "effect/BigDecimal"
567
  * import * as assert from "node:assert"
568
  *
569
  * assert.deepStrictEqual(
570
- * isGreaterThan(fromStringUnsafe("2"), fromStringUnsafe("3")),
571
  * false
572
  * )
573
  * assert.deepStrictEqual(
574
- * isGreaterThan(fromStringUnsafe("3"), fromStringUnsafe("3")),
575
  * false
576
  * )
577
  * assert.deepStrictEqual(
578
- * isGreaterThan(fromStringUnsafe("4"), fromStringUnsafe("3")),
579
  * true
580
  * )
581
  * ```
582
  *
583
- * @since 2.0.0
584
  * @category predicates
 
585
  */
586
  export const isGreaterThan = /*#__PURE__*/order.isGreaterThan(Order);
587
  /**
588
- * Checks if a given `BigDecimal` is greater than or equal to the provided one.
 
 
 
 
 
 
589
  *
590
- * @example
591
  * ```ts
592
- * import { fromStringUnsafe, isGreaterThanOrEqualTo } from "effect/BigDecimal"
593
  * import * as assert from "node:assert"
594
  *
595
  * assert.deepStrictEqual(
596
- * isGreaterThanOrEqualTo(fromStringUnsafe("2"), fromStringUnsafe("3")),
597
  * false
598
  * )
599
  * assert.deepStrictEqual(
600
- * isGreaterThanOrEqualTo(fromStringUnsafe("3"), fromStringUnsafe("3")),
601
  * true
602
  * )
603
  * assert.deepStrictEqual(
604
- * isGreaterThanOrEqualTo(fromStringUnsafe("4"), fromStringUnsafe("3")),
605
  * true
606
  * )
607
  * ```
608
  *
609
- * @since 2.0.0
610
  * @category predicates
 
611
  */
612
  export const isGreaterThanOrEqualTo = /*#__PURE__*/order.isGreaterThanOrEqualTo(Order);
613
  /**
614
- * Checks if a `BigDecimal` is between a `minimum` and `maximum` value (inclusive).
 
 
 
 
 
 
615
  *
616
- * @example
617
  * ```ts
618
  * import { BigDecimal } from "effect"
619
  * import * as assert from "node:assert"
@@ -628,18 +736,27 @@ export const isGreaterThanOrEqualTo = /*#__PURE__*/order.isGreaterThanOrEqualTo(
628
  * assert.deepStrictEqual(between(BigDecimal.fromStringUnsafe("6")), false)
629
  * ```
630
  *
631
- * @since 2.0.0
 
632
  * @category predicates
 
633
  */
634
  export const between = /*#__PURE__*/order.isBetween(Order);
635
  /**
636
  * Restricts the given `BigDecimal` to be within the range specified by the `minimum` and `maximum` values.
637
  *
638
- * - If the `BigDecimal` is less than the `minimum` value, the function returns the `minimum` value.
639
- * - If the `BigDecimal` is greater than the `maximum` value, the function returns the `maximum` value.
640
- * - Otherwise, it returns the original `BigDecimal`.
 
 
 
 
 
 
 
 
641
  *
642
- * @example
643
  * ```ts
644
  * import { BigDecimal } from "effect"
645
  * import * as assert from "node:assert"
@@ -663,102 +780,142 @@ export const between = /*#__PURE__*/order.isBetween(Order);
663
  * )
664
  * ```
665
  *
666
- * @since 2.0.0
 
667
  * @category math
 
668
  */
669
  export const clamp = /*#__PURE__*/order.clamp(Order);
670
  /**
671
  * Returns the minimum between two `BigDecimal`s.
672
  *
673
- * @example
 
 
 
 
 
674
  * ```ts
675
- * import { fromStringUnsafe, min } from "effect/BigDecimal"
676
  * import * as assert from "node:assert"
677
  *
678
  * assert.deepStrictEqual(
679
- * min(fromStringUnsafe("2"), fromStringUnsafe("3")),
680
- * fromStringUnsafe("2")
681
  * )
682
  * ```
683
  *
684
- * @since 2.0.0
 
685
  * @category math
 
686
  */
687
  export const min = /*#__PURE__*/order.min(Order);
688
  /**
689
  * Returns the maximum between two `BigDecimal`s.
690
  *
691
- * @example
 
 
 
 
 
692
  * ```ts
693
- * import { fromStringUnsafe, max } from "effect/BigDecimal"
694
  * import * as assert from "node:assert"
695
  *
696
  * assert.deepStrictEqual(
697
- * max(fromStringUnsafe("2"), fromStringUnsafe("3")),
698
- * fromStringUnsafe("3")
699
  * )
700
  * ```
701
  *
702
- * @since 2.0.0
 
703
  * @category math
 
704
  */
705
  export const max = /*#__PURE__*/order.max(Order);
706
  /**
707
  * Determines the sign of a given `BigDecimal`.
708
  *
709
- * @example
 
 
 
 
 
710
  * ```ts
711
- * import { fromStringUnsafe, sign } from "effect/BigDecimal"
712
  * import * as assert from "node:assert"
713
  *
714
- * assert.deepStrictEqual(sign(fromStringUnsafe("-5")), -1)
715
- * assert.deepStrictEqual(sign(fromStringUnsafe("0")), 0)
716
- * assert.deepStrictEqual(sign(fromStringUnsafe("5")), 1)
717
  * ```
718
  *
719
- * @since 2.0.0
720
  * @category math
 
721
  */
722
  export const sign = n => n.value === bigint0 ? 0 : n.value < bigint0 ? -1 : 1;
723
  /**
724
  * Determines the absolute value of a given `BigDecimal`.
725
  *
726
- * @example
 
 
 
 
 
727
  * ```ts
728
- * import { abs, fromStringUnsafe } from "effect/BigDecimal"
729
  * import * as assert from "node:assert"
730
  *
731
- * assert.deepStrictEqual(abs(fromStringUnsafe("-5")), fromStringUnsafe("5"))
732
- * assert.deepStrictEqual(abs(fromStringUnsafe("0")), fromStringUnsafe("0"))
733
- * assert.deepStrictEqual(abs(fromStringUnsafe("5")), fromStringUnsafe("5"))
734
  * ```
735
  *
736
- * @since 2.0.0
737
  * @category math
 
738
  */
739
  export const abs = n => n.value < bigint0 ? make(-n.value, n.scale) : n;
740
  /**
741
  * Provides a negate operation on `BigDecimal`s.
742
  *
743
- * @example
 
 
 
 
 
744
  * ```ts
745
- * import { fromStringUnsafe, negate } from "effect/BigDecimal"
746
  * import * as assert from "node:assert"
747
  *
748
- * assert.deepStrictEqual(negate(fromStringUnsafe("3")), fromStringUnsafe("-3"))
749
- * assert.deepStrictEqual(negate(fromStringUnsafe("-6")), fromStringUnsafe("6"))
750
  * ```
751
  *
752
- * @since 2.0.0
753
  * @category math
 
754
  */
755
  export const negate = n => make(-n.value, n.scale);
756
  /**
757
- * Returns the remainder left over when one operand is divided by a second operand.
 
 
 
 
 
 
 
 
758
  *
759
  * If the divisor is `0`, the result will be `Option.none()`.
760
  *
761
- * @example
 
762
  * ```ts
763
  * import { BigDecimal, Option } from "effect"
764
  * import * as assert from "node:assert"
@@ -786,8 +943,11 @@ export const negate = n => make(-n.value, n.scale);
786
  * )
787
  * ```
788
  *
789
- * @since 2.0.0
 
 
790
  * @category math
 
791
  */
792
  export const remainder = /*#__PURE__*/dual(2, (self, divisor) => {
793
  if (divisor.value === bigint0) {
@@ -797,31 +957,42 @@ export const remainder = /*#__PURE__*/dual(2, (self, divisor) => {
797
  return Option.some(make(scale(self, max).value % scale(divisor, max).value, max));
798
  });
799
  /**
800
- * Returns the remainder left over when one operand is divided by a second operand.
 
 
 
 
 
 
 
 
801
  *
802
  * Throws a `RangeError` if the divisor is `0`.
803
  *
804
- * @example
 
805
  * ```ts
806
- * import { fromStringUnsafe, remainderUnsafe } from "effect/BigDecimal"
807
  * import * as assert from "node:assert"
808
  *
809
  * assert.deepStrictEqual(
810
- * remainderUnsafe(fromStringUnsafe("2"), fromStringUnsafe("2")),
811
- * fromStringUnsafe("0")
812
  * )
813
  * assert.deepStrictEqual(
814
- * remainderUnsafe(fromStringUnsafe("3"), fromStringUnsafe("2")),
815
- * fromStringUnsafe("1")
816
  * )
817
  * assert.deepStrictEqual(
818
- * remainderUnsafe(fromStringUnsafe("-4"), fromStringUnsafe("2")),
819
- * fromStringUnsafe("0")
820
  * )
821
  * ```
822
  *
823
- * @since 2.0.0
 
824
  * @category math
 
825
  */
826
  export const remainderUnsafe = /*#__PURE__*/dual(2, (self, divisor) => {
827
  if (divisor.value === bigint0) {
@@ -833,13 +1004,19 @@ export const remainderUnsafe = /*#__PURE__*/dual(2, (self, divisor) => {
833
  /**
834
  * Provides an `Equivalence` instance for `BigDecimal` that determines equality between BigDecimal values.
835
  *
836
- * @example
 
 
 
 
 
 
837
  * ```ts
838
  * import { BigDecimal } from "effect"
839
  *
840
- * const a = BigDecimal.fromNumberUnsafe(1.50)
841
- * const b = BigDecimal.fromNumberUnsafe(1.5)
842
- * const c = BigDecimal.fromNumberUnsafe(2.0)
843
  *
844
  * console.log(BigDecimal.Equivalence(a, b)) // true (1.50 === 1.5)
845
  * console.log(BigDecimal.Equivalence(a, c)) // false (1.50 !== 2.0)
@@ -858,28 +1035,40 @@ export const Equivalence = /*#__PURE__*/Equ.make((self, that) => {
858
  return self.value === that.value;
859
  });
860
  /**
861
- * Checks if two `BigDecimal`s are equal.
 
 
 
 
 
 
862
  *
863
- * @example
864
  * ```ts
865
  * import { BigDecimal } from "effect"
866
  *
867
- * const a = BigDecimal.fromNumberUnsafe(1.5)
868
- * const b = BigDecimal.fromNumberUnsafe(1.50)
869
- * const c = BigDecimal.fromNumberUnsafe(2.0)
870
  *
871
  * console.log(BigDecimal.equals(a, b)) // true
872
  * console.log(BigDecimal.equals(a, c)) // false
873
  * ```
874
  *
875
- * @since 2.0.0
 
876
  * @category predicates
 
877
  */
878
  export const equals = /*#__PURE__*/dual(2, (self, that) => Equivalence(self, that));
879
  /**
880
  * Creates a `BigDecimal` from a `bigint` value.
881
  *
882
- * @example
 
 
 
 
 
883
  * ```ts
884
  * import { BigDecimal } from "effect"
885
  *
@@ -890,42 +1079,63 @@ export const equals = /*#__PURE__*/dual(2, (self, that) => Equivalence(self, tha
890
  * console.log(BigDecimal.format(largeBigInt)) // "9007199254740991"
891
  * ```
892
  *
893
- * @since 2.0.0
 
894
  * @category constructors
 
895
  */
896
  export const fromBigInt = n => make(n, 0);
897
  /**
898
- * Creates a `BigDecimal` from a `number` value.
 
 
 
 
 
 
 
899
  *
900
- * It is not recommended to convert a floating point number to a decimal directly,
901
- * as the floating point representation may be unexpected.
 
902
  *
903
- * Throws a `RangeError` if the number is not finite (`NaN`, `+Infinity` or `-Infinity`).
904
  *
905
- * @example
906
  * ```ts
907
- * import { fromNumberUnsafe, make } from "effect/BigDecimal"
908
  * import * as assert from "node:assert"
909
  *
910
- * assert.deepStrictEqual(fromNumberUnsafe(123), make(123n, 0))
911
- * assert.deepStrictEqual(fromNumberUnsafe(123.456), make(123456n, 3))
912
  * ```
913
  *
914
- * @since 4.0.0
 
915
  * @category constructors
 
916
  */
917
  export const fromNumberUnsafe = n => {
918
  return Option.getOrThrowWith(fromNumber(n), () => new RangeError(`Number must be finite, got ${n}`));
919
  };
920
  /**
921
- * Creates a `BigDecimal` from a `number` value.
 
 
922
  *
923
- * It is not recommended to convert a floating point number to a decimal directly,
924
- * as the floating point representation may be unexpected.
 
 
925
  *
926
  * Returns `Option.none()` for `NaN`, `+Infinity` or `-Infinity`.
927
  *
928
- * @example
 
 
 
 
 
 
929
  * ```ts
930
  * import { BigDecimal, Option } from "effect"
931
  * import * as assert from "node:assert"
@@ -938,8 +1148,11 @@ export const fromNumberUnsafe = n => {
938
  * assert.deepStrictEqual(BigDecimal.fromNumber(Infinity), Option.none())
939
  * ```
940
  *
941
- * @since 4.0.0
 
 
942
  * @category constructors
 
943
  */
944
  export const fromNumber = n => {
945
  if (!Number.isFinite(n)) {
@@ -953,9 +1166,20 @@ export const fromNumber = n => {
953
  return Option.some(make(BigInt(`${lead}${trail}`), trail.length));
954
  };
955
  /**
956
- * Parses a numerical `string` into a `BigDecimal`.
 
 
 
 
 
 
 
 
 
 
 
 
957
  *
958
- * @example
959
  * ```ts
960
  * import { BigDecimal, Option } from "effect"
961
  * import * as assert from "node:assert"
@@ -968,8 +1192,11 @@ export const fromNumber = n => {
968
  * assert.deepStrictEqual(BigDecimal.fromString("123.abc"), Option.none())
969
  * ```
970
  *
971
- * @since 2.0.0
 
 
972
  * @category constructors
 
973
  */
974
  export const fromString = s => {
975
  if (s === "") {
@@ -1011,42 +1238,65 @@ export const fromString = s => {
1011
  return Option.some(make(BigInt(digits), scale));
1012
  };
1013
  /**
1014
- * Parses a numerical `string` into a `BigDecimal`.
 
 
 
 
 
 
 
 
 
 
 
 
1015
  *
1016
- * @example
1017
  * ```ts
1018
- * import { fromStringUnsafe, make } from "effect/BigDecimal"
1019
  * import * as assert from "node:assert"
1020
  *
1021
- * assert.deepStrictEqual(fromStringUnsafe("123"), make(123n, 0))
1022
- * assert.deepStrictEqual(fromStringUnsafe("123.456"), make(123456n, 3))
1023
- * assert.throws(() => fromStringUnsafe("123.abc"))
1024
  * ```
1025
  *
1026
- * @since 2.0.0
 
1027
  * @category constructors
 
1028
  */
1029
  export const fromStringUnsafe = s => {
1030
  return Option.getOrThrowWith(fromString(s), () => new Error(`Invalid numerical string: ${s}`));
1031
  };
1032
  /**
1033
- * Formats a given `BigDecimal` as a `string`.
 
 
 
 
 
 
 
 
 
 
1034
  *
1035
- * If the scale of the `BigDecimal` is greater than or equal to 16, the `BigDecimal` will
1036
- * be formatted in scientific notation.
1037
  *
1038
- * @example
1039
  * ```ts
1040
- * import { format, fromStringUnsafe } from "effect/BigDecimal"
1041
  * import * as assert from "node:assert"
1042
  *
1043
- * assert.deepStrictEqual(format(fromStringUnsafe("-5")), "-5")
1044
- * assert.deepStrictEqual(format(fromStringUnsafe("123.456")), "123.456")
1045
- * assert.deepStrictEqual(format(fromStringUnsafe("-0.00000123")), "-0.00000123")
1046
  * ```
1047
  *
 
 
 
1048
  * @since 2.0.0
1049
- * @category conversions
1050
  */
1051
  export const format = n => {
1052
  const normalized = normalize(n);
@@ -1077,16 +1327,23 @@ export const format = n => {
1077
  /**
1078
  * Formats a given `BigDecimal` as a `string` in scientific notation.
1079
  *
1080
- * @example
 
 
 
 
 
1081
  * ```ts
1082
- * import { make, toExponential } from "effect/BigDecimal"
1083
  * import * as assert from "node:assert"
1084
  *
1085
- * assert.deepStrictEqual(toExponential(make(123456n, -5)), "1.23456e+10")
1086
  * ```
1087
  *
1088
- * @since 4.0.0
1089
- * @category conversions
 
 
1090
  */
1091
  export const toExponential = n => {
1092
  if (isZero(n)) {
@@ -1104,110 +1361,151 @@ export const toExponential = n => {
1104
  return `${output}e${exp >= 0 ? "+" : ""}${exp}`;
1105
  };
1106
  /**
1107
- * Converts a `BigDecimal` to a `number`.
 
 
 
 
 
1108
  *
1109
- * This function will produce incorrect results if the `BigDecimal` exceeds the 64-bit range of a `number`.
 
 
 
 
 
 
1110
  *
1111
- * @example
1112
  * ```ts
1113
- * import { fromStringUnsafe, toNumberUnsafe } from "effect/BigDecimal"
1114
  * import * as assert from "node:assert"
1115
  *
1116
- * assert.deepStrictEqual(toNumberUnsafe(fromStringUnsafe("123.456")), 123.456)
1117
  * ```
1118
  *
1119
- * @since 2.0.0
1120
- * @category conversions
 
 
1121
  */
1122
  export const toNumberUnsafe = n => Number(format(n));
1123
  /**
1124
- * Checks if a given `BigDecimal` is an integer.
 
 
 
 
 
 
1125
  *
1126
- * @example
1127
  * ```ts
1128
- * import { fromStringUnsafe, isInteger } from "effect/BigDecimal"
1129
  * import * as assert from "node:assert"
1130
  *
1131
- * assert.deepStrictEqual(isInteger(fromStringUnsafe("0")), true)
1132
- * assert.deepStrictEqual(isInteger(fromStringUnsafe("1")), true)
1133
- * assert.deepStrictEqual(isInteger(fromStringUnsafe("1.1")), false)
1134
  * ```
1135
  *
1136
- * @since 2.0.0
1137
  * @category predicates
 
1138
  */
1139
  export const isInteger = n => normalize(n).scale <= 0;
1140
  /**
1141
- * Checks if a given `BigDecimal` is `0`.
 
 
 
 
 
 
1142
  *
1143
- * @example
1144
  * ```ts
1145
- * import { fromStringUnsafe, isZero } from "effect/BigDecimal"
1146
  * import * as assert from "node:assert"
1147
  *
1148
- * assert.deepStrictEqual(isZero(fromStringUnsafe("0")), true)
1149
- * assert.deepStrictEqual(isZero(fromStringUnsafe("1")), false)
1150
  * ```
1151
  *
1152
- * @since 2.0.0
1153
  * @category predicates
 
1154
  */
1155
  export const isZero = n => n.value === bigint0;
1156
  /**
1157
- * Checks if a given `BigDecimal` is negative.
 
 
 
 
 
 
1158
  *
1159
- * @example
1160
  * ```ts
1161
- * import { fromStringUnsafe, isNegative } from "effect/BigDecimal"
1162
  * import * as assert from "node:assert"
1163
  *
1164
- * assert.deepStrictEqual(isNegative(fromStringUnsafe("-1")), true)
1165
- * assert.deepStrictEqual(isNegative(fromStringUnsafe("0")), false)
1166
- * assert.deepStrictEqual(isNegative(fromStringUnsafe("1")), false)
1167
  * ```
1168
  *
1169
- * @since 2.0.0
1170
  * @category predicates
 
1171
  */
1172
  export const isNegative = n => n.value < bigint0;
1173
  /**
1174
- * Checks if a given `BigDecimal` is positive.
 
 
 
 
 
 
1175
  *
1176
- * @example
1177
  * ```ts
1178
- * import { fromStringUnsafe, isPositive } from "effect/BigDecimal"
1179
  * import * as assert from "node:assert"
1180
  *
1181
- * assert.deepStrictEqual(isPositive(fromStringUnsafe("-1")), false)
1182
- * assert.deepStrictEqual(isPositive(fromStringUnsafe("0")), false)
1183
- * assert.deepStrictEqual(isPositive(fromStringUnsafe("1")), true)
1184
  * ```
1185
  *
1186
- * @since 2.0.0
1187
  * @category predicates
 
1188
  */
1189
  export const isPositive = n => n.value > bigint0;
1190
  const isBigDecimalArgs = args => isBigDecimal(args[0]);
1191
  /**
1192
- * Rounds a `BigDecimal` at the given scale with the specified rounding mode.
 
 
 
 
 
 
1193
  *
1194
- * @example
1195
  * ```ts
1196
- * import { fromStringUnsafe, round } from "effect/BigDecimal"
1197
  * import * as assert from "node:assert"
1198
  *
1199
  * assert.deepStrictEqual(
1200
- * round(fromStringUnsafe("145"), { mode: "from-zero", scale: -1 }),
1201
- * fromStringUnsafe("150")
1202
  * )
1203
  * assert.deepStrictEqual(
1204
- * round(fromStringUnsafe("-14.5")),
1205
- * fromStringUnsafe("-15")
1206
  * )
1207
  * ```
1208
  *
1209
- * @since 4.0.0
 
 
 
1210
  * @category math
 
1211
  */
1212
  export const round = /*#__PURE__*/dual(isBigDecimalArgs, (self, options) => {
1213
  const mode = options?.mode ?? "half-from-zero";
@@ -1241,25 +1539,29 @@ export const round = /*#__PURE__*/dual(isBigDecimalArgs, (self, options) => {
1241
  }
1242
  });
1243
  /**
1244
- * Truncate a `BigDecimal` at the given scale. This is the same operation as rounding away from zero.
 
 
 
 
 
 
 
 
1245
  *
1246
- * @example
1247
  * ```ts
1248
- * import { fromStringUnsafe, truncate } from "effect/BigDecimal"
1249
- * import * as assert from "node:assert"
1250
  *
1251
- * assert.deepStrictEqual(
1252
- * truncate(fromStringUnsafe("145"), -1),
1253
- * fromStringUnsafe("140")
1254
- * )
1255
- * assert.deepStrictEqual(
1256
- * truncate(fromStringUnsafe("-14.5")),
1257
- * fromStringUnsafe("-14")
1258
- * )
1259
  * ```
1260
  *
1261
- * @since 4.0.0
 
 
 
1262
  * @category math
 
1263
  */
1264
  export const truncate = /*#__PURE__*/dual(isBigDecimalArgs, (self, scale = 0) => {
1265
  if (self.scale <= scale) {
@@ -1269,22 +1571,37 @@ export const truncate = /*#__PURE__*/dual(isBigDecimalArgs, (self, scale = 0) =>
1269
  return make(self.value / bigint10 ** BigInt(self.scale - scale), scale);
1270
  });
1271
  /**
1272
- * Calculate the ceiling of a `BigDecimal` at the given scale.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1273
  *
1274
- * @example
1275
  * ```ts
1276
- * import { ceil, fromStringUnsafe } from "effect/BigDecimal"
1277
  * import * as assert from "node:assert"
1278
  *
1279
  * assert.deepStrictEqual(
1280
- * ceil(fromStringUnsafe("145"), -1),
1281
- * fromStringUnsafe("150")
1282
  * )
1283
- * assert.deepStrictEqual(ceil(fromStringUnsafe("-14.5")), fromStringUnsafe("-14"))
1284
  * ```
1285
  *
1286
- * @since 4.0.0
1287
  * @category math
 
1288
  */
1289
  export const ceil = /*#__PURE__*/dual(isBigDecimalArgs, (self, scale = 0) => {
1290
  const truncated = truncate(self, scale);
@@ -1308,25 +1625,34 @@ export const digitAt = /*#__PURE__*/dual(2, (self, scale) => {
1308
  return scaled % bigint10;
1309
  });
1310
  /**
1311
- * Calculate the floor of a `BigDecimal` at the given scale.
 
 
 
 
 
 
1312
  *
1313
- * @example
1314
  * ```ts
1315
- * import { floor, fromStringUnsafe } from "effect/BigDecimal"
1316
  * import * as assert from "node:assert"
1317
  *
1318
  * assert.deepStrictEqual(
1319
- * floor(fromStringUnsafe("145"), -1),
1320
- * fromStringUnsafe("140")
1321
  * )
1322
  * assert.deepStrictEqual(
1323
- * floor(fromStringUnsafe("-14.5")),
1324
- * fromStringUnsafe("-15")
1325
  * )
1326
  * ```
1327
  *
1328
- * @since 4.0.0
 
 
 
1329
  * @category math
 
1330
  */
1331
  export const floor = /*#__PURE__*/dual(isBigDecimalArgs, (self, scale = 0) => {
1332
  const truncated = truncate(self, scale);
 
1
  /**
2
+ * Decimal numbers and arithmetic for cases where JavaScript `number` rounding
3
+ * is not precise enough. A `BigDecimal` stores digits as a `bigint` plus a
4
+ * decimal scale, which lets the module parse, compare, add, subtract, multiply,
5
+ * divide, round, and format decimal values such as money, quantities, and
6
+ * measurements.
 
 
 
 
 
 
7
  *
8
  * @since 2.0.0
9
  */
 
46
  }
47
  };
48
  /**
49
+ * Checks whether a given value is a `BigDecimal`.
50
+ *
51
+ * **When to use**
52
+ *
53
+ * Use to validate unknown input and narrow it to `BigDecimal`.
54
+ *
55
+ * **Example** (Checking BigDecimal values)
56
  *
 
57
  * ```ts
58
  * import { BigDecimal } from "effect"
59
  *
 
63
  * console.log(BigDecimal.isBigDecimal("123.45")) // false
64
  * ```
65
  *
 
66
  * @category guards
67
+ * @since 2.0.0
68
  */
69
  export const isBigDecimal = u => hasProperty(u, TypeId);
70
  /**
71
  * Creates a `BigDecimal` from a `bigint` value and a scale.
72
  *
73
+ * **When to use**
74
+ *
75
+ * Use to construct a decimal directly from its unscaled integer value and
76
+ * decimal scale.
77
+ *
78
+ * **Example** (Creating decimals from bigint and scale)
79
+ *
80
  * ```ts
81
  * import { BigDecimal } from "effect"
82
  *
 
89
  * console.log(BigDecimal.format(integer)) // "42"
90
  * ```
91
  *
92
+ * @see {@link fromBigInt} for constructing an integer decimal from a `bigint`
93
+ *
94
  * @category constructors
95
+ * @since 2.0.0
96
  */
97
  export const make = (value, scale) => {
98
  const o = Object.create(BigDecimalProto);
 
125
  /**
126
  * Normalizes a given `BigDecimal` by removing trailing zeros.
127
  *
128
+ * **When to use**
129
+ *
130
+ * Use to canonicalize decimals that have equivalent values but different
131
+ * internal scales.
132
+ *
133
+ * **Example** (Normalizing trailing zeros)
134
+ *
135
  * ```ts
136
+ * import { BigDecimal } from "effect"
137
  * import * as assert from "node:assert"
138
  *
139
  * assert.deepStrictEqual(
140
+ * BigDecimal.normalize(BigDecimal.fromStringUnsafe("123.00000")),
141
+ * BigDecimal.normalize(BigDecimal.make(123n, 0))
142
  * )
143
  * assert.deepStrictEqual(
144
+ * BigDecimal.normalize(BigDecimal.fromStringUnsafe("12300000")),
145
+ * BigDecimal.normalize(BigDecimal.make(123n, -5))
146
  * )
147
  * ```
148
  *
149
+ * @see {@link format} for rendering normalized decimals as strings
150
+ *
151
  * @category scaling
152
+ * @since 2.0.0
153
  */
154
  export const normalize = self => {
155
  if (self.normalized === undefined) {
 
176
  return self.normalized;
177
  };
178
  /**
179
+ * Changes a `BigDecimal` to the specified scale.
180
+ *
181
+ * **When to use**
182
+ *
183
+ * Use to change how many decimal places are represented by a `BigDecimal`.
184
+ *
185
+ * **Details**
186
+ *
187
+ * Increasing the scale appends decimal zeros. Decreasing the scale discards
188
+ * digits beyond the target scale by `bigint` division, which truncates toward
189
+ * zero.
190
  *
191
+ * **Example** (Scaling decimal precision)
 
192
  *
 
193
  * ```ts
194
  * import { BigDecimal } from "effect"
195
  *
 
204
  * console.log(BigDecimal.format(reduced)) // "123.4"
205
  * ```
206
  *
207
+ * @see {@link round} for changing scale with configurable rounding
208
+ *
209
  * @category scaling
210
+ * @since 2.0.0
211
  */
212
  export const scale = /*#__PURE__*/dual(2, (self, scale) => {
213
  if (scale > self.scale) {
 
221
  /**
222
  * Provides an addition operation on `BigDecimal`s.
223
  *
224
+ * **When to use**
225
+ *
226
+ * Use when you need a decimal addition function for piping or higher-order APIs
227
+ * while preserving decimal precision.
228
+ *
229
+ * **Example** (Adding decimals)
230
+ *
231
  * ```ts
232
+ * import { BigDecimal } from "effect"
233
  * import * as assert from "node:assert"
234
  *
235
  * assert.deepStrictEqual(
236
+ * BigDecimal.sum(BigDecimal.fromStringUnsafe("2"), BigDecimal.fromStringUnsafe("3")),
237
+ * BigDecimal.fromStringUnsafe("5")
238
  * )
239
  * ```
240
  *
241
+ * @see {@link sumAll} for summing an iterable of `BigDecimal` values
242
+ *
243
  * @category math
244
+ * @since 2.0.0
245
  */
246
  export const sum = /*#__PURE__*/dual(2, (self, that) => {
247
  if (that.value === bigint0) {
 
261
  /**
262
  * Takes an `Iterable` of `BigDecimal`s and returns their sum as a single `BigDecimal`.
263
  *
264
+ * **When to use**
265
+ *
266
+ * Use when you need to aggregate decimal quantities with decimal precision
267
+ * instead of converting through JavaScript numbers.
268
+ *
269
+ * **Example** (Adding multiple decimals)
270
+ *
271
  * ```ts
272
+ * import { BigDecimal } from "effect"
273
  * import * as assert from "node:assert"
274
  *
275
  * assert.deepStrictEqual(
276
+ * BigDecimal.sumAll([BigDecimal.fromStringUnsafe("2"), BigDecimal.fromStringUnsafe("3"), BigDecimal.fromStringUnsafe("4")]),
277
+ * BigDecimal.fromStringUnsafe("9")
278
  * )
279
  * ```
280
  *
281
+ * @see {@link sum} for adding two `BigDecimal` values
282
+ *
283
  * @category math
284
+ * @since 3.16.0
285
  */
286
  export const sumAll = collection => {
287
  let out = zero;
 
293
  /**
294
  * Provides a multiplication operation on `BigDecimal`s.
295
  *
296
+ * **When to use**
297
+ *
298
+ * Use to multiply two `BigDecimal` values.
299
+ *
300
+ * **Example** (Multiplying decimals)
301
+ *
302
  * ```ts
303
+ * import { BigDecimal } from "effect"
304
  * import * as assert from "node:assert"
305
  *
306
  * assert.deepStrictEqual(
307
+ * BigDecimal.multiply(BigDecimal.fromStringUnsafe("2"), BigDecimal.fromStringUnsafe("3")),
308
+ * BigDecimal.fromStringUnsafe("6")
309
  * )
310
  * ```
311
  *
312
+ * @see {@link multiplyAll} for multiplying an iterable of `BigDecimal` values
313
+ *
314
  * @category math
315
+ * @since 2.0.0
316
  */
317
  export const multiply = /*#__PURE__*/dual(2, (self, that) => {
318
  if (that.value === bigint0 || self.value === bigint0) {
 
323
  /**
324
  * Takes an `Iterable` of `BigDecimal`s and returns their multiplication as a single `BigDecimal`.
325
  *
326
+ * **When to use**
327
+ *
328
+ * Use to multiply all `BigDecimal` values in an iterable.
329
+ *
330
+ * **Example** (Multiplying multiple decimals)
331
+ *
332
  * ```ts
333
+ * import { BigDecimal } from "effect"
334
  * import * as assert from "node:assert"
335
  *
336
  * assert.deepStrictEqual(
337
+ * BigDecimal.multiplyAll([BigDecimal.fromStringUnsafe("2"), BigDecimal.fromStringUnsafe("3"), BigDecimal.fromStringUnsafe("4")]),
338
+ * BigDecimal.fromStringUnsafe("24")
339
  * )
340
  * ```
341
  *
342
+ * @see {@link multiply} for multiplying two `BigDecimal` values
343
+ *
344
  * @category math
345
+ * @since 4.0.0
346
  */
347
  export const multiplyAll = collection => {
348
  let out = one;
 
357
  /**
358
  * Provides a subtraction operation on `BigDecimal`s.
359
  *
360
+ * **When to use**
361
+ *
362
+ * Use to subtract one `BigDecimal` value from another.
363
+ *
364
+ * **Example** (Subtracting decimals)
365
+ *
366
  * ```ts
367
+ * import { BigDecimal } from "effect"
368
  * import * as assert from "node:assert"
369
  *
370
  * assert.deepStrictEqual(
371
+ * BigDecimal.subtract(BigDecimal.fromStringUnsafe("2"), BigDecimal.fromStringUnsafe("3")),
372
+ * BigDecimal.fromStringUnsafe("-1")
373
  * )
374
  * ```
375
  *
 
376
  * @category math
377
+ * @since 2.0.0
378
  */
379
  export const subtract = /*#__PURE__*/dual(2, (self, that) => {
380
  if (that.value === bigint0) {
 
444
  return Number(`${n}`[pos]) < 5 ? bigint0 : bigint1;
445
  };
446
  /**
447
+ * Divides `BigDecimal`s safely.
448
  *
449
+ * **When to use**
 
450
  *
451
+ * Use to divide `BigDecimal` values while representing division by zero as
452
+ * `Option.none`.
453
+ *
454
+ * **Details**
455
+ *
456
+ * If the dividend is not a multiple of the divisor, the result will be a `BigDecimal` value
457
+ * with up to the default division precision. If the divisor is `0`, the result
458
+ * will be `Option.none()`.
459
+ *
460
+ * **Example** (Dividing decimals safely)
461
  *
 
462
  * ```ts
463
  * import { BigDecimal, Option } from "effect"
 
464
  *
465
+ * console.log(
466
+ * Option.getOrThrow(
467
+ * BigDecimal.divide(
468
+ * BigDecimal.fromStringUnsafe("6"),
469
+ * BigDecimal.fromStringUnsafe("3")
470
+ * )
471
+ * )
472
+ * ) // BigDecimal(2)
473
+ * console.log(
474
+ * Option.getOrThrow(
475
+ * BigDecimal.divide(
476
+ * BigDecimal.fromStringUnsafe("6"),
477
+ * BigDecimal.fromStringUnsafe("4")
478
+ * )
479
+ * )
480
+ * ) // BigDecimal(1.5)
481
+ * console.log(
482
+ * Option.isNone(
483
+ * BigDecimal.divide(
484
+ * BigDecimal.fromStringUnsafe("6"),
485
+ * BigDecimal.fromStringUnsafe("0")
486
+ * )
487
+ * )
488
+ * ) // true
489
  * ```
490
  *
491
+ * @see {@link divideUnsafe} for division that throws when the divisor is zero
492
+ * @see {@link remainder} for the decimal remainder operation
493
+ *
494
  * @category math
495
+ * @since 2.0.0
496
  */
497
  export const divide = /*#__PURE__*/dual(2, (self, that) => {
498
  if (that.value === bigint0) {
 
510
  /**
511
  * Provides an unsafe division operation on `BigDecimal`s.
512
  *
513
+ * **When to use**
514
+ *
515
+ * Use when you need to divide `BigDecimal` values where the divisor is known
516
+ * to be non-zero, so division by zero should be a thrown exception.
517
+ *
518
+ * **Details**
519
+ *
520
+ * If the dividend is not a multiple of the divisor, the result will be a `BigDecimal` value
521
+ * with up to the default division precision.
522
+ *
523
+ * **Gotchas**
524
  *
525
  * Throws a `RangeError` if the divisor is `0`.
526
  *
527
+ * **Example** (Dividing decimals unsafely)
528
+ *
529
  * ```ts
530
+ * import { BigDecimal } from "effect"
 
531
  *
532
+ * console.log(BigDecimal.divideUnsafe(BigDecimal.fromStringUnsafe("6"), BigDecimal.fromStringUnsafe("3"))) // BigDecimal(2)
533
+ * console.log(BigDecimal.divideUnsafe(BigDecimal.fromStringUnsafe("6"), BigDecimal.fromStringUnsafe("4"))) // BigDecimal(1.5)
 
 
 
 
 
 
534
  * ```
535
  *
536
+ * @see {@link divide} for division that returns `Option.none` when the divisor is zero
537
+ *
538
  * @category math
539
+ * @since 4.0.0
540
  */
541
  export const divideUnsafe = /*#__PURE__*/dual(2, (self, that) => {
542
  if (that.value === bigint0) {
 
554
  /**
555
  * Provides an `Order` instance for `BigDecimal` that allows comparing and sorting BigDecimal values.
556
  *
557
+ * **When to use**
558
+ *
559
+ * Use when you need to sort or compare decimal values through APIs that accept
560
+ * an ordering instance.
561
+ *
562
+ * **Example** (Comparing decimals)
563
+ *
564
  * ```ts
565
  * import { BigDecimal } from "effect"
566
  *
 
573
  * console.log(BigDecimal.Order(a, c)) // 0 (a === c)
574
  * ```
575
  *
 
576
  * @category instances
577
+ * @since 2.0.0
578
  */
579
  export const Order = /*#__PURE__*/order.make((self, that) => {
580
  const scmp = order.Number(sign(self), sign(that));
 
592
  /**
593
  * Returns `true` if the first argument is less than the second, otherwise `false`.
594
  *
595
+ * **When to use**
596
+ *
597
+ * Use to test whether one `BigDecimal` is strictly less than another.
598
+ *
599
+ * **Example** (Checking less-than comparisons)
600
+ *
601
  * ```ts
602
+ * import { BigDecimal } from "effect"
603
  * import * as assert from "node:assert"
604
  *
605
  * assert.deepStrictEqual(
606
+ * BigDecimal.isLessThan(BigDecimal.fromStringUnsafe("2"), BigDecimal.fromStringUnsafe("3")),
607
  * true
608
  * )
609
  * assert.deepStrictEqual(
610
+ * BigDecimal.isLessThan(BigDecimal.fromStringUnsafe("3"), BigDecimal.fromStringUnsafe("3")),
611
  * false
612
  * )
613
  * assert.deepStrictEqual(
614
+ * BigDecimal.isLessThan(BigDecimal.fromStringUnsafe("4"), BigDecimal.fromStringUnsafe("3")),
615
  * false
616
  * )
617
  * ```
618
  *
 
619
  * @category predicates
620
+ * @since 4.0.0
621
  */
622
  export const isLessThan = /*#__PURE__*/order.isLessThan(Order);
623
  /**
624
+ * Checks whether a given `BigDecimal` is less than or equal to the provided one.
625
+ *
626
+ * **When to use**
627
+ *
628
+ * Use to test whether one `BigDecimal` is less than or equal to another.
629
+ *
630
+ * **Example** (Checking less-than-or-equal comparisons)
631
  *
 
632
  * ```ts
633
+ * import { BigDecimal } from "effect"
634
  * import * as assert from "node:assert"
635
  *
636
  * assert.deepStrictEqual(
637
+ * BigDecimal.isLessThanOrEqualTo(BigDecimal.fromStringUnsafe("2"), BigDecimal.fromStringUnsafe("3")),
638
  * true
639
  * )
640
  * assert.deepStrictEqual(
641
+ * BigDecimal.isLessThanOrEqualTo(BigDecimal.fromStringUnsafe("3"), BigDecimal.fromStringUnsafe("3")),
642
  * true
643
  * )
644
  * assert.deepStrictEqual(
645
+ * BigDecimal.isLessThanOrEqualTo(BigDecimal.fromStringUnsafe("4"), BigDecimal.fromStringUnsafe("3")),
646
  * false
647
  * )
648
  * ```
649
  *
 
650
  * @category predicates
651
+ * @since 4.0.0
652
  */
653
  export const isLessThanOrEqualTo = /*#__PURE__*/order.isLessThanOrEqualTo(Order);
654
  /**
655
  * Returns `true` if the first argument is greater than the second, otherwise `false`.
656
  *
657
+ * **When to use**
658
+ *
659
+ * Use to test whether one `BigDecimal` is strictly greater than another.
660
+ *
661
+ * **Example** (Checking greater-than comparisons)
662
+ *
663
  * ```ts
664
+ * import { BigDecimal } from "effect"
665
  * import * as assert from "node:assert"
666
  *
667
  * assert.deepStrictEqual(
668
+ * BigDecimal.isGreaterThan(BigDecimal.fromStringUnsafe("2"), BigDecimal.fromStringUnsafe("3")),
669
  * false
670
  * )
671
  * assert.deepStrictEqual(
672
+ * BigDecimal.isGreaterThan(BigDecimal.fromStringUnsafe("3"), BigDecimal.fromStringUnsafe("3")),
673
  * false
674
  * )
675
  * assert.deepStrictEqual(
676
+ * BigDecimal.isGreaterThan(BigDecimal.fromStringUnsafe("4"), BigDecimal.fromStringUnsafe("3")),
677
  * true
678
  * )
679
  * ```
680
  *
 
681
  * @category predicates
682
+ * @since 4.0.0
683
  */
684
  export const isGreaterThan = /*#__PURE__*/order.isGreaterThan(Order);
685
  /**
686
+ * Checks whether a given `BigDecimal` is greater than or equal to the provided one.
687
+ *
688
+ * **When to use**
689
+ *
690
+ * Use to test whether one `BigDecimal` is greater than or equal to another.
691
+ *
692
+ * **Example** (Checking greater-than-or-equal comparisons)
693
  *
 
694
  * ```ts
695
+ * import { BigDecimal } from "effect"
696
  * import * as assert from "node:assert"
697
  *
698
  * assert.deepStrictEqual(
699
+ * BigDecimal.isGreaterThanOrEqualTo(BigDecimal.fromStringUnsafe("2"), BigDecimal.fromStringUnsafe("3")),
700
  * false
701
  * )
702
  * assert.deepStrictEqual(
703
+ * BigDecimal.isGreaterThanOrEqualTo(BigDecimal.fromStringUnsafe("3"), BigDecimal.fromStringUnsafe("3")),
704
  * true
705
  * )
706
  * assert.deepStrictEqual(
707
+ * BigDecimal.isGreaterThanOrEqualTo(BigDecimal.fromStringUnsafe("4"), BigDecimal.fromStringUnsafe("3")),
708
  * true
709
  * )
710
  * ```
711
  *
 
712
  * @category predicates
713
+ * @since 4.0.0
714
  */
715
  export const isGreaterThanOrEqualTo = /*#__PURE__*/order.isGreaterThanOrEqualTo(Order);
716
  /**
717
+ * Checks whether a `BigDecimal` is between a `minimum` and `maximum` value (inclusive).
718
+ *
719
+ * **When to use**
720
+ *
721
+ * Use to test whether a `BigDecimal` falls inside an inclusive range.
722
+ *
723
+ * **Example** (Checking decimal ranges)
724
  *
 
725
  * ```ts
726
  * import { BigDecimal } from "effect"
727
  * import * as assert from "node:assert"
 
736
  * assert.deepStrictEqual(between(BigDecimal.fromStringUnsafe("6")), false)
737
  * ```
738
  *
739
+ * @see {@link clamp} for forcing a `BigDecimal` into an inclusive range
740
+ *
741
  * @category predicates
742
+ * @since 2.0.0
743
  */
744
  export const between = /*#__PURE__*/order.isBetween(Order);
745
  /**
746
  * Restricts the given `BigDecimal` to be within the range specified by the `minimum` and `maximum` values.
747
  *
748
+ * **When to use**
749
+ *
750
+ * Use to force a `BigDecimal` into an inclusive range.
751
+ *
752
+ * **Details**
753
+ *
754
+ * If the `BigDecimal` is less than the `minimum` value, the function returns
755
+ * the `minimum` value. If it is greater than the `maximum` value, the function
756
+ * returns the `maximum` value. Otherwise, it returns the original `BigDecimal`.
757
+ *
758
+ * **Example** (Clamping decimals to a range)
759
  *
 
760
  * ```ts
761
  * import { BigDecimal } from "effect"
762
  * import * as assert from "node:assert"
 
780
  * )
781
  * ```
782
  *
783
+ * @see {@link between} for checking whether a `BigDecimal` is already inside a range
784
+ *
785
  * @category math
786
+ * @since 2.0.0
787
  */
788
  export const clamp = /*#__PURE__*/order.clamp(Order);
789
  /**
790
  * Returns the minimum between two `BigDecimal`s.
791
  *
792
+ * **When to use**
793
+ *
794
+ * Use to select the smaller of two `BigDecimal` values.
795
+ *
796
+ * **Example** (Selecting the smaller decimal)
797
+ *
798
  * ```ts
799
+ * import { BigDecimal } from "effect"
800
  * import * as assert from "node:assert"
801
  *
802
  * assert.deepStrictEqual(
803
+ * BigDecimal.min(BigDecimal.fromStringUnsafe("2"), BigDecimal.fromStringUnsafe("3")),
804
+ * BigDecimal.fromStringUnsafe("2")
805
  * )
806
  * ```
807
  *
808
+ * @see {@link max} for selecting the larger value
809
+ *
810
  * @category math
811
+ * @since 2.0.0
812
  */
813
  export const min = /*#__PURE__*/order.min(Order);
814
  /**
815
  * Returns the maximum between two `BigDecimal`s.
816
  *
817
+ * **When to use**
818
+ *
819
+ * Use to select the larger of two `BigDecimal` values.
820
+ *
821
+ * **Example** (Selecting the larger decimal)
822
+ *
823
  * ```ts
824
+ * import { BigDecimal } from "effect"
825
  * import * as assert from "node:assert"
826
  *
827
  * assert.deepStrictEqual(
828
+ * BigDecimal.max(BigDecimal.fromStringUnsafe("2"), BigDecimal.fromStringUnsafe("3")),
829
+ * BigDecimal.fromStringUnsafe("3")
830
  * )
831
  * ```
832
  *
833
+ * @see {@link min} for selecting the smaller value
834
+ *
835
  * @category math
836
+ * @since 2.0.0
837
  */
838
  export const max = /*#__PURE__*/order.max(Order);
839
  /**
840
  * Determines the sign of a given `BigDecimal`.
841
  *
842
+ * **When to use**
843
+ *
844
+ * Use to classify a `BigDecimal` as negative, zero, or positive.
845
+ *
846
+ * **Example** (Reading decimal signs)
847
+ *
848
  * ```ts
849
+ * import { BigDecimal } from "effect"
850
  * import * as assert from "node:assert"
851
  *
852
+ * assert.deepStrictEqual(BigDecimal.sign(BigDecimal.fromStringUnsafe("-5")), -1)
853
+ * assert.deepStrictEqual(BigDecimal.sign(BigDecimal.fromStringUnsafe("0")), 0)
854
+ * assert.deepStrictEqual(BigDecimal.sign(BigDecimal.fromStringUnsafe("5")), 1)
855
  * ```
856
  *
 
857
  * @category math
858
+ * @since 2.0.0
859
  */
860
  export const sign = n => n.value === bigint0 ? 0 : n.value < bigint0 ? -1 : 1;
861
  /**
862
  * Determines the absolute value of a given `BigDecimal`.
863
  *
864
+ * **When to use**
865
+ *
866
+ * Use to remove the sign from a `BigDecimal` while preserving its magnitude.
867
+ *
868
+ * **Example** (Calculating absolute values)
869
+ *
870
  * ```ts
871
+ * import { BigDecimal } from "effect"
872
  * import * as assert from "node:assert"
873
  *
874
+ * assert.deepStrictEqual(BigDecimal.abs(BigDecimal.fromStringUnsafe("-5")), BigDecimal.fromStringUnsafe("5"))
875
+ * assert.deepStrictEqual(BigDecimal.abs(BigDecimal.fromStringUnsafe("0")), BigDecimal.fromStringUnsafe("0"))
876
+ * assert.deepStrictEqual(BigDecimal.abs(BigDecimal.fromStringUnsafe("5")), BigDecimal.fromStringUnsafe("5"))
877
  * ```
878
  *
 
879
  * @category math
880
+ * @since 2.0.0
881
  */
882
  export const abs = n => n.value < bigint0 ? make(-n.value, n.scale) : n;
883
  /**
884
  * Provides a negate operation on `BigDecimal`s.
885
  *
886
+ * **When to use**
887
+ *
888
+ * Use to flip the sign of a `BigDecimal`.
889
+ *
890
+ * **Example** (Negating decimals)
891
+ *
892
  * ```ts
893
+ * import { BigDecimal } from "effect"
894
  * import * as assert from "node:assert"
895
  *
896
+ * assert.deepStrictEqual(BigDecimal.negate(BigDecimal.fromStringUnsafe("3")), BigDecimal.fromStringUnsafe("-3"))
897
+ * assert.deepStrictEqual(BigDecimal.negate(BigDecimal.fromStringUnsafe("-6")), BigDecimal.fromStringUnsafe("6"))
898
  * ```
899
  *
 
900
  * @category math
901
+ * @since 2.0.0
902
  */
903
  export const negate = n => make(-n.value, n.scale);
904
  /**
905
+ * Computes the decimal remainder safely when one operand is divided by a second
906
+ * operand.
907
+ *
908
+ * **When to use**
909
+ *
910
+ * Use to compute a decimal remainder while representing division by zero as
911
+ * `Option.none`.
912
+ *
913
+ * **Details**
914
  *
915
  * If the divisor is `0`, the result will be `Option.none()`.
916
  *
917
+ * **Example** (Computing remainders safely)
918
+ *
919
  * ```ts
920
  * import { BigDecimal, Option } from "effect"
921
  * import * as assert from "node:assert"
 
943
  * )
944
  * ```
945
  *
946
+ * @see {@link remainderUnsafe} for remainder calculation that throws when the divisor is zero
947
+ * @see {@link divide} for decimal quotient calculation
948
+ *
949
  * @category math
950
+ * @since 2.0.0
951
  */
952
  export const remainder = /*#__PURE__*/dual(2, (self, divisor) => {
953
  if (divisor.value === bigint0) {
 
957
  return Option.some(make(scale(self, max).value % scale(divisor, max).value, max));
958
  });
959
  /**
960
+ * Returns the decimal remainder left over when one operand is divided by a
961
+ * non-zero second operand.
962
+ *
963
+ * **When to use**
964
+ *
965
+ * Use when you need to compute a `BigDecimal` remainder with a divisor known to
966
+ * be non-zero and want a plain `BigDecimal` result instead of an `Option`.
967
+ *
968
+ * **Gotchas**
969
  *
970
  * Throws a `RangeError` if the divisor is `0`.
971
  *
972
+ * **Example** (Computing remainders unsafely)
973
+ *
974
  * ```ts
975
+ * import { BigDecimal } from "effect"
976
  * import * as assert from "node:assert"
977
  *
978
  * assert.deepStrictEqual(
979
+ * BigDecimal.remainderUnsafe(BigDecimal.fromStringUnsafe("2"), BigDecimal.fromStringUnsafe("2")),
980
+ * BigDecimal.fromStringUnsafe("0")
981
  * )
982
  * assert.deepStrictEqual(
983
+ * BigDecimal.remainderUnsafe(BigDecimal.fromStringUnsafe("3"), BigDecimal.fromStringUnsafe("2")),
984
+ * BigDecimal.fromStringUnsafe("1")
985
  * )
986
  * assert.deepStrictEqual(
987
+ * BigDecimal.remainderUnsafe(BigDecimal.fromStringUnsafe("-4"), BigDecimal.fromStringUnsafe("2")),
988
+ * BigDecimal.fromStringUnsafe("0")
989
  * )
990
  * ```
991
  *
992
+ * @see {@link remainder} for returning `Option.none` when the divisor is zero
993
+ *
994
  * @category math
995
+ * @since 4.0.0
996
  */
997
  export const remainderUnsafe = /*#__PURE__*/dual(2, (self, divisor) => {
998
  if (divisor.value === bigint0) {
 
1004
  /**
1005
  * Provides an `Equivalence` instance for `BigDecimal` that determines equality between BigDecimal values.
1006
  *
1007
+ * **When to use**
1008
+ *
1009
+ * Use when comparing decimal values through APIs that accept an equivalence
1010
+ * relation.
1011
+ *
1012
+ * **Example** (Checking decimal equivalence)
1013
+ *
1014
  * ```ts
1015
  * import { BigDecimal } from "effect"
1016
  *
1017
+ * const a = BigDecimal.fromStringUnsafe("1.50")
1018
+ * const b = BigDecimal.fromStringUnsafe("1.5")
1019
+ * const c = BigDecimal.fromStringUnsafe("2.0")
1020
  *
1021
  * console.log(BigDecimal.Equivalence(a, b)) // true (1.50 === 1.5)
1022
  * console.log(BigDecimal.Equivalence(a, c)) // false (1.50 !== 2.0)
 
1035
  return self.value === that.value;
1036
  });
1037
  /**
1038
+ * Checks whether two `BigDecimal`s are equal.
1039
+ *
1040
+ * **When to use**
1041
+ *
1042
+ * Use to compare two `BigDecimal` values for numeric equality.
1043
+ *
1044
+ * **Example** (Checking decimal equality)
1045
  *
 
1046
  * ```ts
1047
  * import { BigDecimal } from "effect"
1048
  *
1049
+ * const a = BigDecimal.fromStringUnsafe("1.5")
1050
+ * const b = BigDecimal.fromStringUnsafe("1.50")
1051
+ * const c = BigDecimal.fromStringUnsafe("2.0")
1052
  *
1053
  * console.log(BigDecimal.equals(a, b)) // true
1054
  * console.log(BigDecimal.equals(a, c)) // false
1055
  * ```
1056
  *
1057
+ * @see {@link Equivalence} for passing decimal equality to APIs that require an `Equivalence`
1058
+ *
1059
  * @category predicates
1060
+ * @since 2.0.0
1061
  */
1062
  export const equals = /*#__PURE__*/dual(2, (self, that) => Equivalence(self, that));
1063
  /**
1064
  * Creates a `BigDecimal` from a `bigint` value.
1065
  *
1066
+ * **When to use**
1067
+ *
1068
+ * Use to construct an integer `BigDecimal` from a `bigint`.
1069
+ *
1070
+ * **Example** (Creating decimals from bigint)
1071
+ *
1072
  * ```ts
1073
  * import { BigDecimal } from "effect"
1074
  *
 
1079
  * console.log(BigDecimal.format(largeBigInt)) // "9007199254740991"
1080
  * ```
1081
  *
1082
+ * @see {@link make} for constructing a decimal with an explicit scale
1083
+ *
1084
  * @category constructors
1085
+ * @since 2.0.0
1086
  */
1087
  export const fromBigInt = n => make(n, 0);
1088
  /**
1089
+ * Creates a `BigDecimal` from a finite `number`.
1090
+ *
1091
+ * **When to use**
1092
+ *
1093
+ * Use when you need to convert a trusted finite JavaScript number to a
1094
+ * `BigDecimal` and want a plain result instead of an `Option`.
1095
+ *
1096
+ * **Gotchas**
1097
  *
1098
+ * It is not recommended to convert a floating point number to a decimal
1099
+ * directly, as the floating point representation may be unexpected. Throws a
1100
+ * `RangeError` if the number is not finite (`NaN`, `+Infinity` or `-Infinity`).
1101
  *
1102
+ * **Example** (Creating decimals from finite numbers)
1103
  *
 
1104
  * ```ts
1105
+ * import { BigDecimal } from "effect"
1106
  * import * as assert from "node:assert"
1107
  *
1108
+ * assert.deepStrictEqual(BigDecimal.fromNumberUnsafe(123), BigDecimal.make(123n, 0))
1109
+ * assert.deepStrictEqual(BigDecimal.fromNumberUnsafe(123.456), BigDecimal.make(123456n, 3))
1110
  * ```
1111
  *
1112
+ * @see {@link fromNumber} for returning `Option.none` when the number is not finite
1113
+ *
1114
  * @category constructors
1115
+ * @since 4.0.0
1116
  */
1117
  export const fromNumberUnsafe = n => {
1118
  return Option.getOrThrowWith(fromNumber(n), () => new RangeError(`Number must be finite, got ${n}`));
1119
  };
1120
  /**
1121
+ * Creates a `BigDecimal` safely from a finite `number`.
1122
+ *
1123
+ * **When to use**
1124
  *
1125
+ * Use to convert a finite JavaScript number to a `BigDecimal` without throwing
1126
+ * on invalid input.
1127
+ *
1128
+ * **Details**
1129
  *
1130
  * Returns `Option.none()` for `NaN`, `+Infinity` or `-Infinity`.
1131
  *
1132
+ * **Gotchas**
1133
+ *
1134
+ * It is not recommended to convert a floating point number to a decimal
1135
+ * directly, as the floating point representation may be unexpected.
1136
+ *
1137
+ * **Example** (Creating decimals from numbers safely)
1138
+ *
1139
  * ```ts
1140
  * import { BigDecimal, Option } from "effect"
1141
  * import * as assert from "node:assert"
 
1148
  * assert.deepStrictEqual(BigDecimal.fromNumber(Infinity), Option.none())
1149
  * ```
1150
  *
1151
+ * @see {@link fromNumberUnsafe} for throwing when the number is not finite
1152
+ * @see {@link fromString} for parsing decimal strings directly
1153
+ *
1154
  * @category constructors
1155
+ * @since 2.0.0
1156
  */
1157
  export const fromNumber = n => {
1158
  if (!Number.isFinite(n)) {
 
1166
  return Option.some(make(BigInt(`${lead}${trail}`), trail.length));
1167
  };
1168
  /**
1169
+ * Parses a decimal string into a `BigDecimal` safely.
1170
+ *
1171
+ * **When to use**
1172
+ *
1173
+ * Use to parse external decimal text without throwing on invalid input.
1174
+ *
1175
+ * **Details**
1176
+ *
1177
+ * Returns `Option.some` for valid decimal or exponent notation and
1178
+ * `Option.none` when the string cannot be parsed or would produce an unsafe
1179
+ * scale. The empty string parses as zero.
1180
+ *
1181
+ * **Example** (Parsing decimal strings safely)
1182
  *
 
1183
  * ```ts
1184
  * import { BigDecimal, Option } from "effect"
1185
  * import * as assert from "node:assert"
 
1192
  * assert.deepStrictEqual(BigDecimal.fromString("123.abc"), Option.none())
1193
  * ```
1194
  *
1195
+ * @see {@link fromStringUnsafe} for parsing that throws on invalid input
1196
+ * @see {@link fromNumber} for converting finite JavaScript numbers
1197
+ *
1198
  * @category constructors
1199
+ * @since 2.0.0
1200
  */
1201
  export const fromString = s => {
1202
  if (s === "") {
 
1238
  return Option.some(make(BigInt(digits), scale));
1239
  };
1240
  /**
1241
+ * Parses a decimal string into a `BigDecimal`, throwing if the string is
1242
+ * invalid.
1243
+ *
1244
+ * **When to use**
1245
+ *
1246
+ * Use when you expect decimal text to be valid and want parse errors to throw.
1247
+ *
1248
+ * **Details**
1249
+ *
1250
+ * Accepts the same syntax as `fromString`. Use `fromString` when invalid input
1251
+ * should be represented as `Option.none` instead of throwing.
1252
+ *
1253
+ * **Example** (Parsing decimal strings unsafely)
1254
  *
 
1255
  * ```ts
1256
+ * import { BigDecimal } from "effect"
1257
  * import * as assert from "node:assert"
1258
  *
1259
+ * assert.deepStrictEqual(BigDecimal.fromStringUnsafe("123"), BigDecimal.make(123n, 0))
1260
+ * assert.deepStrictEqual(BigDecimal.fromStringUnsafe("123.456"), BigDecimal.make(123456n, 3))
1261
+ * assert.throws(() => BigDecimal.fromStringUnsafe("123.abc"))
1262
  * ```
1263
  *
1264
+ * @see {@link fromString} for returning `Option.none` on invalid input
1265
+ *
1266
  * @category constructors
1267
+ * @since 4.0.0
1268
  */
1269
  export const fromStringUnsafe = s => {
1270
  return Option.getOrThrowWith(fromString(s), () => new Error(`Invalid numerical string: ${s}`));
1271
  };
1272
  /**
1273
+ * Formats a `BigDecimal` as a string.
1274
+ *
1275
+ * **When to use**
1276
+ *
1277
+ * Use to render a `BigDecimal` as plain decimal text when possible.
1278
+ *
1279
+ * **Details**
1280
+ *
1281
+ * The value is normalized before formatting. Scientific notation is used when
1282
+ * the absolute value of the normalized scale is at least `16`; otherwise plain
1283
+ * decimal notation is used.
1284
  *
1285
+ * **Example** (Formatting decimals)
 
1286
  *
 
1287
  * ```ts
1288
+ * import { BigDecimal } from "effect"
1289
  * import * as assert from "node:assert"
1290
  *
1291
+ * assert.deepStrictEqual(BigDecimal.format(BigDecimal.fromStringUnsafe("-5")), "-5")
1292
+ * assert.deepStrictEqual(BigDecimal.format(BigDecimal.fromStringUnsafe("123.456")), "123.456")
1293
+ * assert.deepStrictEqual(BigDecimal.format(BigDecimal.fromStringUnsafe("-0.00000123")), "-0.00000123")
1294
  * ```
1295
  *
1296
+ * @see {@link toExponential} for always rendering scientific notation
1297
+ *
1298
+ * @category converting
1299
  * @since 2.0.0
 
1300
  */
1301
  export const format = n => {
1302
  const normalized = normalize(n);
 
1327
  /**
1328
  * Formats a given `BigDecimal` as a `string` in scientific notation.
1329
  *
1330
+ * **When to use**
1331
+ *
1332
+ * Use to render a `BigDecimal` in scientific notation.
1333
+ *
1334
+ * **Example** (Formatting decimals exponentially)
1335
+ *
1336
  * ```ts
1337
+ * import { BigDecimal } from "effect"
1338
  * import * as assert from "node:assert"
1339
  *
1340
+ * assert.deepStrictEqual(BigDecimal.toExponential(BigDecimal.make(123456n, -5)), "1.23456e+10")
1341
  * ```
1342
  *
1343
+ * @see {@link format} for plain decimal formatting when possible
1344
+ *
1345
+ * @category converting
1346
+ * @since 3.11.0
1347
  */
1348
  export const toExponential = n => {
1349
  if (isZero(n)) {
 
1361
  return `${output}e${exp >= 0 ? "+" : ""}${exp}`;
1362
  };
1363
  /**
1364
+ * Converts a `BigDecimal` to a JavaScript `number`.
1365
+ *
1366
+ * **When to use**
1367
+ *
1368
+ * Use when you need a JavaScript number at an interop boundary where precision
1369
+ * loss is acceptable.
1370
  *
1371
+ * **Gotchas**
1372
+ *
1373
+ * This conversion is unsafe because the result can lose integer or fractional
1374
+ * precision, round to a nearby representable value, or become `Infinity` when
1375
+ * the decimal cannot be represented as a finite JavaScript `number`.
1376
+ *
1377
+ * **Example** (Converting decimals to numbers)
1378
  *
 
1379
  * ```ts
1380
+ * import { BigDecimal } from "effect"
1381
  * import * as assert from "node:assert"
1382
  *
1383
+ * assert.deepStrictEqual(BigDecimal.toNumberUnsafe(BigDecimal.fromStringUnsafe("123.456")), 123.456)
1384
  * ```
1385
  *
1386
+ * @see {@link format} for preserving decimal precision as text
1387
+ *
1388
+ * @category converting
1389
+ * @since 4.0.0
1390
  */
1391
  export const toNumberUnsafe = n => Number(format(n));
1392
  /**
1393
+ * Checks whether a given `BigDecimal` is an integer.
1394
+ *
1395
+ * **When to use**
1396
+ *
1397
+ * Use to test whether a `BigDecimal` has no fractional decimal part.
1398
+ *
1399
+ * **Example** (Checking integer decimals)
1400
  *
 
1401
  * ```ts
1402
+ * import { BigDecimal } from "effect"
1403
  * import * as assert from "node:assert"
1404
  *
1405
+ * assert.deepStrictEqual(BigDecimal.isInteger(BigDecimal.fromStringUnsafe("0")), true)
1406
+ * assert.deepStrictEqual(BigDecimal.isInteger(BigDecimal.fromStringUnsafe("1")), true)
1407
+ * assert.deepStrictEqual(BigDecimal.isInteger(BigDecimal.fromStringUnsafe("1.1")), false)
1408
  * ```
1409
  *
 
1410
  * @category predicates
1411
+ * @since 2.0.0
1412
  */
1413
  export const isInteger = n => normalize(n).scale <= 0;
1414
  /**
1415
+ * Checks whether a given `BigDecimal` is `0`.
1416
+ *
1417
+ * **When to use**
1418
+ *
1419
+ * Use to test whether a `BigDecimal` is exactly zero.
1420
+ *
1421
+ * **Example** (Checking zero decimals)
1422
  *
 
1423
  * ```ts
1424
+ * import { BigDecimal } from "effect"
1425
  * import * as assert from "node:assert"
1426
  *
1427
+ * assert.deepStrictEqual(BigDecimal.isZero(BigDecimal.fromStringUnsafe("0")), true)
1428
+ * assert.deepStrictEqual(BigDecimal.isZero(BigDecimal.fromStringUnsafe("1")), false)
1429
  * ```
1430
  *
 
1431
  * @category predicates
1432
+ * @since 2.0.0
1433
  */
1434
  export const isZero = n => n.value === bigint0;
1435
  /**
1436
+ * Checks whether a given `BigDecimal` is negative.
1437
+ *
1438
+ * **When to use**
1439
+ *
1440
+ * Use to test whether a `BigDecimal` is less than zero.
1441
+ *
1442
+ * **Example** (Checking negative decimals)
1443
  *
 
1444
  * ```ts
1445
+ * import { BigDecimal } from "effect"
1446
  * import * as assert from "node:assert"
1447
  *
1448
+ * assert.deepStrictEqual(BigDecimal.isNegative(BigDecimal.fromStringUnsafe("-1")), true)
1449
+ * assert.deepStrictEqual(BigDecimal.isNegative(BigDecimal.fromStringUnsafe("0")), false)
1450
+ * assert.deepStrictEqual(BigDecimal.isNegative(BigDecimal.fromStringUnsafe("1")), false)
1451
  * ```
1452
  *
 
1453
  * @category predicates
1454
+ * @since 2.0.0
1455
  */
1456
  export const isNegative = n => n.value < bigint0;
1457
  /**
1458
+ * Checks whether a given `BigDecimal` is positive.
1459
+ *
1460
+ * **When to use**
1461
+ *
1462
+ * Use to test whether a `BigDecimal` is greater than zero.
1463
+ *
1464
+ * **Example** (Checking positive decimals)
1465
  *
 
1466
  * ```ts
1467
+ * import { BigDecimal } from "effect"
1468
  * import * as assert from "node:assert"
1469
  *
1470
+ * assert.deepStrictEqual(BigDecimal.isPositive(BigDecimal.fromStringUnsafe("-1")), false)
1471
+ * assert.deepStrictEqual(BigDecimal.isPositive(BigDecimal.fromStringUnsafe("0")), false)
1472
+ * assert.deepStrictEqual(BigDecimal.isPositive(BigDecimal.fromStringUnsafe("1")), true)
1473
  * ```
1474
  *
 
1475
  * @category predicates
1476
+ * @since 2.0.0
1477
  */
1478
  export const isPositive = n => n.value > bigint0;
1479
  const isBigDecimalArgs = args => isBigDecimal(args[0]);
1480
  /**
1481
+ * Computes a rounded `BigDecimal` at the given scale with the specified rounding mode.
1482
+ *
1483
+ * **When to use**
1484
+ *
1485
+ * Use to round a decimal at a requested scale with an explicit rounding mode.
1486
+ *
1487
+ * **Example** (Rounding decimals)
1488
  *
 
1489
  * ```ts
1490
+ * import { BigDecimal } from "effect"
1491
  * import * as assert from "node:assert"
1492
  *
1493
  * assert.deepStrictEqual(
1494
+ * BigDecimal.round(BigDecimal.fromStringUnsafe("145"), { mode: "from-zero", scale: -1 }),
1495
+ * BigDecimal.fromStringUnsafe("150")
1496
  * )
1497
  * assert.deepStrictEqual(
1498
+ * BigDecimal.round(BigDecimal.fromStringUnsafe("-14.5")),
1499
+ * BigDecimal.fromStringUnsafe("-15")
1500
  * )
1501
  * ```
1502
  *
1503
+ * @see {@link ceil} for fixed rounding toward positive infinity
1504
+ * @see {@link floor} for fixed rounding toward negative infinity
1505
+ * @see {@link truncate} for fixed rounding toward zero
1506
+ *
1507
  * @category math
1508
+ * @since 3.16.0
1509
  */
1510
  export const round = /*#__PURE__*/dual(isBigDecimalArgs, (self, options) => {
1511
  const mode = options?.mode ?? "half-from-zero";
 
1539
  }
1540
  });
1541
  /**
1542
+ * Computes a truncated `BigDecimal` at the given scale. This removes fractional digits beyond the scale,
1543
+ * rounding toward zero.
1544
+ *
1545
+ * **When to use**
1546
+ *
1547
+ * Use when you need to discard fractional digits beyond a scale rather than
1548
+ * round half up, half down, or toward an infinity.
1549
+ *
1550
+ * **Example** (Truncating decimals)
1551
  *
 
1552
  * ```ts
1553
+ * import { BigDecimal } from "effect"
 
1554
  *
1555
+ * console.log(BigDecimal.truncate(BigDecimal.fromStringUnsafe("145"), -1)) // BigDecimal(140)
1556
+ * console.log(BigDecimal.truncate(BigDecimal.fromStringUnsafe("-14.5"))) // BigDecimal(-14)
 
 
 
 
 
 
1557
  * ```
1558
  *
1559
+ * @see {@link round} for configurable rounding modes
1560
+ * @see {@link ceil} for rounding toward positive infinity
1561
+ * @see {@link floor} for rounding toward negative infinity
1562
+ *
1563
  * @category math
1564
+ * @since 3.16.0
1565
  */
1566
  export const truncate = /*#__PURE__*/dual(isBigDecimalArgs, (self, scale = 0) => {
1567
  if (self.scale <= scale) {
 
1571
  return make(self.value / bigint10 ** BigInt(self.scale - scale), scale);
1572
  });
1573
  /**
1574
+ * Computes the ceiling of a `BigDecimal` at the given scale.
1575
+ *
1576
+ * **When to use**
1577
+ *
1578
+ * Use to round a decimal toward positive infinity at a requested scale.
1579
+ *
1580
+ * **Details**
1581
+ *
1582
+ * The default scale is `0`. Positive scales keep digits to the right of the
1583
+ * decimal point, and negative scales round positions to the left of the decimal
1584
+ * point.
1585
+ *
1586
+ * @see {@link floor} for rounding toward negative infinity
1587
+ * @see {@link truncate} for rounding toward zero
1588
+ * @see {@link round} for configurable rounding modes
1589
+ *
1590
+ * **Example** (Rounding decimals up)
1591
  *
 
1592
  * ```ts
1593
+ * import { BigDecimal } from "effect"
1594
  * import * as assert from "node:assert"
1595
  *
1596
  * assert.deepStrictEqual(
1597
+ * BigDecimal.ceil(BigDecimal.fromStringUnsafe("145"), -1),
1598
+ * BigDecimal.fromStringUnsafe("150")
1599
  * )
1600
+ * assert.deepStrictEqual(BigDecimal.ceil(BigDecimal.fromStringUnsafe("-14.5")), BigDecimal.fromStringUnsafe("-14"))
1601
  * ```
1602
  *
 
1603
  * @category math
1604
+ * @since 3.16.0
1605
  */
1606
  export const ceil = /*#__PURE__*/dual(isBigDecimalArgs, (self, scale = 0) => {
1607
  const truncated = truncate(self, scale);
 
1625
  return scaled % bigint10;
1626
  });
1627
  /**
1628
+ * Computes the floor of a `BigDecimal` at the given scale.
1629
+ *
1630
+ * **When to use**
1631
+ *
1632
+ * Use to round a decimal toward negative infinity at a requested scale.
1633
+ *
1634
+ * **Example** (Rounding decimals down)
1635
  *
 
1636
  * ```ts
1637
+ * import { BigDecimal } from "effect"
1638
  * import * as assert from "node:assert"
1639
  *
1640
  * assert.deepStrictEqual(
1641
+ * BigDecimal.floor(BigDecimal.fromStringUnsafe("145"), -1),
1642
+ * BigDecimal.fromStringUnsafe("140")
1643
  * )
1644
  * assert.deepStrictEqual(
1645
+ * BigDecimal.floor(BigDecimal.fromStringUnsafe("-14.5")),
1646
+ * BigDecimal.fromStringUnsafe("-15")
1647
  * )
1648
  * ```
1649
  *
1650
+ * @see {@link ceil} for rounding toward positive infinity
1651
+ * @see {@link truncate} for rounding toward zero
1652
+ * @see {@link round} for configurable rounding modes
1653
+ *
1654
  * @category math
1655
+ * @since 3.16.0
1656
  */
1657
  export const floor = /*#__PURE__*/dual(isBigDecimalArgs, (self, scale = 0) => {
1658
  const truncated = truncate(self, scale);
.opencode/node_modules/effect/dist/BigDecimal.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"BigDecimal.js","names":["Equal","Equ","dual","Hash","NodeInspectSymbol","Option","order","pipeArguments","hasProperty","DEFAULT_PRECISION","FINITE_INT_REGEXP","TypeId","BigDecimalProto","symbol","normalized","normalize","combine","hash","value","number","scale","that","isBigDecimal","equals","toString","format","toJSON","_id","String","pipe","arguments","u","make","o","Object","create","makeNormalizedUnsafe","bigint0","bigint10","RangeError","BigInt","bigint1","bigint_1","bigint2","bigint5","bigint_5","zero","one","self","undefined","digits","trail","i","length","substring","sum","sumAll","collection","out","n","multiply","multiplyAll","subtract","divideWithPrecision","num","den","precision","numNegative","denNegative","negateResult","quotient","remainder","count","q","r","roundTerminal","pos","Number","divide","none","some","divideUnsafe","Order","scmp","sign","isLessThan","isLessThanOrEqualTo","isGreaterThan","isGreaterThanOrEqualTo","between","isBetween","clamp","min","max","abs","negate","divisor","Math","remainderUnsafe","Equivalence","fromBigInt","fromNumberUnsafe","getOrThrowWith","fromNumber","isFinite","string","includes","fromString","lead","split","s","base","exp","seperator","search","slice","isSafeInteger","test","offset","dot","fromStringUnsafe","Error","toExponential","negative","absolute","before","after","repeat","location","zeros","complete","isZero","head","tail","output","isNegative","toNumberUnsafe","isInteger","isPositive","isBigDecimalArgs","args","round","options","mode","ceil","floor","truncate","halfCeil","halfFloor","digit","digitAt","truncated","scaled"],"sources":["../src/BigDecimal.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;AAgBA,OAAO,KAAKA,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,GAAG,MAAM,kBAAkB;AACvC,SAASC,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,SAA2BC,iBAAiB,QAAQ,kBAAkB;AACtE,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,KAAK,MAAM,YAAY;AAEnC,SAAwBC,aAAa,QAAQ,eAAe;AAC5D,SAASC,WAAW,QAAQ,gBAAgB;AAE5C,MAAMC,iBAAiB,GAAG,GAAG;AAC7B,MAAMC,iBAAiB,GAAG,YAAY;AAEtC,MAAMC,MAAM,GAAG,oBAAoB;AA0BnC,MAAMC,eAAe,GAAuD;EAC1E,CAACD,MAAM,GAAGA,MAAM;EAChB,CAACR,IAAI,CAACU,MAAM,IAAC;IACX,MAAMC,UAAU,GAAGC,SAAS,CAAC,IAAI,CAAC;IAClC,OAAOZ,IAAI,CAACa,OAAO,CAACb,IAAI,CAACc,IAAI,CAACH,UAAU,CAACI,KAAK,CAAC,EAAEf,IAAI,CAACgB,MAAM,CA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,IAAI,CAAC9B,KAAK,GAAIoB,QAAQ,IAAIE,MAAM,CAACQ,IAAI,CAAC5B,KAAK,GAAGA,KAAK,CAAE;EACpE,OAAOoI,MAAM,GAAGlH,QAAQ;AAC1B,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;AAqBA,OAAO,MAAM2G,KAAK,gBA6Cd/I,IAAI,CAACyI,gBAAgB,EAAE,CAAC3F,IAAgB,EAAE5B,KAAA,GAAgB,CAAC,KAAgB;EAC7E,MAAMmI,SAAS,GAAGL,QAAQ,CAAClG,IAAI,EAAE5B,KAAK,CAAC;EAEvC,IAAImH,UAAU,CAACvF,IAAI,CAAC,IAAIuC,aAAa,CAACgE,SAAS,EAAEvG,IAAI,CAAC,EAAE;IACtD,OAAOO,GAAG,CAACgG,SAAS,EAAEvH,IAAI,CAACU,QAAQ,EAAEtB,KAAK,CAAC,CAAC;EAC9C;EAEA,OAAOmI,SAAS;AAClB,CAAC,CAAC","ignoreList":[]}
 
1
+ {"version":3,"file":"BigDecimal.js","names":["Equal","Equ","dual","Hash","NodeInspectSymbol","Option","order","pipeArguments","hasProperty","DEFAULT_PRECISION","FINITE_INT_REGEXP","TypeId","BigDecimalProto","symbol","normalized","normalize","combine","hash","value","number","scale","that","isBigDecimal","equals","toString","format","toJSON","_id","String","pipe","arguments","u","make","o","Object","create","makeNormalizedUnsafe","bigint0","bigint10","RangeError","BigInt","bigint1","bigint_1","bigint2","bigint5","bigint_5","zero","one","self","undefined","digits","trail","i","length","substring","sum","sumAll","collection","out","n","multiply","multiplyAll","subtract","divideWithPrecision","num","den","precision","numNegative","denNegative","negateResult","quotient","remainder","count","q","r","roundTerminal","pos","Number","divide","none","some","divideUnsafe","Order","scmp","sign","isLessThan","isLessThanOrEqualTo","isGreaterThan","isGreaterThanOrEqualTo","between","isBetween","clamp","min","max","abs","negate","divisor","Math","remainderUnsafe","Equivalence","fromBigInt","fromNumberUnsafe","getOrThrowWith","fromNumber","isFinite","string","includes","fromString","lead","split","s","base","exp","seperator","search","slice","isSafeInteger","test","offset","dot","fromStringUnsafe","Error","toExponential","negative","absolute","before","after","repeat","location","zeros","complete","isZero","head","tail","output","isNegative","toNumberUnsafe","isInteger","isPositive","isBigDecimalArgs","args","round","options","mode","ceil","floor","truncate","halfCeil","halfFloor","digit","digitAt","truncated","scaled"],"sources":["../src/BigDecimal.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;AAUA,OAAO,KAAKA,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,GAAG,MAAM,kBAAkB;AACvC,SAASC,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,SAA2BC,iBAAiB,QAAQ,kBAAkB;AACtE,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,KAAK,MAAM,YAAY;AAEnC,SAAwBC,aAAa,QAAQ,eAAe;AAC5D,SAASC,WAAW,QAAQ,gBAAgB;AAE5C,MAAMC,iBAAiB,GAAG,GAAG;AAC7B,MAAMC,iBAAiB,GAAG,YAAY;AAEtC,MAAMC,MAAM,GAAG,oBAAoB;AAgCnC,MAAMC,eAAe,GAAuD;EAC1E,CAACD,MAAM,GAAGA,MAAM;EAChB,CAACR,IAAI,CAACU,MAAM,IAAC;IACX,MAAMC,UAAU,GAAGC,SAAS,CAAC,IAAI,CAAC;IAClC,OAAOZ,IAAI,CAACa,OAAO,CAACb,IAAI,CAACc,IAAI,CAACH,UAAU,CAACI,KAAK,CAAC,EAAEf,IAAI,CAACgB,MAAM,CAACL,UAAU,CAACM,KAAK,CAAC,CAAC;EACjF,CAAC;EACD,CAACpB,KAAK,CAACa,MAAM,EAAoBQ,IAAa;IAC5C,OAAOC,YAAY,CAACD,IAAI,CAAC,IAAIE,MAAM,CAAC,IAAI,EAAEF,IAAI,CAAC;EACjD,CAAC;EACDG,QAAQA,CAAA;IACN,OAAO,cAAcC,MAAM,CAAC,IAAI,CAAC,GAAG;EACtC,CAAC;EACDC,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AAa,KAAY;EACtD,IAAI4B,IAAI,CAAC5B,KAAK,GAAGA,KAAK,EAAE;IACtB,OAAOiB,OAAO;EAChB;EAEA,MAAMmH,MAAM,GAAGxG,IAAI,CAAC9B,KAAK,GAAIoB,QAAQ,IAAIE,MAAM,CAACQ,IAAI,CAAC5B,KAAK,GAAGA,KAAK,CAAE;EACpE,OAAOoI,MAAM,GAAGlH,QAAQ;AAC1B,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,OAAO,MAAM2G,KAAK,gBA+Dd/I,IAAI,CAACyI,gBAAgB,EAAE,CAAC3F,IAAgB,EAAE5B,KAAA,GAAgB,CAAC,KAAgB;EAC7E,MAAMmI,SAAS,GAAGL,QAAQ,CAAClG,IAAI,EAAE5B,KAAK,CAAC;EAEvC,IAAImH,UAAU,CAACvF,IAAI,CAAC,IAAIuC,aAAa,CAACgE,SAAS,EAAEvG,IAAI,CAAC,EAAE;IACtD,OAAOO,GAAG,CAACgG,SAAS,EAAEvH,IAAI,CAACU,QAAQ,EAAEtB,KAAK,CAAC,CAAC;EAC9C;EAEA,OAAOmI,SAAS;AAClB,CAAC,CAAC","ignoreList":[]}
.opencode/node_modules/effect/dist/BigInt.d.ts CHANGED
@@ -1,6 +1,10 @@
1
  /**
2
- * This module provides utility functions and type class instances for working with the `bigint` type in TypeScript.
3
- * It includes functions for basic arithmetic operations.
 
 
 
 
4
  *
5
  * @since 2.0.0
6
  */
@@ -11,11 +15,25 @@ import * as order from "./Order.ts";
11
  import type { Ordering } from "./Ordering.ts";
12
  import * as Reducer from "./Reducer.ts";
13
  /**
14
- * Reference to the global BigInt constructor.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  *
16
- * @example
17
  * ```ts
18
- * import * as BigInt from "effect/BigInt"
19
  *
20
  * const bigInt = BigInt.BigInt(123)
21
  * console.log(bigInt) // 123n
@@ -29,15 +47,20 @@ import * as Reducer from "./Reducer.ts";
29
  */
30
  export declare const BigInt: BigIntConstructor;
31
  /**
32
- * Tests if a value is a `bigint`.
 
 
 
 
 
 
33
  *
34
- * @example
35
  * ```ts
36
- * import { isBigInt } from "effect/BigInt"
37
  * import * as assert from "node:assert"
38
  *
39
- * assert.deepStrictEqual(isBigInt(1n), true)
40
- * assert.deepStrictEqual(isBigInt(1), false)
41
  * ```
42
  *
43
  * @category guards
@@ -47,14 +70,22 @@ export declare const isBigInt: (u: unknown) => u is bigint;
47
  /**
48
  * Provides an addition operation on `bigint`s.
49
  *
50
- * @example
 
 
 
 
 
 
51
  * ```ts
52
- * import { sum } from "effect/BigInt"
53
  * import * as assert from "node:assert"
54
  *
55
- * assert.deepStrictEqual(sum(2n, 3n), 5n)
56
  * ```
57
  *
 
 
58
  * @category math
59
  * @since 2.0.0
60
  */
@@ -62,14 +93,22 @@ export declare const sum: {
62
  /**
63
  * Provides an addition operation on `bigint`s.
64
  *
65
- * @example
 
 
 
 
 
 
66
  * ```ts
67
- * import { sum } from "effect/BigInt"
68
  * import * as assert from "node:assert"
69
  *
70
- * assert.deepStrictEqual(sum(2n, 3n), 5n)
71
  * ```
72
  *
 
 
73
  * @category math
74
  * @since 2.0.0
75
  */
@@ -77,14 +116,22 @@ export declare const sum: {
77
  /**
78
  * Provides an addition operation on `bigint`s.
79
  *
80
- * @example
 
 
 
 
 
 
81
  * ```ts
82
- * import { sum } from "effect/BigInt"
83
  * import * as assert from "node:assert"
84
  *
85
- * assert.deepStrictEqual(sum(2n, 3n), 5n)
86
  * ```
87
  *
 
 
88
  * @category math
89
  * @since 2.0.0
90
  */
@@ -93,14 +140,21 @@ export declare const sum: {
93
  /**
94
  * Provides a multiplication operation on `bigint`s.
95
  *
96
- * @example
 
 
 
 
 
97
  * ```ts
98
- * import { multiply } from "effect/BigInt"
99
  * import * as assert from "node:assert"
100
  *
101
- * assert.deepStrictEqual(multiply(2n, 3n), 6n)
102
  * ```
103
  *
 
 
104
  * @category math
105
  * @since 2.0.0
106
  */
@@ -108,14 +162,21 @@ export declare const multiply: {
108
  /**
109
  * Provides a multiplication operation on `bigint`s.
110
  *
111
- * @example
 
 
 
 
 
112
  * ```ts
113
- * import { multiply } from "effect/BigInt"
114
  * import * as assert from "node:assert"
115
  *
116
- * assert.deepStrictEqual(multiply(2n, 3n), 6n)
117
  * ```
118
  *
 
 
119
  * @category math
120
  * @since 2.0.0
121
  */
@@ -123,14 +184,21 @@ export declare const multiply: {
123
  /**
124
  * Provides a multiplication operation on `bigint`s.
125
  *
126
- * @example
 
 
 
 
 
127
  * ```ts
128
- * import { multiply } from "effect/BigInt"
129
  * import * as assert from "node:assert"
130
  *
131
- * assert.deepStrictEqual(multiply(2n, 3n), 6n)
132
  * ```
133
  *
 
 
134
  * @category math
135
  * @since 2.0.0
136
  */
@@ -139,12 +207,17 @@ export declare const multiply: {
139
  /**
140
  * Provides a subtraction operation on `bigint`s.
141
  *
142
- * @example
 
 
 
 
 
143
  * ```ts
144
- * import { subtract } from "effect/BigInt"
145
  * import * as assert from "node:assert"
146
  *
147
- * assert.deepStrictEqual(subtract(2n, 3n), -1n)
148
  * ```
149
  *
150
  * @category math
@@ -154,12 +227,17 @@ export declare const subtract: {
154
  /**
155
  * Provides a subtraction operation on `bigint`s.
156
  *
157
- * @example
 
 
 
 
 
158
  * ```ts
159
- * import { subtract } from "effect/BigInt"
160
  * import * as assert from "node:assert"
161
  *
162
- * assert.deepStrictEqual(subtract(2n, 3n), -1n)
163
  * ```
164
  *
165
  * @category math
@@ -169,12 +247,17 @@ export declare const subtract: {
169
  /**
170
  * Provides a subtraction operation on `bigint`s.
171
  *
172
- * @example
 
 
 
 
 
173
  * ```ts
174
- * import { subtract } from "effect/BigInt"
175
  * import * as assert from "node:assert"
176
  *
177
- * assert.deepStrictEqual(subtract(2n, 3n), -1n)
178
  * ```
179
  *
180
  * @category math
@@ -183,148 +266,210 @@ export declare const subtract: {
183
  (self: bigint, that: bigint): bigint;
184
  };
185
  /**
186
- * Provides a division operation on `bigint`s.
 
 
187
  *
188
- * If the dividend is not a multiple of the divisor the result will be a `bigint` value
189
- * which represents the integer division rounded down to the nearest integer.
190
  *
191
- * Returns `Option.none()` if the divisor is `0n`.
 
 
 
 
 
192
  *
193
- * @example
194
  * ```ts
195
- * import { divide } from "effect/BigInt"
196
  * import * as assert from "node:assert"
197
  *
198
- * import { Option } from "effect"
199
- *
200
- * assert.deepStrictEqual(divide(6n, 3n), Option.some(2n))
201
- * assert.deepStrictEqual(divide(6n, 0n), Option.none())
202
  * ```
203
  *
 
 
 
204
  * @category math
205
  * @since 2.0.0
206
  */
207
  export declare const divide: {
208
  /**
209
- * Provides a division operation on `bigint`s.
 
 
 
 
 
210
  *
211
- * If the dividend is not a multiple of the divisor the result will be a `bigint` value
212
- * which represents the integer division rounded down to the nearest integer.
213
  *
214
- * Returns `Option.none()` if the divisor is `0n`.
 
 
 
215
  *
216
- * @example
217
  * ```ts
218
- * import { divide } from "effect/BigInt"
219
  * import * as assert from "node:assert"
220
  *
221
- * import { Option } from "effect"
222
- *
223
- * assert.deepStrictEqual(divide(6n, 3n), Option.some(2n))
224
- * assert.deepStrictEqual(divide(6n, 0n), Option.none())
225
  * ```
226
  *
 
 
 
227
  * @category math
228
  * @since 2.0.0
229
  */
230
  (that: bigint): (self: bigint) => Option.Option<bigint>;
231
  /**
232
- * Provides a division operation on `bigint`s.
233
  *
234
- * If the dividend is not a multiple of the divisor the result will be a `bigint` value
235
- * which represents the integer division rounded down to the nearest integer.
236
  *
237
- * Returns `Option.none()` if the divisor is `0n`.
 
 
 
 
 
 
 
 
238
  *
239
- * @example
240
  * ```ts
241
- * import { divide } from "effect/BigInt"
242
  * import * as assert from "node:assert"
243
  *
244
- * import { Option } from "effect"
245
- *
246
- * assert.deepStrictEqual(divide(6n, 3n), Option.some(2n))
247
- * assert.deepStrictEqual(divide(6n, 0n), Option.none())
248
  * ```
249
  *
 
 
 
250
  * @category math
251
  * @since 2.0.0
252
  */
253
  (self: bigint, that: bigint): Option.Option<bigint>;
254
  };
255
  /**
256
- * Provides a division operation on `bigint`s.
257
  *
258
- * If the dividend is not a multiple of the divisor the result will be a `bigint` value
259
- * which represents the integer division rounded down to the nearest integer.
260
  *
261
- * Throws a `RangeError` if the divisor is `0n`.
 
 
 
 
 
 
 
 
 
 
 
 
262
  *
263
- * @example
264
  * ```ts
265
- * import { divideUnsafe } from "effect/BigInt"
266
  * import * as assert from "node:assert"
267
  *
268
- * assert.deepStrictEqual(divideUnsafe(6n, 3n), 2n)
269
- * assert.deepStrictEqual(divideUnsafe(6n, 4n), 1n)
270
  * ```
271
  *
 
 
272
  * @category math
273
- * @since 2.0.0
274
  */
275
  export declare const divideUnsafe: {
276
  /**
277
- * Provides a division operation on `bigint`s.
 
 
 
 
 
 
 
278
  *
279
- * If the dividend is not a multiple of the divisor the result will be a `bigint` value
280
- * which represents the integer division rounded down to the nearest integer.
281
  *
282
- * Throws a `RangeError` if the divisor is `0n`.
 
 
 
 
283
  *
284
- * @example
285
  * ```ts
286
- * import { divideUnsafe } from "effect/BigInt"
287
  * import * as assert from "node:assert"
288
  *
289
- * assert.deepStrictEqual(divideUnsafe(6n, 3n), 2n)
290
- * assert.deepStrictEqual(divideUnsafe(6n, 4n), 1n)
291
  * ```
292
  *
 
 
293
  * @category math
294
- * @since 2.0.0
295
  */
296
  (that: bigint): (self: bigint) => bigint;
297
  /**
298
- * Provides a division operation on `bigint`s.
 
 
 
 
 
 
 
 
 
 
 
 
299
  *
300
- * If the dividend is not a multiple of the divisor the result will be a `bigint` value
301
- * which represents the integer division rounded down to the nearest integer.
302
  *
303
- * Throws a `RangeError` if the divisor is `0n`.
304
  *
305
- * @example
306
  * ```ts
307
- * import { divideUnsafe } from "effect/BigInt"
308
  * import * as assert from "node:assert"
309
  *
310
- * assert.deepStrictEqual(divideUnsafe(6n, 3n), 2n)
311
- * assert.deepStrictEqual(divideUnsafe(6n, 4n), 1n)
312
  * ```
313
  *
 
 
314
  * @category math
315
- * @since 2.0.0
316
  */
317
  (self: bigint, that: bigint): bigint;
318
  };
319
  /**
320
- * Returns the result of adding `1n` to a given number.
 
 
 
 
 
 
321
  *
322
- * @example
323
  * ```ts
324
- * import { increment } from "effect/BigInt"
325
  * import * as assert from "node:assert"
326
  *
327
- * assert.deepStrictEqual(increment(2n), 3n)
328
  * ```
329
  *
330
  * @category math
@@ -332,14 +477,19 @@ export declare const divideUnsafe: {
332
  */
333
  export declare const increment: (n: bigint) => bigint;
334
  /**
335
- * Decrements a number by `1n`.
 
 
 
 
 
 
336
  *
337
- * @example
338
  * ```ts
339
- * import { decrement } from "effect/BigInt"
340
  * import * as assert from "node:assert"
341
  *
342
- * assert.deepStrictEqual(decrement(3n), 2n)
343
  * ```
344
  *
345
  * @category math
@@ -349,9 +499,15 @@ export declare const decrement: (n: bigint) => bigint;
349
  /**
350
  * Provides an `Order` instance for `bigint` that allows comparing and sorting BigInt values.
351
  *
352
- * @example
 
 
 
 
 
 
353
  * ```ts
354
- * import * as BigInt from "effect/BigInt"
355
  *
356
  * const a = 123n
357
  * const b = 456n
@@ -367,9 +523,15 @@ export declare const decrement: (n: bigint) => bigint;
367
  */
368
  export declare const Order: order.Order<bigint>;
369
  /**
370
- * An `Equivalence` instance for bigints using strict equality (`===`).
 
 
 
 
 
 
 
371
  *
372
- * @example
373
  * ```ts
374
  * import { BigInt } from "effect"
375
  *
@@ -378,223 +540,288 @@ export declare const Order: order.Order<bigint>;
378
  * ```
379
  *
380
  * @category instances
381
- * @since 4.0.0
382
  */
383
  export declare const Equivalence: Equ.Equivalence<bigint>;
384
  /**
385
  * Returns `true` if the first argument is less than the second, otherwise `false`.
386
  *
387
- * @example
 
 
 
 
 
388
  * ```ts
389
- * import { isLessThan } from "effect/BigInt"
390
  * import * as assert from "node:assert"
391
  *
392
- * assert.deepStrictEqual(isLessThan(2n, 3n), true)
393
- * assert.deepStrictEqual(isLessThan(3n, 3n), false)
394
- * assert.deepStrictEqual(isLessThan(4n, 3n), false)
395
  * ```
396
  *
397
  * @category predicates
398
- * @since 2.0.0
399
  */
400
  export declare const isLessThan: {
401
  /**
402
  * Returns `true` if the first argument is less than the second, otherwise `false`.
403
  *
404
- * @example
 
 
 
 
 
405
  * ```ts
406
- * import { isLessThan } from "effect/BigInt"
407
  * import * as assert from "node:assert"
408
  *
409
- * assert.deepStrictEqual(isLessThan(2n, 3n), true)
410
- * assert.deepStrictEqual(isLessThan(3n, 3n), false)
411
- * assert.deepStrictEqual(isLessThan(4n, 3n), false)
412
  * ```
413
  *
414
  * @category predicates
415
- * @since 2.0.0
416
  */
417
  (that: bigint): (self: bigint) => boolean;
418
  /**
419
  * Returns `true` if the first argument is less than the second, otherwise `false`.
420
  *
421
- * @example
 
 
 
 
 
422
  * ```ts
423
- * import { isLessThan } from "effect/BigInt"
424
  * import * as assert from "node:assert"
425
  *
426
- * assert.deepStrictEqual(isLessThan(2n, 3n), true)
427
- * assert.deepStrictEqual(isLessThan(3n, 3n), false)
428
- * assert.deepStrictEqual(isLessThan(4n, 3n), false)
429
  * ```
430
  *
431
  * @category predicates
432
- * @since 2.0.0
433
  */
434
  (self: bigint, that: bigint): boolean;
435
  };
436
  /**
437
  * Returns a function that checks if a given `bigint` is less than or equal to the provided one.
438
  *
439
- * @example
 
 
 
 
 
440
  * ```ts
441
- * import { isLessThanOrEqualTo } from "effect/BigInt"
442
  * import * as assert from "node:assert"
443
  *
444
- * assert.deepStrictEqual(isLessThanOrEqualTo(2n, 3n), true)
445
- * assert.deepStrictEqual(isLessThanOrEqualTo(3n, 3n), true)
446
- * assert.deepStrictEqual(isLessThanOrEqualTo(4n, 3n), false)
447
  * ```
448
  *
449
  * @category predicates
450
- * @since 2.0.0
451
  */
452
  export declare const isLessThanOrEqualTo: {
453
  /**
454
  * Returns a function that checks if a given `bigint` is less than or equal to the provided one.
455
  *
456
- * @example
 
 
 
 
 
457
  * ```ts
458
- * import { isLessThanOrEqualTo } from "effect/BigInt"
459
  * import * as assert from "node:assert"
460
  *
461
- * assert.deepStrictEqual(isLessThanOrEqualTo(2n, 3n), true)
462
- * assert.deepStrictEqual(isLessThanOrEqualTo(3n, 3n), true)
463
- * assert.deepStrictEqual(isLessThanOrEqualTo(4n, 3n), false)
464
  * ```
465
  *
466
  * @category predicates
467
- * @since 2.0.0
468
  */
469
  (that: bigint): (self: bigint) => boolean;
470
  /**
471
  * Returns a function that checks if a given `bigint` is less than or equal to the provided one.
472
  *
473
- * @example
 
 
 
 
 
474
  * ```ts
475
- * import { isLessThanOrEqualTo } from "effect/BigInt"
476
  * import * as assert from "node:assert"
477
  *
478
- * assert.deepStrictEqual(isLessThanOrEqualTo(2n, 3n), true)
479
- * assert.deepStrictEqual(isLessThanOrEqualTo(3n, 3n), true)
480
- * assert.deepStrictEqual(isLessThanOrEqualTo(4n, 3n), false)
481
  * ```
482
  *
483
  * @category predicates
484
- * @since 2.0.0
485
  */
486
  (self: bigint, that: bigint): boolean;
487
  };
488
  /**
489
  * Returns `true` if the first argument is greater than the second, otherwise `false`.
490
  *
491
- * @example
 
 
 
 
 
492
  * ```ts
493
- * import { isGreaterThan } from "effect/BigInt"
494
  * import * as assert from "node:assert"
495
  *
496
- * assert.deepStrictEqual(isGreaterThan(2n, 3n), false)
497
- * assert.deepStrictEqual(isGreaterThan(3n, 3n), false)
498
- * assert.deepStrictEqual(isGreaterThan(4n, 3n), true)
499
  * ```
500
  *
501
  * @category predicates
502
- * @since 2.0.0
503
  */
504
  export declare const isGreaterThan: {
505
  /**
506
  * Returns `true` if the first argument is greater than the second, otherwise `false`.
507
  *
508
- * @example
 
 
 
 
 
509
  * ```ts
510
- * import { isGreaterThan } from "effect/BigInt"
511
  * import * as assert from "node:assert"
512
  *
513
- * assert.deepStrictEqual(isGreaterThan(2n, 3n), false)
514
- * assert.deepStrictEqual(isGreaterThan(3n, 3n), false)
515
- * assert.deepStrictEqual(isGreaterThan(4n, 3n), true)
516
  * ```
517
  *
518
  * @category predicates
519
- * @since 2.0.0
520
  */
521
  (that: bigint): (self: bigint) => boolean;
522
  /**
523
  * Returns `true` if the first argument is greater than the second, otherwise `false`.
524
  *
525
- * @example
 
 
 
 
 
526
  * ```ts
527
- * import { isGreaterThan } from "effect/BigInt"
528
  * import * as assert from "node:assert"
529
  *
530
- * assert.deepStrictEqual(isGreaterThan(2n, 3n), false)
531
- * assert.deepStrictEqual(isGreaterThan(3n, 3n), false)
532
- * assert.deepStrictEqual(isGreaterThan(4n, 3n), true)
533
  * ```
534
  *
535
  * @category predicates
536
- * @since 2.0.0
537
  */
538
  (self: bigint, that: bigint): boolean;
539
  };
540
  /**
541
  * Returns a function that checks if a given `bigint` is greater than or equal to the provided one.
542
  *
543
- * @example
 
 
 
 
 
544
  * ```ts
545
- * import { isGreaterThanOrEqualTo } from "effect/BigInt"
546
  * import * as assert from "node:assert"
547
  *
548
- * assert.deepStrictEqual(isGreaterThanOrEqualTo(2n, 3n), false)
549
- * assert.deepStrictEqual(isGreaterThanOrEqualTo(3n, 3n), true)
550
- * assert.deepStrictEqual(isGreaterThanOrEqualTo(4n, 3n), true)
551
  * ```
552
  *
553
  * @category predicates
554
- * @since 2.0.0
555
  */
556
  export declare const isGreaterThanOrEqualTo: {
557
  /**
558
  * Returns a function that checks if a given `bigint` is greater than or equal to the provided one.
559
  *
560
- * @example
 
 
 
 
 
561
  * ```ts
562
- * import { isGreaterThanOrEqualTo } from "effect/BigInt"
563
  * import * as assert from "node:assert"
564
  *
565
- * assert.deepStrictEqual(isGreaterThanOrEqualTo(2n, 3n), false)
566
- * assert.deepStrictEqual(isGreaterThanOrEqualTo(3n, 3n), true)
567
- * assert.deepStrictEqual(isGreaterThanOrEqualTo(4n, 3n), true)
568
  * ```
569
  *
570
  * @category predicates
571
- * @since 2.0.0
572
  */
573
  (that: bigint): (self: bigint) => boolean;
574
  /**
575
  * Returns a function that checks if a given `bigint` is greater than or equal to the provided one.
576
  *
577
- * @example
 
 
 
 
 
578
  * ```ts
579
- * import { isGreaterThanOrEqualTo } from "effect/BigInt"
580
  * import * as assert from "node:assert"
581
  *
582
- * assert.deepStrictEqual(isGreaterThanOrEqualTo(2n, 3n), false)
583
- * assert.deepStrictEqual(isGreaterThanOrEqualTo(3n, 3n), true)
584
- * assert.deepStrictEqual(isGreaterThanOrEqualTo(4n, 3n), true)
585
  * ```
586
  *
587
  * @category predicates
588
- * @since 2.0.0
589
  */
590
  (self: bigint, that: bigint): boolean;
591
  };
592
  /**
593
- * Checks if a `bigint` is between a `minimum` and `maximum` value (inclusive).
 
 
 
 
 
 
594
  *
595
- * @example
596
  * ```ts
597
- * import * as BigInt from "effect/BigInt"
598
  * import * as assert from "node:assert"
599
  *
600
  * const between = BigInt.between({ minimum: 0n, maximum: 5n })
@@ -604,16 +831,23 @@ export declare const isGreaterThanOrEqualTo: {
604
  * assert.deepStrictEqual(between(6n), false)
605
  * ```
606
  *
 
 
607
  * @category predicates
608
  * @since 2.0.0
609
  */
610
  export declare const between: {
611
  /**
612
- * Checks if a `bigint` is between a `minimum` and `maximum` value (inclusive).
 
 
 
 
 
 
613
  *
614
- * @example
615
  * ```ts
616
- * import * as BigInt from "effect/BigInt"
617
  * import * as assert from "node:assert"
618
  *
619
  * const between = BigInt.between({ minimum: 0n, maximum: 5n })
@@ -623,6 +857,8 @@ export declare const between: {
623
  * assert.deepStrictEqual(between(6n), false)
624
  * ```
625
  *
 
 
626
  * @category predicates
627
  * @since 2.0.0
628
  */
@@ -631,11 +867,16 @@ export declare const between: {
631
  maximum: bigint;
632
  }): (self: bigint) => boolean;
633
  /**
634
- * Checks if a `bigint` is between a `minimum` and `maximum` value (inclusive).
 
 
 
 
 
 
635
  *
636
- * @example
637
  * ```ts
638
- * import * as BigInt from "effect/BigInt"
639
  * import * as assert from "node:assert"
640
  *
641
  * const between = BigInt.between({ minimum: 0n, maximum: 5n })
@@ -645,6 +886,8 @@ export declare const between: {
645
  * assert.deepStrictEqual(between(6n), false)
646
  * ```
647
  *
 
 
648
  * @category predicates
649
  * @since 2.0.0
650
  */
@@ -656,13 +899,20 @@ export declare const between: {
656
  /**
657
  * Restricts the given `bigint` to be within the range specified by the `minimum` and `maximum` values.
658
  *
659
- * - If the `bigint` is less than the `minimum` value, the function returns the `minimum` value.
660
- * - If the `bigint` is greater than the `maximum` value, the function returns the `maximum` value.
661
- * - Otherwise, it returns the original `bigint`.
 
 
 
 
 
 
 
 
662
  *
663
- * @example
664
  * ```ts
665
- * import * as BigInt from "effect/BigInt"
666
  * import * as assert from "node:assert"
667
  *
668
  * const clamp = BigInt.clamp({ minimum: 1n, maximum: 5n })
@@ -672,6 +922,8 @@ export declare const between: {
672
  * assert.equal(clamp(6n), 5n)
673
  * ```
674
  *
 
 
675
  * @category math
676
  * @since 2.0.0
677
  */
@@ -679,13 +931,20 @@ export declare const clamp: {
679
  /**
680
  * Restricts the given `bigint` to be within the range specified by the `minimum` and `maximum` values.
681
  *
682
- * - If the `bigint` is less than the `minimum` value, the function returns the `minimum` value.
683
- * - If the `bigint` is greater than the `maximum` value, the function returns the `maximum` value.
684
- * - Otherwise, it returns the original `bigint`.
 
 
 
 
 
 
 
 
685
  *
686
- * @example
687
  * ```ts
688
- * import * as BigInt from "effect/BigInt"
689
  * import * as assert from "node:assert"
690
  *
691
  * const clamp = BigInt.clamp({ minimum: 1n, maximum: 5n })
@@ -695,6 +954,8 @@ export declare const clamp: {
695
  * assert.equal(clamp(6n), 5n)
696
  * ```
697
  *
 
 
698
  * @category math
699
  * @since 2.0.0
700
  */
@@ -705,13 +966,20 @@ export declare const clamp: {
705
  /**
706
  * Restricts the given `bigint` to be within the range specified by the `minimum` and `maximum` values.
707
  *
708
- * - If the `bigint` is less than the `minimum` value, the function returns the `minimum` value.
709
- * - If the `bigint` is greater than the `maximum` value, the function returns the `maximum` value.
710
- * - Otherwise, it returns the original `bigint`.
 
 
 
 
 
 
 
 
711
  *
712
- * @example
713
  * ```ts
714
- * import * as BigInt from "effect/BigInt"
715
  * import * as assert from "node:assert"
716
  *
717
  * const clamp = BigInt.clamp({ minimum: 1n, maximum: 5n })
@@ -721,6 +989,8 @@ export declare const clamp: {
721
  * assert.equal(clamp(6n), 5n)
722
  * ```
723
  *
 
 
724
  * @category math
725
  * @since 2.0.0
726
  */
@@ -732,14 +1002,21 @@ export declare const clamp: {
732
  /**
733
  * Returns the minimum between two `bigint`s.
734
  *
735
- * @example
 
 
 
 
 
736
  * ```ts
737
- * import { min } from "effect/BigInt"
738
  * import * as assert from "node:assert"
739
  *
740
- * assert.deepStrictEqual(min(2n, 3n), 2n)
741
  * ```
742
  *
 
 
743
  * @category math
744
  * @since 2.0.0
745
  */
@@ -747,14 +1024,21 @@ export declare const min: {
747
  /**
748
  * Returns the minimum between two `bigint`s.
749
  *
750
- * @example
 
 
 
 
 
751
  * ```ts
752
- * import { min } from "effect/BigInt"
753
  * import * as assert from "node:assert"
754
  *
755
- * assert.deepStrictEqual(min(2n, 3n), 2n)
756
  * ```
757
  *
 
 
758
  * @category math
759
  * @since 2.0.0
760
  */
@@ -762,14 +1046,21 @@ export declare const min: {
762
  /**
763
  * Returns the minimum between two `bigint`s.
764
  *
765
- * @example
 
 
 
 
 
766
  * ```ts
767
- * import { min } from "effect/BigInt"
768
  * import * as assert from "node:assert"
769
  *
770
- * assert.deepStrictEqual(min(2n, 3n), 2n)
771
  * ```
772
  *
 
 
773
  * @category math
774
  * @since 2.0.0
775
  */
@@ -778,14 +1069,21 @@ export declare const min: {
778
  /**
779
  * Returns the maximum between two `bigint`s.
780
  *
781
- * @example
 
 
 
 
 
782
  * ```ts
783
- * import { max } from "effect/BigInt"
784
  * import * as assert from "node:assert"
785
  *
786
- * assert.deepStrictEqual(max(2n, 3n), 3n)
787
  * ```
788
  *
 
 
789
  * @category math
790
  * @since 2.0.0
791
  */
@@ -793,14 +1091,21 @@ export declare const max: {
793
  /**
794
  * Returns the maximum between two `bigint`s.
795
  *
796
- * @example
 
 
 
 
 
797
  * ```ts
798
- * import { max } from "effect/BigInt"
799
  * import * as assert from "node:assert"
800
  *
801
- * assert.deepStrictEqual(max(2n, 3n), 3n)
802
  * ```
803
  *
 
 
804
  * @category math
805
  * @since 2.0.0
806
  */
@@ -808,14 +1113,21 @@ export declare const max: {
808
  /**
809
  * Returns the maximum between two `bigint`s.
810
  *
811
- * @example
 
 
 
 
 
812
  * ```ts
813
- * import { max } from "effect/BigInt"
814
  * import * as assert from "node:assert"
815
  *
816
- * assert.deepStrictEqual(max(2n, 3n), 3n)
817
  * ```
818
  *
 
 
819
  * @category math
820
  * @since 2.0.0
821
  */
@@ -824,14 +1136,19 @@ export declare const max: {
824
  /**
825
  * Determines the sign of a given `bigint`.
826
  *
827
- * @example
 
 
 
 
 
828
  * ```ts
829
- * import { sign } from "effect/BigInt"
830
  * import * as assert from "node:assert"
831
  *
832
- * assert.deepStrictEqual(sign(-5n), -1)
833
- * assert.deepStrictEqual(sign(0n), 0)
834
- * assert.deepStrictEqual(sign(5n), 1)
835
  * ```
836
  *
837
  * @category math
@@ -841,14 +1158,19 @@ export declare const sign: (n: bigint) => Ordering;
841
  /**
842
  * Determines the absolute value of a given `bigint`.
843
  *
844
- * @example
 
 
 
 
 
845
  * ```ts
846
- * import { abs } from "effect/BigInt"
847
  * import * as assert from "node:assert"
848
  *
849
- * assert.deepStrictEqual(abs(-5n), 5n)
850
- * assert.deepStrictEqual(abs(0n), 0n)
851
- * assert.deepStrictEqual(abs(5n), 5n)
852
  * ```
853
  *
854
  * @category math
@@ -858,16 +1180,23 @@ export declare const abs: (n: bigint) => bigint;
858
  /**
859
  * Determines the greatest common divisor of two `bigint`s.
860
  *
861
- * @example
 
 
 
 
 
862
  * ```ts
863
- * import { gcd } from "effect/BigInt"
864
  * import * as assert from "node:assert"
865
  *
866
- * assert.deepStrictEqual(gcd(2n, 3n), 1n)
867
- * assert.deepStrictEqual(gcd(2n, 4n), 2n)
868
- * assert.deepStrictEqual(gcd(16n, 24n), 8n)
869
  * ```
870
  *
 
 
871
  * @category math
872
  * @since 2.0.0
873
  */
@@ -875,16 +1204,23 @@ export declare const gcd: {
875
  /**
876
  * Determines the greatest common divisor of two `bigint`s.
877
  *
878
- * @example
 
 
 
 
 
879
  * ```ts
880
- * import { gcd } from "effect/BigInt"
881
  * import * as assert from "node:assert"
882
  *
883
- * assert.deepStrictEqual(gcd(2n, 3n), 1n)
884
- * assert.deepStrictEqual(gcd(2n, 4n), 2n)
885
- * assert.deepStrictEqual(gcd(16n, 24n), 8n)
886
  * ```
887
  *
 
 
888
  * @category math
889
  * @since 2.0.0
890
  */
@@ -892,16 +1228,23 @@ export declare const gcd: {
892
  /**
893
  * Determines the greatest common divisor of two `bigint`s.
894
  *
895
- * @example
 
 
 
 
 
896
  * ```ts
897
- * import { gcd } from "effect/BigInt"
898
  * import * as assert from "node:assert"
899
  *
900
- * assert.deepStrictEqual(gcd(2n, 3n), 1n)
901
- * assert.deepStrictEqual(gcd(2n, 4n), 2n)
902
- * assert.deepStrictEqual(gcd(16n, 24n), 8n)
903
  * ```
904
  *
 
 
905
  * @category math
906
  * @since 2.0.0
907
  */
@@ -910,16 +1253,23 @@ export declare const gcd: {
910
  /**
911
  * Determines the least common multiple of two `bigint`s.
912
  *
913
- * @example
 
 
 
 
 
914
  * ```ts
915
- * import { lcm } from "effect/BigInt"
916
  * import * as assert from "node:assert"
917
  *
918
- * assert.deepStrictEqual(lcm(2n, 3n), 6n)
919
- * assert.deepStrictEqual(lcm(2n, 4n), 4n)
920
- * assert.deepStrictEqual(lcm(16n, 24n), 48n)
921
  * ```
922
  *
 
 
923
  * @category math
924
  * @since 2.0.0
925
  */
@@ -927,16 +1277,23 @@ export declare const lcm: {
927
  /**
928
  * Determines the least common multiple of two `bigint`s.
929
  *
930
- * @example
 
 
 
 
 
931
  * ```ts
932
- * import { lcm } from "effect/BigInt"
933
  * import * as assert from "node:assert"
934
  *
935
- * assert.deepStrictEqual(lcm(2n, 3n), 6n)
936
- * assert.deepStrictEqual(lcm(2n, 4n), 4n)
937
- * assert.deepStrictEqual(lcm(16n, 24n), 48n)
938
  * ```
939
  *
 
 
940
  * @category math
941
  * @since 2.0.0
942
  */
@@ -944,43 +1301,78 @@ export declare const lcm: {
944
  /**
945
  * Determines the least common multiple of two `bigint`s.
946
  *
947
- * @example
 
 
 
 
 
948
  * ```ts
949
- * import { lcm } from "effect/BigInt"
950
  * import * as assert from "node:assert"
951
  *
952
- * assert.deepStrictEqual(lcm(2n, 3n), 6n)
953
- * assert.deepStrictEqual(lcm(2n, 4n), 4n)
954
- * assert.deepStrictEqual(lcm(16n, 24n), 48n)
955
  * ```
956
  *
 
 
957
  * @category math
958
  * @since 2.0.0
959
  */
960
  (self: bigint, that: bigint): bigint;
961
  };
962
  /**
963
- * Determines the square root of a given `bigint` unsafely. Throws if the given `bigint` is negative.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
964
  *
965
- * @example
966
  * ```ts
967
- * import { sqrtUnsafe } from "effect/BigInt"
968
  * import * as assert from "node:assert"
969
  *
970
- * assert.deepStrictEqual(sqrtUnsafe(4n), 2n)
971
- * assert.deepStrictEqual(sqrtUnsafe(9n), 3n)
972
- * assert.deepStrictEqual(sqrtUnsafe(16n), 4n)
973
  * ```
974
  *
 
 
975
  * @category math
976
- * @since 2.0.0
977
  */
978
  export declare const sqrtUnsafe: (n: bigint) => bigint;
979
  /**
980
- * Determines the square root of a given `bigint` safely. Returns `Option.none()` if
981
- * the given `bigint` is negative.
982
  *
983
- * **Example**
 
 
 
 
 
 
 
 
 
 
 
984
  *
985
  * ```ts
986
  * import { BigInt } from "effect"
@@ -991,47 +1383,74 @@ export declare const sqrtUnsafe: (n: bigint) => bigint;
991
  * BigInt.sqrt(-1n) // Option.none()
992
  * ```
993
  *
 
 
994
  * @category math
995
  * @since 2.0.0
996
  */
997
  export declare const sqrt: (n: bigint) => Option.Option<bigint>;
998
  /**
999
- * Takes an `Iterable` of `bigint`s and returns their sum as a single `bigint
 
 
 
 
 
 
 
1000
  *
1001
- * @example
1002
  * ```ts
1003
- * import { sumAll } from "effect/BigInt"
1004
  * import * as assert from "node:assert"
1005
  *
1006
- * assert.deepStrictEqual(sumAll([2n, 3n, 4n]), 9n)
1007
  * ```
1008
  *
 
 
 
1009
  * @category math
1010
  * @since 2.0.0
1011
  */
1012
  export declare const sumAll: (collection: Iterable<bigint>) => bigint;
1013
  /**
1014
- * Takes an `Iterable` of `bigint`s and returns their multiplication as a single `number`.
 
 
 
 
 
 
1015
  *
1016
- * @example
1017
  * ```ts
1018
- * import { multiplyAll } from "effect/BigInt"
1019
  * import * as assert from "node:assert"
1020
  *
1021
- * assert.deepStrictEqual(multiplyAll([2n, 3n, 4n]), 24n)
1022
  * ```
1023
  *
 
 
 
1024
  * @category math
1025
  * @since 2.0.0
1026
  */
1027
  export declare const multiplyAll: (collection: Iterable<bigint>) => bigint;
1028
  /**
1029
- * Converts a `bigint` to a `number`.
 
 
 
 
 
 
 
1030
  *
1031
  * If the `bigint` is outside the safe integer range for JavaScript (`Number.MAX_SAFE_INTEGER`
1032
  * and `Number.MIN_SAFE_INTEGER`), it returns `Option.none()`.
1033
  *
1034
- * @example
 
1035
  * ```ts
1036
  * import { BigInt as BI } from "effect"
1037
  *
@@ -1040,17 +1459,26 @@ export declare const multiplyAll: (collection: Iterable<bigint>) => bigint;
1040
  * BI.toNumber(BigInt(Number.MIN_SAFE_INTEGER) - 1n) // Option.none()
1041
  * ```
1042
  *
1043
- * @category conversions
 
 
1044
  * @since 2.0.0
1045
  */
1046
  export declare const toNumber: (b: bigint) => Option.Option<number>;
1047
  /**
1048
- * Converts a string to a `bigint`.
 
 
 
 
 
 
1049
  *
1050
  * If the string is empty or contains characters that cannot be converted into a
1051
  * `bigint`, it returns `Option.none()`.
1052
  *
1053
- * @example
 
1054
  * ```ts
1055
  * import { BigInt } from "effect"
1056
  *
@@ -1059,18 +1487,27 @@ export declare const toNumber: (b: bigint) => Option.Option<number>;
1059
  * BigInt.fromString("a") // Option.none()
1060
  * ```
1061
  *
1062
- * @category conversions
 
 
1063
  * @since 2.4.12
1064
  */
1065
  export declare const fromString: (s: string) => Option.Option<bigint>;
1066
  /**
1067
  * Converts a number to a `bigint`.
1068
  *
 
 
 
 
 
 
1069
  * If the number is outside the safe integer range for JavaScript
1070
  * (`Number.MAX_SAFE_INTEGER` and `Number.MIN_SAFE_INTEGER`) or if the number is
1071
  * not a valid `bigint`, it returns `Option.none()`.
1072
  *
1073
- * @example
 
1074
  * ```ts
1075
  * import { BigInt } from "effect"
1076
  *
@@ -1080,14 +1517,27 @@ export declare const fromString: (s: string) => Option.Option<bigint>;
1080
  * BigInt.fromNumber(Number.MIN_SAFE_INTEGER - 1) // Option.none()
1081
  * ```
1082
  *
1083
- * @category conversions
 
 
 
1084
  * @since 2.4.12
1085
  */
1086
  export declare function fromNumber(n: number): Option.Option<bigint>;
1087
  /**
1088
- * Returns the remainder of dividing the first `bigint` by the second `bigint`.
 
 
 
 
 
 
 
 
 
 
 
1089
  *
1090
- * @example
1091
  * ```ts
1092
  * import { BigInt } from "effect"
1093
  *
@@ -1096,14 +1546,26 @@ export declare function fromNumber(n: number): Option.Option<bigint>;
1096
  * BigInt.remainder(15n, 4n) // 3n
1097
  * ```
1098
  *
 
 
1099
  * @category math
1100
  * @since 4.0.0
1101
  */
1102
  export declare const remainder: {
1103
  /**
1104
- * Returns the remainder of dividing the first `bigint` by the second `bigint`.
 
 
 
 
 
 
 
 
 
 
 
1105
  *
1106
- * @example
1107
  * ```ts
1108
  * import { BigInt } from "effect"
1109
  *
@@ -1112,14 +1574,26 @@ export declare const remainder: {
1112
  * BigInt.remainder(15n, 4n) // 3n
1113
  * ```
1114
  *
 
 
1115
  * @category math
1116
  * @since 4.0.0
1117
  */
1118
  (divisor: bigint): (self: bigint) => bigint;
1119
  /**
1120
- * Returns the remainder of dividing the first `bigint` by the second `bigint`.
 
 
 
 
 
 
 
 
 
 
 
1121
  *
1122
- * @example
1123
  * ```ts
1124
  * import { BigInt } from "effect"
1125
  *
@@ -1128,32 +1602,74 @@ export declare const remainder: {
1128
  * BigInt.remainder(15n, 4n) // 3n
1129
  * ```
1130
  *
 
 
1131
  * @category math
1132
  * @since 4.0.0
1133
  */
1134
  (self: bigint, divisor: bigint): bigint;
1135
  };
1136
  /**
1137
- * A `Reducer` for combining `bigint`s using addition.
 
 
 
 
 
 
 
 
1138
  *
 
 
 
 
1139
  * @since 4.0.0
1140
  */
1141
  export declare const ReducerSum: Reducer.Reducer<bigint>;
1142
  /**
1143
- * A `Reducer` for combining `bigint`s using multiplication.
 
 
 
 
 
 
1144
  *
 
 
 
 
 
 
1145
  * @since 4.0.0
1146
  */
1147
  export declare const ReducerMultiply: Reducer.Reducer<bigint>;
1148
  /**
1149
- * A `Combiner` that returns the maximum `bigint`.
 
 
 
 
 
 
 
1150
  *
 
1151
  * @since 4.0.0
1152
  */
1153
  export declare const CombinerMax: Combiner.Combiner<bigint>;
1154
  /**
1155
- * A `Combiner` that returns the minimum `bigint`.
 
 
 
 
1156
  *
 
 
 
 
1157
  * @since 4.0.0
1158
  */
1159
  export declare const CombinerMin: Combiner.Combiner<bigint>;
 
1
  /**
2
+ * Works with JavaScript `bigint` values.
3
+ *
4
+ * This module exposes the native `BigInt` constructor together with helpers for
5
+ * checking, arithmetic, comparison, range checks, safe parsing and conversions
6
+ * that return `Option`, integer square roots, aggregation, ordering,
7
+ * equivalence, reducers, and combiners.
8
  *
9
  * @since 2.0.0
10
  */
 
15
  import type { Ordering } from "./Ordering.ts";
16
  import * as Reducer from "./Reducer.ts";
17
  /**
18
+ * Exposes the global bigint constructor for JavaScript bigint coercion.
19
+ *
20
+ * **When to use**
21
+ *
22
+ * Use to access native JavaScript bigint constructor coercion from the Effect
23
+ * module namespace.
24
+ *
25
+ * **Gotchas**
26
+ *
27
+ * This follows native `BigInt` coercion rules. It throws for invalid strings or
28
+ * non-integral numbers, and whitespace-only strings coerce to `0n`.
29
+ *
30
+ * @see {@link fromString} for parsing strings into an `Option`
31
+ * @see {@link fromNumber} for converting safe integers into an `Option`
32
+ *
33
+ * **Example** (Constructing bigints)
34
  *
 
35
  * ```ts
36
+ * import { BigInt } from "effect"
37
  *
38
  * const bigInt = BigInt.BigInt(123)
39
  * console.log(bigInt) // 123n
 
47
  */
48
  export declare const BigInt: BigIntConstructor;
49
  /**
50
+ * Checks whether a value is a `bigint`.
51
+ *
52
+ * **When to use**
53
+ *
54
+ * Use to validate unknown input and narrow it to `bigint`.
55
+ *
56
+ * **Example** (Checking for bigints)
57
  *
 
58
  * ```ts
59
+ * import { BigInt } from "effect"
60
  * import * as assert from "node:assert"
61
  *
62
+ * assert.deepStrictEqual(BigInt.isBigInt(1n), true)
63
+ * assert.deepStrictEqual(BigInt.isBigInt(1), false)
64
  * ```
65
  *
66
  * @category guards
 
70
  /**
71
  * Provides an addition operation on `bigint`s.
72
  *
73
+ * **When to use**
74
+ *
75
+ * Use when you need a binary addition function for piping or higher-order APIs
76
+ * instead of the infix addition operator.
77
+ *
78
+ * **Example** (Adding bigints)
79
+ *
80
  * ```ts
81
+ * import { BigInt } from "effect"
82
  * import * as assert from "node:assert"
83
  *
84
+ * assert.deepStrictEqual(BigInt.sum(2n, 3n), 5n)
85
  * ```
86
  *
87
+ * @see {@link sumAll} for summing an iterable of `bigint` values
88
+ *
89
  * @category math
90
  * @since 2.0.0
91
  */
 
93
  /**
94
  * Provides an addition operation on `bigint`s.
95
  *
96
+ * **When to use**
97
+ *
98
+ * Use when you need a binary addition function for piping or higher-order APIs
99
+ * instead of the infix addition operator.
100
+ *
101
+ * **Example** (Adding bigints)
102
+ *
103
  * ```ts
104
+ * import { BigInt } from "effect"
105
  * import * as assert from "node:assert"
106
  *
107
+ * assert.deepStrictEqual(BigInt.sum(2n, 3n), 5n)
108
  * ```
109
  *
110
+ * @see {@link sumAll} for summing an iterable of `bigint` values
111
+ *
112
  * @category math
113
  * @since 2.0.0
114
  */
 
116
  /**
117
  * Provides an addition operation on `bigint`s.
118
  *
119
+ * **When to use**
120
+ *
121
+ * Use when you need a binary addition function for piping or higher-order APIs
122
+ * instead of the infix addition operator.
123
+ *
124
+ * **Example** (Adding bigints)
125
+ *
126
  * ```ts
127
+ * import { BigInt } from "effect"
128
  * import * as assert from "node:assert"
129
  *
130
+ * assert.deepStrictEqual(BigInt.sum(2n, 3n), 5n)
131
  * ```
132
  *
133
+ * @see {@link sumAll} for summing an iterable of `bigint` values
134
+ *
135
  * @category math
136
  * @since 2.0.0
137
  */
 
140
  /**
141
  * Provides a multiplication operation on `bigint`s.
142
  *
143
+ * **When to use**
144
+ *
145
+ * Use to multiply two `bigint` values.
146
+ *
147
+ * **Example** (Multiplying bigints)
148
+ *
149
  * ```ts
150
+ * import { BigInt } from "effect"
151
  * import * as assert from "node:assert"
152
  *
153
+ * assert.deepStrictEqual(BigInt.multiply(2n, 3n), 6n)
154
  * ```
155
  *
156
+ * @see {@link multiplyAll} for multiplying an iterable of `bigint` values
157
+ *
158
  * @category math
159
  * @since 2.0.0
160
  */
 
162
  /**
163
  * Provides a multiplication operation on `bigint`s.
164
  *
165
+ * **When to use**
166
+ *
167
+ * Use to multiply two `bigint` values.
168
+ *
169
+ * **Example** (Multiplying bigints)
170
+ *
171
  * ```ts
172
+ * import { BigInt } from "effect"
173
  * import * as assert from "node:assert"
174
  *
175
+ * assert.deepStrictEqual(BigInt.multiply(2n, 3n), 6n)
176
  * ```
177
  *
178
+ * @see {@link multiplyAll} for multiplying an iterable of `bigint` values
179
+ *
180
  * @category math
181
  * @since 2.0.0
182
  */
 
184
  /**
185
  * Provides a multiplication operation on `bigint`s.
186
  *
187
+ * **When to use**
188
+ *
189
+ * Use to multiply two `bigint` values.
190
+ *
191
+ * **Example** (Multiplying bigints)
192
+ *
193
  * ```ts
194
+ * import { BigInt } from "effect"
195
  * import * as assert from "node:assert"
196
  *
197
+ * assert.deepStrictEqual(BigInt.multiply(2n, 3n), 6n)
198
  * ```
199
  *
200
+ * @see {@link multiplyAll} for multiplying an iterable of `bigint` values
201
+ *
202
  * @category math
203
  * @since 2.0.0
204
  */
 
207
  /**
208
  * Provides a subtraction operation on `bigint`s.
209
  *
210
+ * **When to use**
211
+ *
212
+ * Use to subtract one `bigint` value from another.
213
+ *
214
+ * **Example** (Subtracting bigints)
215
+ *
216
  * ```ts
217
+ * import { BigInt } from "effect"
218
  * import * as assert from "node:assert"
219
  *
220
+ * assert.deepStrictEqual(BigInt.subtract(2n, 3n), -1n)
221
  * ```
222
  *
223
  * @category math
 
227
  /**
228
  * Provides a subtraction operation on `bigint`s.
229
  *
230
+ * **When to use**
231
+ *
232
+ * Use to subtract one `bigint` value from another.
233
+ *
234
+ * **Example** (Subtracting bigints)
235
+ *
236
  * ```ts
237
+ * import { BigInt } from "effect"
238
  * import * as assert from "node:assert"
239
  *
240
+ * assert.deepStrictEqual(BigInt.subtract(2n, 3n), -1n)
241
  * ```
242
  *
243
  * @category math
 
247
  /**
248
  * Provides a subtraction operation on `bigint`s.
249
  *
250
+ * **When to use**
251
+ *
252
+ * Use to subtract one `bigint` value from another.
253
+ *
254
+ * **Example** (Subtracting bigints)
255
+ *
256
  * ```ts
257
+ * import { BigInt } from "effect"
258
  * import * as assert from "node:assert"
259
  *
260
+ * assert.deepStrictEqual(BigInt.subtract(2n, 3n), -1n)
261
  * ```
262
  *
263
  * @category math
 
266
  (self: bigint, that: bigint): bigint;
267
  };
268
  /**
269
+ * Divides one `bigint` by another safely.
270
+ *
271
+ * **When to use**
272
  *
273
+ * Use to divide `bigint` values while representing division by zero as
274
+ * `Option.none`.
275
  *
276
+ * **Details**
277
+ *
278
+ * Uses JavaScript `bigint` division, so non-exact quotients are truncated
279
+ * toward zero. Returns `Option.none()` when the divisor is `0n`.
280
+ *
281
+ * **Example** (Dividing bigints safely)
282
  *
 
283
  * ```ts
284
+ * import { BigInt, Option } from "effect"
285
  * import * as assert from "node:assert"
286
  *
287
+ * assert.deepStrictEqual(BigInt.divide(6n, 3n), Option.some(2n))
288
+ * assert.deepStrictEqual(BigInt.divide(6n, 0n), Option.none())
 
 
289
  * ```
290
  *
291
+ * @see {@link divideUnsafe} for division that throws when the divisor is `0n`
292
+ * @see {@link remainder} for the JavaScript remainder operation
293
+ *
294
  * @category math
295
  * @since 2.0.0
296
  */
297
  export declare const divide: {
298
  /**
299
+ * Divides one `bigint` by another safely.
300
+ *
301
+ * **When to use**
302
+ *
303
+ * Use to divide `bigint` values while representing division by zero as
304
+ * `Option.none`.
305
  *
306
+ * **Details**
 
307
  *
308
+ * Uses JavaScript `bigint` division, so non-exact quotients are truncated
309
+ * toward zero. Returns `Option.none()` when the divisor is `0n`.
310
+ *
311
+ * **Example** (Dividing bigints safely)
312
  *
 
313
  * ```ts
314
+ * import { BigInt, Option } from "effect"
315
  * import * as assert from "node:assert"
316
  *
317
+ * assert.deepStrictEqual(BigInt.divide(6n, 3n), Option.some(2n))
318
+ * assert.deepStrictEqual(BigInt.divide(6n, 0n), Option.none())
 
 
319
  * ```
320
  *
321
+ * @see {@link divideUnsafe} for division that throws when the divisor is `0n`
322
+ * @see {@link remainder} for the JavaScript remainder operation
323
+ *
324
  * @category math
325
  * @since 2.0.0
326
  */
327
  (that: bigint): (self: bigint) => Option.Option<bigint>;
328
  /**
329
+ * Divides one `bigint` by another safely.
330
  *
331
+ * **When to use**
 
332
  *
333
+ * Use to divide `bigint` values while representing division by zero as
334
+ * `Option.none`.
335
+ *
336
+ * **Details**
337
+ *
338
+ * Uses JavaScript `bigint` division, so non-exact quotients are truncated
339
+ * toward zero. Returns `Option.none()` when the divisor is `0n`.
340
+ *
341
+ * **Example** (Dividing bigints safely)
342
  *
 
343
  * ```ts
344
+ * import { BigInt, Option } from "effect"
345
  * import * as assert from "node:assert"
346
  *
347
+ * assert.deepStrictEqual(BigInt.divide(6n, 3n), Option.some(2n))
348
+ * assert.deepStrictEqual(BigInt.divide(6n, 0n), Option.none())
 
 
349
  * ```
350
  *
351
+ * @see {@link divideUnsafe} for division that throws when the divisor is `0n`
352
+ * @see {@link remainder} for the JavaScript remainder operation
353
+ *
354
  * @category math
355
  * @since 2.0.0
356
  */
357
  (self: bigint, that: bigint): Option.Option<bigint>;
358
  };
359
  /**
360
+ * Divides one `bigint` by another, throwing if the divisor is zero.
361
  *
362
+ * **When to use**
 
363
  *
364
+ * Use to divide `bigint` values where the divisor is known to be non-zero and
365
+ * division by zero should be a thrown exception.
366
+ *
367
+ * **Details**
368
+ *
369
+ * Uses JavaScript `bigint` division, so non-exact quotients are truncated
370
+ * toward zero.
371
+ *
372
+ * **Gotchas**
373
+ *
374
+ * Throws a `RangeError` when the divisor is `0n`.
375
+ *
376
+ * **Example** (Dividing bigints unsafely)
377
  *
 
378
  * ```ts
379
+ * import { BigInt } from "effect"
380
  * import * as assert from "node:assert"
381
  *
382
+ * assert.deepStrictEqual(BigInt.divideUnsafe(6n, 3n), 2n)
383
+ * assert.deepStrictEqual(BigInt.divideUnsafe(6n, 4n), 1n)
384
  * ```
385
  *
386
+ * @see {@link divide} for division that returns `Option.none` when the divisor is `0n`
387
+ *
388
  * @category math
389
+ * @since 4.0.0
390
  */
391
  export declare const divideUnsafe: {
392
  /**
393
+ * Divides one `bigint` by another, throwing if the divisor is zero.
394
+ *
395
+ * **When to use**
396
+ *
397
+ * Use to divide `bigint` values where the divisor is known to be non-zero and
398
+ * division by zero should be a thrown exception.
399
+ *
400
+ * **Details**
401
  *
402
+ * Uses JavaScript `bigint` division, so non-exact quotients are truncated
403
+ * toward zero.
404
  *
405
+ * **Gotchas**
406
+ *
407
+ * Throws a `RangeError` when the divisor is `0n`.
408
+ *
409
+ * **Example** (Dividing bigints unsafely)
410
  *
 
411
  * ```ts
412
+ * import { BigInt } from "effect"
413
  * import * as assert from "node:assert"
414
  *
415
+ * assert.deepStrictEqual(BigInt.divideUnsafe(6n, 3n), 2n)
416
+ * assert.deepStrictEqual(BigInt.divideUnsafe(6n, 4n), 1n)
417
  * ```
418
  *
419
+ * @see {@link divide} for division that returns `Option.none` when the divisor is `0n`
420
+ *
421
  * @category math
422
+ * @since 4.0.0
423
  */
424
  (that: bigint): (self: bigint) => bigint;
425
  /**
426
+ * Divides one `bigint` by another, throwing if the divisor is zero.
427
+ *
428
+ * **When to use**
429
+ *
430
+ * Use to divide `bigint` values where the divisor is known to be non-zero and
431
+ * division by zero should be a thrown exception.
432
+ *
433
+ * **Details**
434
+ *
435
+ * Uses JavaScript `bigint` division, so non-exact quotients are truncated
436
+ * toward zero.
437
+ *
438
+ * **Gotchas**
439
  *
440
+ * Throws a `RangeError` when the divisor is `0n`.
 
441
  *
442
+ * **Example** (Dividing bigints unsafely)
443
  *
 
444
  * ```ts
445
+ * import { BigInt } from "effect"
446
  * import * as assert from "node:assert"
447
  *
448
+ * assert.deepStrictEqual(BigInt.divideUnsafe(6n, 3n), 2n)
449
+ * assert.deepStrictEqual(BigInt.divideUnsafe(6n, 4n), 1n)
450
  * ```
451
  *
452
+ * @see {@link divide} for division that returns `Option.none` when the divisor is `0n`
453
+ *
454
  * @category math
455
+ * @since 4.0.0
456
  */
457
  (self: bigint, that: bigint): bigint;
458
  };
459
  /**
460
+ * Returns the result of adding `1n` to a `bigint`.
461
+ *
462
+ * **When to use**
463
+ *
464
+ * Use to increment a `bigint` counter by one.
465
+ *
466
+ * **Example** (Incrementing a bigint)
467
  *
 
468
  * ```ts
469
+ * import { BigInt } from "effect"
470
  * import * as assert from "node:assert"
471
  *
472
+ * assert.deepStrictEqual(BigInt.increment(2n), 3n)
473
  * ```
474
  *
475
  * @category math
 
477
  */
478
  export declare const increment: (n: bigint) => bigint;
479
  /**
480
+ * Returns the result of subtracting `1n` from a `bigint`.
481
+ *
482
+ * **When to use**
483
+ *
484
+ * Use to decrement a `bigint` counter by one.
485
+ *
486
+ * **Example** (Decrementing a bigint)
487
  *
 
488
  * ```ts
489
+ * import { BigInt } from "effect"
490
  * import * as assert from "node:assert"
491
  *
492
+ * assert.deepStrictEqual(BigInt.decrement(3n), 2n)
493
  * ```
494
  *
495
  * @category math
 
499
  /**
500
  * Provides an `Order` instance for `bigint` that allows comparing and sorting BigInt values.
501
  *
502
+ * **When to use**
503
+ *
504
+ * Use when you need to sort or compare bigint values through APIs that accept
505
+ * an ordering instance.
506
+ *
507
+ * **Example** (Comparing bigints with Order)
508
+ *
509
  * ```ts
510
+ * import { BigInt } from "effect"
511
  *
512
  * const a = 123n
513
  * const b = 456n
 
523
  */
524
  export declare const Order: order.Order<bigint>;
525
  /**
526
+ * Equivalence instance for bigints using strict equality (`===`).
527
+ *
528
+ * **When to use**
529
+ *
530
+ * Use when checking bigint equality through APIs that accept an equivalence
531
+ * relation.
532
+ *
533
+ * **Example** (Comparing bigints for equivalence)
534
  *
 
535
  * ```ts
536
  * import { BigInt } from "effect"
537
  *
 
540
  * ```
541
  *
542
  * @category instances
543
+ * @since 2.0.0
544
  */
545
  export declare const Equivalence: Equ.Equivalence<bigint>;
546
  /**
547
  * Returns `true` if the first argument is less than the second, otherwise `false`.
548
  *
549
+ * **When to use**
550
+ *
551
+ * Use to test whether one `bigint` is strictly less than another.
552
+ *
553
+ * **Example** (Checking less-than comparisons)
554
+ *
555
  * ```ts
556
+ * import { BigInt } from "effect"
557
  * import * as assert from "node:assert"
558
  *
559
+ * assert.deepStrictEqual(BigInt.isLessThan(2n, 3n), true)
560
+ * assert.deepStrictEqual(BigInt.isLessThan(3n, 3n), false)
561
+ * assert.deepStrictEqual(BigInt.isLessThan(4n, 3n), false)
562
  * ```
563
  *
564
  * @category predicates
565
+ * @since 4.0.0
566
  */
567
  export declare const isLessThan: {
568
  /**
569
  * Returns `true` if the first argument is less than the second, otherwise `false`.
570
  *
571
+ * **When to use**
572
+ *
573
+ * Use to test whether one `bigint` is strictly less than another.
574
+ *
575
+ * **Example** (Checking less-than comparisons)
576
+ *
577
  * ```ts
578
+ * import { BigInt } from "effect"
579
  * import * as assert from "node:assert"
580
  *
581
+ * assert.deepStrictEqual(BigInt.isLessThan(2n, 3n), true)
582
+ * assert.deepStrictEqual(BigInt.isLessThan(3n, 3n), false)
583
+ * assert.deepStrictEqual(BigInt.isLessThan(4n, 3n), false)
584
  * ```
585
  *
586
  * @category predicates
587
+ * @since 4.0.0
588
  */
589
  (that: bigint): (self: bigint) => boolean;
590
  /**
591
  * Returns `true` if the first argument is less than the second, otherwise `false`.
592
  *
593
+ * **When to use**
594
+ *
595
+ * Use to test whether one `bigint` is strictly less than another.
596
+ *
597
+ * **Example** (Checking less-than comparisons)
598
+ *
599
  * ```ts
600
+ * import { BigInt } from "effect"
601
  * import * as assert from "node:assert"
602
  *
603
+ * assert.deepStrictEqual(BigInt.isLessThan(2n, 3n), true)
604
+ * assert.deepStrictEqual(BigInt.isLessThan(3n, 3n), false)
605
+ * assert.deepStrictEqual(BigInt.isLessThan(4n, 3n), false)
606
  * ```
607
  *
608
  * @category predicates
609
+ * @since 4.0.0
610
  */
611
  (self: bigint, that: bigint): boolean;
612
  };
613
  /**
614
  * Returns a function that checks if a given `bigint` is less than or equal to the provided one.
615
  *
616
+ * **When to use**
617
+ *
618
+ * Use to test whether one `bigint` is less than or equal to another.
619
+ *
620
+ * **Example** (Checking less-than-or-equal comparisons)
621
+ *
622
  * ```ts
623
+ * import { BigInt } from "effect"
624
  * import * as assert from "node:assert"
625
  *
626
+ * assert.deepStrictEqual(BigInt.isLessThanOrEqualTo(2n, 3n), true)
627
+ * assert.deepStrictEqual(BigInt.isLessThanOrEqualTo(3n, 3n), true)
628
+ * assert.deepStrictEqual(BigInt.isLessThanOrEqualTo(4n, 3n), false)
629
  * ```
630
  *
631
  * @category predicates
632
+ * @since 4.0.0
633
  */
634
  export declare const isLessThanOrEqualTo: {
635
  /**
636
  * Returns a function that checks if a given `bigint` is less than or equal to the provided one.
637
  *
638
+ * **When to use**
639
+ *
640
+ * Use to test whether one `bigint` is less than or equal to another.
641
+ *
642
+ * **Example** (Checking less-than-or-equal comparisons)
643
+ *
644
  * ```ts
645
+ * import { BigInt } from "effect"
646
  * import * as assert from "node:assert"
647
  *
648
+ * assert.deepStrictEqual(BigInt.isLessThanOrEqualTo(2n, 3n), true)
649
+ * assert.deepStrictEqual(BigInt.isLessThanOrEqualTo(3n, 3n), true)
650
+ * assert.deepStrictEqual(BigInt.isLessThanOrEqualTo(4n, 3n), false)
651
  * ```
652
  *
653
  * @category predicates
654
+ * @since 4.0.0
655
  */
656
  (that: bigint): (self: bigint) => boolean;
657
  /**
658
  * Returns a function that checks if a given `bigint` is less than or equal to the provided one.
659
  *
660
+ * **When to use**
661
+ *
662
+ * Use to test whether one `bigint` is less than or equal to another.
663
+ *
664
+ * **Example** (Checking less-than-or-equal comparisons)
665
+ *
666
  * ```ts
667
+ * import { BigInt } from "effect"
668
  * import * as assert from "node:assert"
669
  *
670
+ * assert.deepStrictEqual(BigInt.isLessThanOrEqualTo(2n, 3n), true)
671
+ * assert.deepStrictEqual(BigInt.isLessThanOrEqualTo(3n, 3n), true)
672
+ * assert.deepStrictEqual(BigInt.isLessThanOrEqualTo(4n, 3n), false)
673
  * ```
674
  *
675
  * @category predicates
676
+ * @since 4.0.0
677
  */
678
  (self: bigint, that: bigint): boolean;
679
  };
680
  /**
681
  * Returns `true` if the first argument is greater than the second, otherwise `false`.
682
  *
683
+ * **When to use**
684
+ *
685
+ * Use to test whether one `bigint` is strictly greater than another.
686
+ *
687
+ * **Example** (Checking greater-than comparisons)
688
+ *
689
  * ```ts
690
+ * import { BigInt } from "effect"
691
  * import * as assert from "node:assert"
692
  *
693
+ * assert.deepStrictEqual(BigInt.isGreaterThan(2n, 3n), false)
694
+ * assert.deepStrictEqual(BigInt.isGreaterThan(3n, 3n), false)
695
+ * assert.deepStrictEqual(BigInt.isGreaterThan(4n, 3n), true)
696
  * ```
697
  *
698
  * @category predicates
699
+ * @since 4.0.0
700
  */
701
  export declare const isGreaterThan: {
702
  /**
703
  * Returns `true` if the first argument is greater than the second, otherwise `false`.
704
  *
705
+ * **When to use**
706
+ *
707
+ * Use to test whether one `bigint` is strictly greater than another.
708
+ *
709
+ * **Example** (Checking greater-than comparisons)
710
+ *
711
  * ```ts
712
+ * import { BigInt } from "effect"
713
  * import * as assert from "node:assert"
714
  *
715
+ * assert.deepStrictEqual(BigInt.isGreaterThan(2n, 3n), false)
716
+ * assert.deepStrictEqual(BigInt.isGreaterThan(3n, 3n), false)
717
+ * assert.deepStrictEqual(BigInt.isGreaterThan(4n, 3n), true)
718
  * ```
719
  *
720
  * @category predicates
721
+ * @since 4.0.0
722
  */
723
  (that: bigint): (self: bigint) => boolean;
724
  /**
725
  * Returns `true` if the first argument is greater than the second, otherwise `false`.
726
  *
727
+ * **When to use**
728
+ *
729
+ * Use to test whether one `bigint` is strictly greater than another.
730
+ *
731
+ * **Example** (Checking greater-than comparisons)
732
+ *
733
  * ```ts
734
+ * import { BigInt } from "effect"
735
  * import * as assert from "node:assert"
736
  *
737
+ * assert.deepStrictEqual(BigInt.isGreaterThan(2n, 3n), false)
738
+ * assert.deepStrictEqual(BigInt.isGreaterThan(3n, 3n), false)
739
+ * assert.deepStrictEqual(BigInt.isGreaterThan(4n, 3n), true)
740
  * ```
741
  *
742
  * @category predicates
743
+ * @since 4.0.0
744
  */
745
  (self: bigint, that: bigint): boolean;
746
  };
747
  /**
748
  * Returns a function that checks if a given `bigint` is greater than or equal to the provided one.
749
  *
750
+ * **When to use**
751
+ *
752
+ * Use to test whether one `bigint` is greater than or equal to another.
753
+ *
754
+ * **Example** (Checking greater-than-or-equal comparisons)
755
+ *
756
  * ```ts
757
+ * import { BigInt } from "effect"
758
  * import * as assert from "node:assert"
759
  *
760
+ * assert.deepStrictEqual(BigInt.isGreaterThanOrEqualTo(2n, 3n), false)
761
+ * assert.deepStrictEqual(BigInt.isGreaterThanOrEqualTo(3n, 3n), true)
762
+ * assert.deepStrictEqual(BigInt.isGreaterThanOrEqualTo(4n, 3n), true)
763
  * ```
764
  *
765
  * @category predicates
766
+ * @since 4.0.0
767
  */
768
  export declare const isGreaterThanOrEqualTo: {
769
  /**
770
  * Returns a function that checks if a given `bigint` is greater than or equal to the provided one.
771
  *
772
+ * **When to use**
773
+ *
774
+ * Use to test whether one `bigint` is greater than or equal to another.
775
+ *
776
+ * **Example** (Checking greater-than-or-equal comparisons)
777
+ *
778
  * ```ts
779
+ * import { BigInt } from "effect"
780
  * import * as assert from "node:assert"
781
  *
782
+ * assert.deepStrictEqual(BigInt.isGreaterThanOrEqualTo(2n, 3n), false)
783
+ * assert.deepStrictEqual(BigInt.isGreaterThanOrEqualTo(3n, 3n), true)
784
+ * assert.deepStrictEqual(BigInt.isGreaterThanOrEqualTo(4n, 3n), true)
785
  * ```
786
  *
787
  * @category predicates
788
+ * @since 4.0.0
789
  */
790
  (that: bigint): (self: bigint) => boolean;
791
  /**
792
  * Returns a function that checks if a given `bigint` is greater than or equal to the provided one.
793
  *
794
+ * **When to use**
795
+ *
796
+ * Use to test whether one `bigint` is greater than or equal to another.
797
+ *
798
+ * **Example** (Checking greater-than-or-equal comparisons)
799
+ *
800
  * ```ts
801
+ * import { BigInt } from "effect"
802
  * import * as assert from "node:assert"
803
  *
804
+ * assert.deepStrictEqual(BigInt.isGreaterThanOrEqualTo(2n, 3n), false)
805
+ * assert.deepStrictEqual(BigInt.isGreaterThanOrEqualTo(3n, 3n), true)
806
+ * assert.deepStrictEqual(BigInt.isGreaterThanOrEqualTo(4n, 3n), true)
807
  * ```
808
  *
809
  * @category predicates
810
+ * @since 4.0.0
811
  */
812
  (self: bigint, that: bigint): boolean;
813
  };
814
  /**
815
+ * Checks whether a `bigint` is between a `minimum` and `maximum` value (inclusive).
816
+ *
817
+ * **When to use**
818
+ *
819
+ * Use to test whether a `bigint` falls inside an inclusive range.
820
+ *
821
+ * **Example** (Checking whether a bigint is within bounds)
822
  *
 
823
  * ```ts
824
+ * import { BigInt } from "effect"
825
  * import * as assert from "node:assert"
826
  *
827
  * const between = BigInt.between({ minimum: 0n, maximum: 5n })
 
831
  * assert.deepStrictEqual(between(6n), false)
832
  * ```
833
  *
834
+ * @see {@link clamp} for forcing a `bigint` into an inclusive range
835
+ *
836
  * @category predicates
837
  * @since 2.0.0
838
  */
839
  export declare const between: {
840
  /**
841
+ * Checks whether a `bigint` is between a `minimum` and `maximum` value (inclusive).
842
+ *
843
+ * **When to use**
844
+ *
845
+ * Use to test whether a `bigint` falls inside an inclusive range.
846
+ *
847
+ * **Example** (Checking whether a bigint is within bounds)
848
  *
 
849
  * ```ts
850
+ * import { BigInt } from "effect"
851
  * import * as assert from "node:assert"
852
  *
853
  * const between = BigInt.between({ minimum: 0n, maximum: 5n })
 
857
  * assert.deepStrictEqual(between(6n), false)
858
  * ```
859
  *
860
+ * @see {@link clamp} for forcing a `bigint` into an inclusive range
861
+ *
862
  * @category predicates
863
  * @since 2.0.0
864
  */
 
867
  maximum: bigint;
868
  }): (self: bigint) => boolean;
869
  /**
870
+ * Checks whether a `bigint` is between a `minimum` and `maximum` value (inclusive).
871
+ *
872
+ * **When to use**
873
+ *
874
+ * Use to test whether a `bigint` falls inside an inclusive range.
875
+ *
876
+ * **Example** (Checking whether a bigint is within bounds)
877
  *
 
878
  * ```ts
879
+ * import { BigInt } from "effect"
880
  * import * as assert from "node:assert"
881
  *
882
  * const between = BigInt.between({ minimum: 0n, maximum: 5n })
 
886
  * assert.deepStrictEqual(between(6n), false)
887
  * ```
888
  *
889
+ * @see {@link clamp} for forcing a `bigint` into an inclusive range
890
+ *
891
  * @category predicates
892
  * @since 2.0.0
893
  */
 
899
  /**
900
  * Restricts the given `bigint` to be within the range specified by the `minimum` and `maximum` values.
901
  *
902
+ * **When to use**
903
+ *
904
+ * Use to force a `bigint` into an inclusive range.
905
+ *
906
+ * **Details**
907
+ *
908
+ * If the `bigint` is less than the minimum, the function returns the minimum.
909
+ * If the `bigint` is greater than the maximum, the function returns the
910
+ * maximum. Otherwise, it returns the original `bigint`.
911
+ *
912
+ * **Example** (Clamping a bigint to bounds)
913
  *
 
914
  * ```ts
915
+ * import { BigInt } from "effect"
916
  * import * as assert from "node:assert"
917
  *
918
  * const clamp = BigInt.clamp({ minimum: 1n, maximum: 5n })
 
922
  * assert.equal(clamp(6n), 5n)
923
  * ```
924
  *
925
+ * @see {@link between} for checking whether a `bigint` is already inside a range
926
+ *
927
  * @category math
928
  * @since 2.0.0
929
  */
 
931
  /**
932
  * Restricts the given `bigint` to be within the range specified by the `minimum` and `maximum` values.
933
  *
934
+ * **When to use**
935
+ *
936
+ * Use to force a `bigint` into an inclusive range.
937
+ *
938
+ * **Details**
939
+ *
940
+ * If the `bigint` is less than the minimum, the function returns the minimum.
941
+ * If the `bigint` is greater than the maximum, the function returns the
942
+ * maximum. Otherwise, it returns the original `bigint`.
943
+ *
944
+ * **Example** (Clamping a bigint to bounds)
945
  *
 
946
  * ```ts
947
+ * import { BigInt } from "effect"
948
  * import * as assert from "node:assert"
949
  *
950
  * const clamp = BigInt.clamp({ minimum: 1n, maximum: 5n })
 
954
  * assert.equal(clamp(6n), 5n)
955
  * ```
956
  *
957
+ * @see {@link between} for checking whether a `bigint` is already inside a range
958
+ *
959
  * @category math
960
  * @since 2.0.0
961
  */
 
966
  /**
967
  * Restricts the given `bigint` to be within the range specified by the `minimum` and `maximum` values.
968
  *
969
+ * **When to use**
970
+ *
971
+ * Use to force a `bigint` into an inclusive range.
972
+ *
973
+ * **Details**
974
+ *
975
+ * If the `bigint` is less than the minimum, the function returns the minimum.
976
+ * If the `bigint` is greater than the maximum, the function returns the
977
+ * maximum. Otherwise, it returns the original `bigint`.
978
+ *
979
+ * **Example** (Clamping a bigint to bounds)
980
  *
 
981
  * ```ts
982
+ * import { BigInt } from "effect"
983
  * import * as assert from "node:assert"
984
  *
985
  * const clamp = BigInt.clamp({ minimum: 1n, maximum: 5n })
 
989
  * assert.equal(clamp(6n), 5n)
990
  * ```
991
  *
992
+ * @see {@link between} for checking whether a `bigint` is already inside a range
993
+ *
994
  * @category math
995
  * @since 2.0.0
996
  */
 
1002
  /**
1003
  * Returns the minimum between two `bigint`s.
1004
  *
1005
+ * **When to use**
1006
+ *
1007
+ * Use to select the smaller of two `bigint` values.
1008
+ *
1009
+ * **Example** (Finding the minimum bigint)
1010
+ *
1011
  * ```ts
1012
+ * import { BigInt } from "effect"
1013
  * import * as assert from "node:assert"
1014
  *
1015
+ * assert.deepStrictEqual(BigInt.min(2n, 3n), 2n)
1016
  * ```
1017
  *
1018
+ * @see {@link max} for selecting the larger value
1019
+ *
1020
  * @category math
1021
  * @since 2.0.0
1022
  */
 
1024
  /**
1025
  * Returns the minimum between two `bigint`s.
1026
  *
1027
+ * **When to use**
1028
+ *
1029
+ * Use to select the smaller of two `bigint` values.
1030
+ *
1031
+ * **Example** (Finding the minimum bigint)
1032
+ *
1033
  * ```ts
1034
+ * import { BigInt } from "effect"
1035
  * import * as assert from "node:assert"
1036
  *
1037
+ * assert.deepStrictEqual(BigInt.min(2n, 3n), 2n)
1038
  * ```
1039
  *
1040
+ * @see {@link max} for selecting the larger value
1041
+ *
1042
  * @category math
1043
  * @since 2.0.0
1044
  */
 
1046
  /**
1047
  * Returns the minimum between two `bigint`s.
1048
  *
1049
+ * **When to use**
1050
+ *
1051
+ * Use to select the smaller of two `bigint` values.
1052
+ *
1053
+ * **Example** (Finding the minimum bigint)
1054
+ *
1055
  * ```ts
1056
+ * import { BigInt } from "effect"
1057
  * import * as assert from "node:assert"
1058
  *
1059
+ * assert.deepStrictEqual(BigInt.min(2n, 3n), 2n)
1060
  * ```
1061
  *
1062
+ * @see {@link max} for selecting the larger value
1063
+ *
1064
  * @category math
1065
  * @since 2.0.0
1066
  */
 
1069
  /**
1070
  * Returns the maximum between two `bigint`s.
1071
  *
1072
+ * **When to use**
1073
+ *
1074
+ * Use to select the larger of two `bigint` values.
1075
+ *
1076
+ * **Example** (Finding the maximum bigint)
1077
+ *
1078
  * ```ts
1079
+ * import { BigInt } from "effect"
1080
  * import * as assert from "node:assert"
1081
  *
1082
+ * assert.deepStrictEqual(BigInt.max(2n, 3n), 3n)
1083
  * ```
1084
  *
1085
+ * @see {@link min} for selecting the smaller value
1086
+ *
1087
  * @category math
1088
  * @since 2.0.0
1089
  */
 
1091
  /**
1092
  * Returns the maximum between two `bigint`s.
1093
  *
1094
+ * **When to use**
1095
+ *
1096
+ * Use to select the larger of two `bigint` values.
1097
+ *
1098
+ * **Example** (Finding the maximum bigint)
1099
+ *
1100
  * ```ts
1101
+ * import { BigInt } from "effect"
1102
  * import * as assert from "node:assert"
1103
  *
1104
+ * assert.deepStrictEqual(BigInt.max(2n, 3n), 3n)
1105
  * ```
1106
  *
1107
+ * @see {@link min} for selecting the smaller value
1108
+ *
1109
  * @category math
1110
  * @since 2.0.0
1111
  */
 
1113
  /**
1114
  * Returns the maximum between two `bigint`s.
1115
  *
1116
+ * **When to use**
1117
+ *
1118
+ * Use to select the larger of two `bigint` values.
1119
+ *
1120
+ * **Example** (Finding the maximum bigint)
1121
+ *
1122
  * ```ts
1123
+ * import { BigInt } from "effect"
1124
  * import * as assert from "node:assert"
1125
  *
1126
+ * assert.deepStrictEqual(BigInt.max(2n, 3n), 3n)
1127
  * ```
1128
  *
1129
+ * @see {@link min} for selecting the smaller value
1130
+ *
1131
  * @category math
1132
  * @since 2.0.0
1133
  */
 
1136
  /**
1137
  * Determines the sign of a given `bigint`.
1138
  *
1139
+ * **When to use**
1140
+ *
1141
+ * Use to classify a `bigint` as negative, zero, or positive.
1142
+ *
1143
+ * **Example** (Determining bigint signs)
1144
+ *
1145
  * ```ts
1146
+ * import { BigInt } from "effect"
1147
  * import * as assert from "node:assert"
1148
  *
1149
+ * assert.deepStrictEqual(BigInt.sign(-5n), -1)
1150
+ * assert.deepStrictEqual(BigInt.sign(0n), 0)
1151
+ * assert.deepStrictEqual(BigInt.sign(5n), 1)
1152
  * ```
1153
  *
1154
  * @category math
 
1158
  /**
1159
  * Determines the absolute value of a given `bigint`.
1160
  *
1161
+ * **When to use**
1162
+ *
1163
+ * Use to remove the sign from a `bigint` while preserving its magnitude.
1164
+ *
1165
+ * **Example** (Calculating absolute values)
1166
+ *
1167
  * ```ts
1168
+ * import { BigInt } from "effect"
1169
  * import * as assert from "node:assert"
1170
  *
1171
+ * assert.deepStrictEqual(BigInt.abs(-5n), 5n)
1172
+ * assert.deepStrictEqual(BigInt.abs(0n), 0n)
1173
+ * assert.deepStrictEqual(BigInt.abs(5n), 5n)
1174
  * ```
1175
  *
1176
  * @category math
 
1180
  /**
1181
  * Determines the greatest common divisor of two `bigint`s.
1182
  *
1183
+ * **When to use**
1184
+ *
1185
+ * Use to compute the greatest common divisor of two integer values.
1186
+ *
1187
+ * **Example** (Calculating greatest common divisors)
1188
+ *
1189
  * ```ts
1190
+ * import { BigInt } from "effect"
1191
  * import * as assert from "node:assert"
1192
  *
1193
+ * assert.deepStrictEqual(BigInt.gcd(2n, 3n), 1n)
1194
+ * assert.deepStrictEqual(BigInt.gcd(2n, 4n), 2n)
1195
+ * assert.deepStrictEqual(BigInt.gcd(16n, 24n), 8n)
1196
  * ```
1197
  *
1198
+ * @see {@link lcm} for computing the least common multiple
1199
+ *
1200
  * @category math
1201
  * @since 2.0.0
1202
  */
 
1204
  /**
1205
  * Determines the greatest common divisor of two `bigint`s.
1206
  *
1207
+ * **When to use**
1208
+ *
1209
+ * Use to compute the greatest common divisor of two integer values.
1210
+ *
1211
+ * **Example** (Calculating greatest common divisors)
1212
+ *
1213
  * ```ts
1214
+ * import { BigInt } from "effect"
1215
  * import * as assert from "node:assert"
1216
  *
1217
+ * assert.deepStrictEqual(BigInt.gcd(2n, 3n), 1n)
1218
+ * assert.deepStrictEqual(BigInt.gcd(2n, 4n), 2n)
1219
+ * assert.deepStrictEqual(BigInt.gcd(16n, 24n), 8n)
1220
  * ```
1221
  *
1222
+ * @see {@link lcm} for computing the least common multiple
1223
+ *
1224
  * @category math
1225
  * @since 2.0.0
1226
  */
 
1228
  /**
1229
  * Determines the greatest common divisor of two `bigint`s.
1230
  *
1231
+ * **When to use**
1232
+ *
1233
+ * Use to compute the greatest common divisor of two integer values.
1234
+ *
1235
+ * **Example** (Calculating greatest common divisors)
1236
+ *
1237
  * ```ts
1238
+ * import { BigInt } from "effect"
1239
  * import * as assert from "node:assert"
1240
  *
1241
+ * assert.deepStrictEqual(BigInt.gcd(2n, 3n), 1n)
1242
+ * assert.deepStrictEqual(BigInt.gcd(2n, 4n), 2n)
1243
+ * assert.deepStrictEqual(BigInt.gcd(16n, 24n), 8n)
1244
  * ```
1245
  *
1246
+ * @see {@link lcm} for computing the least common multiple
1247
+ *
1248
  * @category math
1249
  * @since 2.0.0
1250
  */
 
1253
  /**
1254
  * Determines the least common multiple of two `bigint`s.
1255
  *
1256
+ * **When to use**
1257
+ *
1258
+ * Use to compute the least common multiple of two integer values.
1259
+ *
1260
+ * **Example** (Calculating least common multiples)
1261
+ *
1262
  * ```ts
1263
+ * import { BigInt } from "effect"
1264
  * import * as assert from "node:assert"
1265
  *
1266
+ * assert.deepStrictEqual(BigInt.lcm(2n, 3n), 6n)
1267
+ * assert.deepStrictEqual(BigInt.lcm(2n, 4n), 4n)
1268
+ * assert.deepStrictEqual(BigInt.lcm(16n, 24n), 48n)
1269
  * ```
1270
  *
1271
+ * @see {@link gcd} for computing the greatest common divisor
1272
+ *
1273
  * @category math
1274
  * @since 2.0.0
1275
  */
 
1277
  /**
1278
  * Determines the least common multiple of two `bigint`s.
1279
  *
1280
+ * **When to use**
1281
+ *
1282
+ * Use to compute the least common multiple of two integer values.
1283
+ *
1284
+ * **Example** (Calculating least common multiples)
1285
+ *
1286
  * ```ts
1287
+ * import { BigInt } from "effect"
1288
  * import * as assert from "node:assert"
1289
  *
1290
+ * assert.deepStrictEqual(BigInt.lcm(2n, 3n), 6n)
1291
+ * assert.deepStrictEqual(BigInt.lcm(2n, 4n), 4n)
1292
+ * assert.deepStrictEqual(BigInt.lcm(16n, 24n), 48n)
1293
  * ```
1294
  *
1295
+ * @see {@link gcd} for computing the greatest common divisor
1296
+ *
1297
  * @category math
1298
  * @since 2.0.0
1299
  */
 
1301
  /**
1302
  * Determines the least common multiple of two `bigint`s.
1303
  *
1304
+ * **When to use**
1305
+ *
1306
+ * Use to compute the least common multiple of two integer values.
1307
+ *
1308
+ * **Example** (Calculating least common multiples)
1309
+ *
1310
  * ```ts
1311
+ * import { BigInt } from "effect"
1312
  * import * as assert from "node:assert"
1313
  *
1314
+ * assert.deepStrictEqual(BigInt.lcm(2n, 3n), 6n)
1315
+ * assert.deepStrictEqual(BigInt.lcm(2n, 4n), 4n)
1316
+ * assert.deepStrictEqual(BigInt.lcm(16n, 24n), 48n)
1317
  * ```
1318
  *
1319
+ * @see {@link gcd} for computing the greatest common divisor
1320
+ *
1321
  * @category math
1322
  * @since 2.0.0
1323
  */
1324
  (self: bigint, that: bigint): bigint;
1325
  };
1326
  /**
1327
+ * Returns the integer square root of a non-negative `bigint`.
1328
+ *
1329
+ * **When to use**
1330
+ *
1331
+ * Use when you need to compute an integer square root for a `bigint` that has
1332
+ * already been validated as non-negative, and you want negative input to throw
1333
+ * instead of returning `Option.none`.
1334
+ *
1335
+ * **Details**
1336
+ *
1337
+ * For non-perfect squares, returns the largest `bigint` whose square is less
1338
+ * than or equal to the input.
1339
+ *
1340
+ * **Gotchas**
1341
+ *
1342
+ * Throws a `RangeError` if the input is negative.
1343
+ *
1344
+ * **Example** (Calculating square roots unsafely)
1345
  *
 
1346
  * ```ts
1347
+ * import { BigInt } from "effect"
1348
  * import * as assert from "node:assert"
1349
  *
1350
+ * assert.deepStrictEqual(BigInt.sqrtUnsafe(4n), 2n)
1351
+ * assert.deepStrictEqual(BigInt.sqrtUnsafe(9n), 3n)
1352
+ * assert.deepStrictEqual(BigInt.sqrtUnsafe(16n), 4n)
1353
  * ```
1354
  *
1355
+ * @see {@link sqrt} for returning `Option.none` when the input is negative
1356
+ *
1357
  * @category math
1358
+ * @since 4.0.0
1359
  */
1360
  export declare const sqrtUnsafe: (n: bigint) => bigint;
1361
  /**
1362
+ * Computes the integer square root of a `bigint` safely.
 
1363
  *
1364
+ * **When to use**
1365
+ *
1366
+ * Use to compute an integer square root while representing negative input as
1367
+ * `Option.none`.
1368
+ *
1369
+ * **Details**
1370
+ *
1371
+ * For non-perfect squares, returns the largest `bigint` whose square is less
1372
+ * than or equal to the input. Returns `Option.none()` when the input is
1373
+ * negative.
1374
+ *
1375
+ * **Example** (Calculating square roots safely)
1376
  *
1377
  * ```ts
1378
  * import { BigInt } from "effect"
 
1383
  * BigInt.sqrt(-1n) // Option.none()
1384
  * ```
1385
  *
1386
+ * @see {@link sqrtUnsafe} for square root computation that throws on negative input
1387
+ *
1388
  * @category math
1389
  * @since 2.0.0
1390
  */
1391
  export declare const sqrt: (n: bigint) => Option.Option<bigint>;
1392
  /**
1393
+ * Takes an `Iterable` of `bigint`s and returns their sum as a single `bigint`. Returns `0n` for an empty iterable.
1394
+ *
1395
+ * **When to use**
1396
+ *
1397
+ * Use when you want an immediate aggregate from an iterable instead of a
1398
+ * folding reducer owned by another API.
1399
+ *
1400
+ * **Example** (Summing iterable bigints)
1401
  *
 
1402
  * ```ts
1403
+ * import { BigInt } from "effect"
1404
  * import * as assert from "node:assert"
1405
  *
1406
+ * assert.deepStrictEqual(BigInt.sumAll([2n, 3n, 4n]), 9n)
1407
  * ```
1408
  *
1409
+ * @see {@link sum} for adding two `bigint` values
1410
+ * @see {@link ReducerSum} for summing through APIs that consume a `Reducer`
1411
+ *
1412
  * @category math
1413
  * @since 2.0.0
1414
  */
1415
  export declare const sumAll: (collection: Iterable<bigint>) => bigint;
1416
  /**
1417
+ * Takes an `Iterable` of `bigint`s and returns their product as a single `bigint`. Returns `1n` for an empty iterable.
1418
+ *
1419
+ * **When to use**
1420
+ *
1421
+ * Use to multiply all `bigint` values in an iterable.
1422
+ *
1423
+ * **Example** (Multiplying iterable bigints)
1424
  *
 
1425
  * ```ts
1426
+ * import { BigInt } from "effect"
1427
  * import * as assert from "node:assert"
1428
  *
1429
+ * assert.deepStrictEqual(BigInt.multiplyAll([2n, 3n, 4n]), 24n)
1430
  * ```
1431
  *
1432
+ * @see {@link multiply} for multiplying two `bigint` values
1433
+ * @see {@link ReducerMultiply} for multiplying through APIs that consume a `Reducer`
1434
+ *
1435
  * @category math
1436
  * @since 2.0.0
1437
  */
1438
  export declare const multiplyAll: (collection: Iterable<bigint>) => bigint;
1439
  /**
1440
+ * Converts a `bigint` to a `number` safely.
1441
+ *
1442
+ * **When to use**
1443
+ *
1444
+ * Use to convert a `bigint` to a JavaScript number only when it is a safe
1445
+ * integer.
1446
+ *
1447
+ * **Details**
1448
  *
1449
  * If the `bigint` is outside the safe integer range for JavaScript (`Number.MAX_SAFE_INTEGER`
1450
  * and `Number.MIN_SAFE_INTEGER`), it returns `Option.none()`.
1451
  *
1452
+ * **Example** (Converting bigints to numbers)
1453
+ *
1454
  * ```ts
1455
  * import { BigInt as BI } from "effect"
1456
  *
 
1459
  * BI.toNumber(BigInt(Number.MIN_SAFE_INTEGER) - 1n) // Option.none()
1460
  * ```
1461
  *
1462
+ * @see {@link fromNumber} for converting a safe integer number to `bigint`
1463
+ *
1464
+ * @category converting
1465
  * @since 2.0.0
1466
  */
1467
  export declare const toNumber: (b: bigint) => Option.Option<number>;
1468
  /**
1469
+ * Parses a string into a `bigint` safely.
1470
+ *
1471
+ * **When to use**
1472
+ *
1473
+ * Use to parse a string as a `bigint` without throwing on invalid input.
1474
+ *
1475
+ * **Details**
1476
  *
1477
  * If the string is empty or contains characters that cannot be converted into a
1478
  * `bigint`, it returns `Option.none()`.
1479
  *
1480
+ * **Example** (Parsing strings as bigints)
1481
+ *
1482
  * ```ts
1483
  * import { BigInt } from "effect"
1484
  *
 
1487
  * BigInt.fromString("a") // Option.none()
1488
  * ```
1489
  *
1490
+ * @see {@link BigInt} for native constructor coercion that throws on invalid input
1491
+ *
1492
+ * @category converting
1493
  * @since 2.4.12
1494
  */
1495
  export declare const fromString: (s: string) => Option.Option<bigint>;
1496
  /**
1497
  * Converts a number to a `bigint`.
1498
  *
1499
+ * **When to use**
1500
+ *
1501
+ * Use to convert a JavaScript number to `bigint` only when it is a safe integer.
1502
+ *
1503
+ * **Details**
1504
+ *
1505
  * If the number is outside the safe integer range for JavaScript
1506
  * (`Number.MAX_SAFE_INTEGER` and `Number.MIN_SAFE_INTEGER`) or if the number is
1507
  * not a valid `bigint`, it returns `Option.none()`.
1508
  *
1509
+ * **Example** (Converting numbers to bigints)
1510
+ *
1511
  * ```ts
1512
  * import { BigInt } from "effect"
1513
  *
 
1517
  * BigInt.fromNumber(Number.MIN_SAFE_INTEGER - 1) // Option.none()
1518
  * ```
1519
  *
1520
+ * @see {@link toNumber} for converting `bigint` values back to safe integer numbers
1521
+ * @see {@link BigInt} for native constructor coercion
1522
+ *
1523
+ * @category converting
1524
  * @since 2.4.12
1525
  */
1526
  export declare function fromNumber(n: number): Option.Option<bigint>;
1527
  /**
1528
+ * Returns the JavaScript remainder of dividing one `bigint` by another.
1529
+ *
1530
+ * **When to use**
1531
+ *
1532
+ * Use when you want native remainder semantics, including signed remainders and
1533
+ * a thrown division-by-zero error.
1534
+ *
1535
+ * **Gotchas**
1536
+ *
1537
+ * Throws a `RangeError` when the divisor is `0n`.
1538
+ *
1539
+ * **Example** (Calculating remainders)
1540
  *
 
1541
  * ```ts
1542
  * import { BigInt } from "effect"
1543
  *
 
1546
  * BigInt.remainder(15n, 4n) // 3n
1547
  * ```
1548
  *
1549
+ * @see {@link divide} for quotient calculation with division-by-zero represented as `Option.none`
1550
+ *
1551
  * @category math
1552
  * @since 4.0.0
1553
  */
1554
  export declare const remainder: {
1555
  /**
1556
+ * Returns the JavaScript remainder of dividing one `bigint` by another.
1557
+ *
1558
+ * **When to use**
1559
+ *
1560
+ * Use when you want native remainder semantics, including signed remainders and
1561
+ * a thrown division-by-zero error.
1562
+ *
1563
+ * **Gotchas**
1564
+ *
1565
+ * Throws a `RangeError` when the divisor is `0n`.
1566
+ *
1567
+ * **Example** (Calculating remainders)
1568
  *
 
1569
  * ```ts
1570
  * import { BigInt } from "effect"
1571
  *
 
1574
  * BigInt.remainder(15n, 4n) // 3n
1575
  * ```
1576
  *
1577
+ * @see {@link divide} for quotient calculation with division-by-zero represented as `Option.none`
1578
+ *
1579
  * @category math
1580
  * @since 4.0.0
1581
  */
1582
  (divisor: bigint): (self: bigint) => bigint;
1583
  /**
1584
+ * Returns the JavaScript remainder of dividing one `bigint` by another.
1585
+ *
1586
+ * **When to use**
1587
+ *
1588
+ * Use when you want native remainder semantics, including signed remainders and
1589
+ * a thrown division-by-zero error.
1590
+ *
1591
+ * **Gotchas**
1592
+ *
1593
+ * Throws a `RangeError` when the divisor is `0n`.
1594
+ *
1595
+ * **Example** (Calculating remainders)
1596
  *
 
1597
  * ```ts
1598
  * import { BigInt } from "effect"
1599
  *
 
1602
  * BigInt.remainder(15n, 4n) // 3n
1603
  * ```
1604
  *
1605
+ * @see {@link divide} for quotient calculation with division-by-zero represented as `Option.none`
1606
+ *
1607
  * @category math
1608
  * @since 4.0.0
1609
  */
1610
  (self: bigint, divisor: bigint): bigint;
1611
  };
1612
  /**
1613
+ * Reducer for combining `bigint`s using addition.
1614
+ *
1615
+ * **When to use**
1616
+ *
1617
+ * Use to sum many `bigint` values through APIs that consume a `Reducer`.
1618
+ *
1619
+ * **Details**
1620
+ *
1621
+ * The initial value is `0n`, so `combineAll([])` returns `0n`.
1622
  *
1623
+ * @see {@link sumAll} for summing an iterable directly
1624
+ * @see {@link ReducerMultiply} for multiplying `bigint` values
1625
+ *
1626
+ * @category math
1627
  * @since 4.0.0
1628
  */
1629
  export declare const ReducerSum: Reducer.Reducer<bigint>;
1630
  /**
1631
+ * Reducer for combining `bigint`s using multiplication.
1632
+ *
1633
+ * **When to use**
1634
+ *
1635
+ * Use to multiply many `bigint` values through APIs that consume a `Reducer`.
1636
+ *
1637
+ * **Details**
1638
  *
1639
+ * The initial value is `1n`, so `combineAll([])` returns `1n`.
1640
+ *
1641
+ * @see {@link multiplyAll} for multiplying an iterable directly
1642
+ * @see {@link ReducerSum} for summing `bigint` values
1643
+ *
1644
+ * @category math
1645
  * @since 4.0.0
1646
  */
1647
  export declare const ReducerMultiply: Reducer.Reducer<bigint>;
1648
  /**
1649
+ * Combiner that returns the maximum `bigint`.
1650
+ *
1651
+ * **When to use**
1652
+ *
1653
+ * Use to keep the largest `bigint` when an API consumes a `Combiner`.
1654
+ *
1655
+ * @see {@link CombinerMin} for keeping the smallest `bigint`
1656
+ * @see {@link max} for comparing two `bigint` values directly
1657
  *
1658
+ * @category math
1659
  * @since 4.0.0
1660
  */
1661
  export declare const CombinerMax: Combiner.Combiner<bigint>;
1662
  /**
1663
+ * Combiner that returns the minimum `bigint`.
1664
+ *
1665
+ * **When to use**
1666
+ *
1667
+ * Use to keep the smallest `bigint` through APIs that consume a `Combiner`.
1668
  *
1669
+ * @see {@link CombinerMax} for keeping the largest `bigint`
1670
+ * @see {@link min} for comparing two `bigint` values directly
1671
+ *
1672
+ * @category math
1673
  * @since 4.0.0
1674
  */
1675
  export declare const CombinerMin: Combiner.Combiner<bigint>;
.opencode/node_modules/effect/dist/BigInt.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"BigInt.d.ts","sourceRoot":"","sources":["../src/BigInt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AACzC,OAAO,KAAK,GAAG,MAAM,kBAAkB,CAAA;AAEvC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAE7C,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAEvC;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,MAAM,mBAAoB,CAAA;AAMvC;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,QAAQ,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,IAAI,MAA2B,CAAA;AAEvE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,GAAG,EAAE;IAChB;;;;;;;;;;;;;OAaG;IACH,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;IACxC;;;;;;;;;;;;;OAaG;IACH,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;CAC0B,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U,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,CAA0C,CAAA;AAEzF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,eAAe,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,CAOlD,CAAA;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAuB,CAAA;AAEzE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAuB,CAAA"}
.opencode/node_modules/effect/dist/BigInt.js CHANGED
@@ -1,6 +1,10 @@
1
  /**
2
- * This module provides utility functions and type class instances for working with the `bigint` type in TypeScript.
3
- * It includes functions for basic arithmetic operations.
 
 
 
 
4
  *
5
  * @since 2.0.0
6
  */
@@ -12,11 +16,25 @@ import * as order from "./Order.js";
12
  import * as predicate from "./Predicate.js";
13
  import * as Reducer from "./Reducer.js";
14
  /**
15
- * Reference to the global BigInt constructor.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  *
17
- * @example
18
  * ```ts
19
- * import * as BigInt from "effect/BigInt"
20
  *
21
  * const bigInt = BigInt.BigInt(123)
22
  * console.log(bigInt) // 123n
@@ -33,15 +51,20 @@ const bigint0 = /*#__PURE__*/BigInt(0);
33
  const bigint1 = /*#__PURE__*/BigInt(1);
34
  const bigint2 = /*#__PURE__*/BigInt(2);
35
  /**
36
- * Tests if a value is a `bigint`.
 
 
 
 
 
 
37
  *
38
- * @example
39
  * ```ts
40
- * import { isBigInt } from "effect/BigInt"
41
  * import * as assert from "node:assert"
42
  *
43
- * assert.deepStrictEqual(isBigInt(1n), true)
44
- * assert.deepStrictEqual(isBigInt(1), false)
45
  * ```
46
  *
47
  * @category guards
@@ -51,14 +74,22 @@ export const isBigInt = predicate.isBigInt;
51
  /**
52
  * Provides an addition operation on `bigint`s.
53
  *
54
- * @example
 
 
 
 
 
 
55
  * ```ts
56
- * import { sum } from "effect/BigInt"
57
  * import * as assert from "node:assert"
58
  *
59
- * assert.deepStrictEqual(sum(2n, 3n), 5n)
60
  * ```
61
  *
 
 
62
  * @category math
63
  * @since 2.0.0
64
  */
@@ -66,14 +97,21 @@ export const sum = /*#__PURE__*/dual(2, (self, that) => self + that);
66
  /**
67
  * Provides a multiplication operation on `bigint`s.
68
  *
69
- * @example
 
 
 
 
 
70
  * ```ts
71
- * import { multiply } from "effect/BigInt"
72
  * import * as assert from "node:assert"
73
  *
74
- * assert.deepStrictEqual(multiply(2n, 3n), 6n)
75
  * ```
76
  *
 
 
77
  * @category math
78
  * @since 2.0.0
79
  */
@@ -81,12 +119,17 @@ export const multiply = /*#__PURE__*/dual(2, (self, that) => self * that);
81
  /**
82
  * Provides a subtraction operation on `bigint`s.
83
  *
84
- * @example
 
 
 
 
 
85
  * ```ts
86
- * import { subtract } from "effect/BigInt"
87
  * import * as assert from "node:assert"
88
  *
89
- * assert.deepStrictEqual(subtract(2n, 3n), -1n)
90
  * ```
91
  *
92
  * @category math
@@ -94,58 +137,82 @@ export const multiply = /*#__PURE__*/dual(2, (self, that) => self * that);
94
  */
95
  export const subtract = /*#__PURE__*/dual(2, (self, that) => self - that);
96
  /**
97
- * Provides a division operation on `bigint`s.
 
 
98
  *
99
- * If the dividend is not a multiple of the divisor the result will be a `bigint` value
100
- * which represents the integer division rounded down to the nearest integer.
101
  *
102
- * Returns `Option.none()` if the divisor is `0n`.
 
 
 
 
 
103
  *
104
- * @example
105
  * ```ts
106
- * import { divide } from "effect/BigInt"
107
  * import * as assert from "node:assert"
108
  *
109
- * import { Option } from "effect"
110
- *
111
- * assert.deepStrictEqual(divide(6n, 3n), Option.some(2n))
112
- * assert.deepStrictEqual(divide(6n, 0n), Option.none())
113
  * ```
114
  *
 
 
 
115
  * @category math
116
  * @since 2.0.0
117
  */
118
  export const divide = /*#__PURE__*/dual(2, (self, that) => that === bigint0 ? Option.none() : Option.some(self / that));
119
  /**
120
- * Provides a division operation on `bigint`s.
 
 
 
 
 
 
 
 
 
 
 
 
121
  *
122
- * If the dividend is not a multiple of the divisor the result will be a `bigint` value
123
- * which represents the integer division rounded down to the nearest integer.
124
  *
125
- * Throws a `RangeError` if the divisor is `0n`.
126
  *
127
- * @example
128
  * ```ts
129
- * import { divideUnsafe } from "effect/BigInt"
130
  * import * as assert from "node:assert"
131
  *
132
- * assert.deepStrictEqual(divideUnsafe(6n, 3n), 2n)
133
- * assert.deepStrictEqual(divideUnsafe(6n, 4n), 1n)
134
  * ```
135
  *
 
 
136
  * @category math
137
- * @since 2.0.0
138
  */
139
  export const divideUnsafe = /*#__PURE__*/dual(2, (self, that) => self / that);
140
  /**
141
- * Returns the result of adding `1n` to a given number.
 
 
 
 
 
 
142
  *
143
- * @example
144
  * ```ts
145
- * import { increment } from "effect/BigInt"
146
  * import * as assert from "node:assert"
147
  *
148
- * assert.deepStrictEqual(increment(2n), 3n)
149
  * ```
150
  *
151
  * @category math
@@ -153,14 +220,19 @@ export const divideUnsafe = /*#__PURE__*/dual(2, (self, that) => self / that);
153
  */
154
  export const increment = n => n + bigint1;
155
  /**
156
- * Decrements a number by `1n`.
 
 
 
 
 
 
157
  *
158
- * @example
159
  * ```ts
160
- * import { decrement } from "effect/BigInt"
161
  * import * as assert from "node:assert"
162
  *
163
- * assert.deepStrictEqual(decrement(3n), 2n)
164
  * ```
165
  *
166
  * @category math
@@ -170,9 +242,15 @@ export const decrement = n => n - bigint1;
170
  /**
171
  * Provides an `Order` instance for `bigint` that allows comparing and sorting BigInt values.
172
  *
173
- * @example
 
 
 
 
 
 
174
  * ```ts
175
- * import * as BigInt from "effect/BigInt"
176
  *
177
  * const a = 123n
178
  * const b = 456n
@@ -188,9 +266,15 @@ export const decrement = n => n - bigint1;
188
  */
189
  export const Order = order.BigInt;
190
  /**
191
- * An `Equivalence` instance for bigints using strict equality (`===`).
 
 
 
 
 
 
 
192
  *
193
- * @example
194
  * ```ts
195
  * import { BigInt } from "effect"
196
  *
@@ -199,83 +283,108 @@ export const Order = order.BigInt;
199
  * ```
200
  *
201
  * @category instances
202
- * @since 4.0.0
203
  */
204
  export const Equivalence = Equ.BigInt;
205
  /**
206
  * Returns `true` if the first argument is less than the second, otherwise `false`.
207
  *
208
- * @example
 
 
 
 
 
209
  * ```ts
210
- * import { isLessThan } from "effect/BigInt"
211
  * import * as assert from "node:assert"
212
  *
213
- * assert.deepStrictEqual(isLessThan(2n, 3n), true)
214
- * assert.deepStrictEqual(isLessThan(3n, 3n), false)
215
- * assert.deepStrictEqual(isLessThan(4n, 3n), false)
216
  * ```
217
  *
218
  * @category predicates
219
- * @since 2.0.0
220
  */
221
  export const isLessThan = /*#__PURE__*/order.isLessThan(Order);
222
  /**
223
  * Returns a function that checks if a given `bigint` is less than or equal to the provided one.
224
  *
225
- * @example
 
 
 
 
 
226
  * ```ts
227
- * import { isLessThanOrEqualTo } from "effect/BigInt"
228
  * import * as assert from "node:assert"
229
  *
230
- * assert.deepStrictEqual(isLessThanOrEqualTo(2n, 3n), true)
231
- * assert.deepStrictEqual(isLessThanOrEqualTo(3n, 3n), true)
232
- * assert.deepStrictEqual(isLessThanOrEqualTo(4n, 3n), false)
233
  * ```
234
  *
235
  * @category predicates
236
- * @since 2.0.0
237
  */
238
  export const isLessThanOrEqualTo = /*#__PURE__*/order.isLessThanOrEqualTo(Order);
239
  /**
240
  * Returns `true` if the first argument is greater than the second, otherwise `false`.
241
  *
242
- * @example
 
 
 
 
 
243
  * ```ts
244
- * import { isGreaterThan } from "effect/BigInt"
245
  * import * as assert from "node:assert"
246
  *
247
- * assert.deepStrictEqual(isGreaterThan(2n, 3n), false)
248
- * assert.deepStrictEqual(isGreaterThan(3n, 3n), false)
249
- * assert.deepStrictEqual(isGreaterThan(4n, 3n), true)
250
  * ```
251
  *
252
  * @category predicates
253
- * @since 2.0.0
254
  */
255
  export const isGreaterThan = /*#__PURE__*/order.isGreaterThan(Order);
256
  /**
257
  * Returns a function that checks if a given `bigint` is greater than or equal to the provided one.
258
  *
259
- * @example
 
 
 
 
 
260
  * ```ts
261
- * import { isGreaterThanOrEqualTo } from "effect/BigInt"
262
  * import * as assert from "node:assert"
263
  *
264
- * assert.deepStrictEqual(isGreaterThanOrEqualTo(2n, 3n), false)
265
- * assert.deepStrictEqual(isGreaterThanOrEqualTo(3n, 3n), true)
266
- * assert.deepStrictEqual(isGreaterThanOrEqualTo(4n, 3n), true)
267
  * ```
268
  *
269
  * @category predicates
270
- * @since 2.0.0
271
  */
272
  export const isGreaterThanOrEqualTo = /*#__PURE__*/order.isGreaterThanOrEqualTo(Order);
273
  /**
274
- * Checks if a `bigint` is between a `minimum` and `maximum` value (inclusive).
 
 
 
 
 
 
275
  *
276
- * @example
277
  * ```ts
278
- * import * as BigInt from "effect/BigInt"
279
  * import * as assert from "node:assert"
280
  *
281
  * const between = BigInt.between({ minimum: 0n, maximum: 5n })
@@ -285,6 +394,8 @@ export const isGreaterThanOrEqualTo = /*#__PURE__*/order.isGreaterThanOrEqualTo(
285
  * assert.deepStrictEqual(between(6n), false)
286
  * ```
287
  *
 
 
288
  * @category predicates
289
  * @since 2.0.0
290
  */
@@ -292,13 +403,20 @@ export const between = /*#__PURE__*/order.isBetween(Order);
292
  /**
293
  * Restricts the given `bigint` to be within the range specified by the `minimum` and `maximum` values.
294
  *
295
- * - If the `bigint` is less than the `minimum` value, the function returns the `minimum` value.
296
- * - If the `bigint` is greater than the `maximum` value, the function returns the `maximum` value.
297
- * - Otherwise, it returns the original `bigint`.
 
 
 
 
 
 
 
 
298
  *
299
- * @example
300
  * ```ts
301
- * import * as BigInt from "effect/BigInt"
302
  * import * as assert from "node:assert"
303
  *
304
  * const clamp = BigInt.clamp({ minimum: 1n, maximum: 5n })
@@ -308,6 +426,8 @@ export const between = /*#__PURE__*/order.isBetween(Order);
308
  * assert.equal(clamp(6n), 5n)
309
  * ```
310
  *
 
 
311
  * @category math
312
  * @since 2.0.0
313
  */
@@ -315,14 +435,21 @@ export const clamp = /*#__PURE__*/order.clamp(Order);
315
  /**
316
  * Returns the minimum between two `bigint`s.
317
  *
318
- * @example
 
 
 
 
 
319
  * ```ts
320
- * import { min } from "effect/BigInt"
321
  * import * as assert from "node:assert"
322
  *
323
- * assert.deepStrictEqual(min(2n, 3n), 2n)
324
  * ```
325
  *
 
 
326
  * @category math
327
  * @since 2.0.0
328
  */
@@ -330,14 +457,21 @@ export const min = /*#__PURE__*/order.min(Order);
330
  /**
331
  * Returns the maximum between two `bigint`s.
332
  *
333
- * @example
 
 
 
 
 
334
  * ```ts
335
- * import { max } from "effect/BigInt"
336
  * import * as assert from "node:assert"
337
  *
338
- * assert.deepStrictEqual(max(2n, 3n), 3n)
339
  * ```
340
  *
 
 
341
  * @category math
342
  * @since 2.0.0
343
  */
@@ -345,14 +479,19 @@ export const max = /*#__PURE__*/order.max(Order);
345
  /**
346
  * Determines the sign of a given `bigint`.
347
  *
348
- * @example
 
 
 
 
 
349
  * ```ts
350
- * import { sign } from "effect/BigInt"
351
  * import * as assert from "node:assert"
352
  *
353
- * assert.deepStrictEqual(sign(-5n), -1)
354
- * assert.deepStrictEqual(sign(0n), 0)
355
- * assert.deepStrictEqual(sign(5n), 1)
356
  * ```
357
  *
358
  * @category math
@@ -362,14 +501,19 @@ export const sign = n => order.BigInt(n, bigint0);
362
  /**
363
  * Determines the absolute value of a given `bigint`.
364
  *
365
- * @example
 
 
 
 
 
366
  * ```ts
367
- * import { abs } from "effect/BigInt"
368
  * import * as assert from "node:assert"
369
  *
370
- * assert.deepStrictEqual(abs(-5n), 5n)
371
- * assert.deepStrictEqual(abs(0n), 0n)
372
- * assert.deepStrictEqual(abs(5n), 5n)
373
  * ```
374
  *
375
  * @category math
@@ -379,16 +523,23 @@ export const abs = n => n < bigint0 ? -n : n;
379
  /**
380
  * Determines the greatest common divisor of two `bigint`s.
381
  *
382
- * @example
 
 
 
 
 
383
  * ```ts
384
- * import { gcd } from "effect/BigInt"
385
  * import * as assert from "node:assert"
386
  *
387
- * assert.deepStrictEqual(gcd(2n, 3n), 1n)
388
- * assert.deepStrictEqual(gcd(2n, 4n), 2n)
389
- * assert.deepStrictEqual(gcd(16n, 24n), 8n)
390
  * ```
391
  *
 
 
392
  * @category math
393
  * @since 2.0.0
394
  */
@@ -403,35 +554,60 @@ export const gcd = /*#__PURE__*/dual(2, (self, that) => {
403
  /**
404
  * Determines the least common multiple of two `bigint`s.
405
  *
406
- * @example
 
 
 
 
 
407
  * ```ts
408
- * import { lcm } from "effect/BigInt"
409
  * import * as assert from "node:assert"
410
  *
411
- * assert.deepStrictEqual(lcm(2n, 3n), 6n)
412
- * assert.deepStrictEqual(lcm(2n, 4n), 4n)
413
- * assert.deepStrictEqual(lcm(16n, 24n), 48n)
414
  * ```
415
  *
 
 
416
  * @category math
417
  * @since 2.0.0
418
  */
419
  export const lcm = /*#__PURE__*/dual(2, (self, that) => self * that / gcd(self, that));
420
  /**
421
- * Determines the square root of a given `bigint` unsafely. Throws if the given `bigint` is negative.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
422
  *
423
- * @example
424
  * ```ts
425
- * import { sqrtUnsafe } from "effect/BigInt"
426
  * import * as assert from "node:assert"
427
  *
428
- * assert.deepStrictEqual(sqrtUnsafe(4n), 2n)
429
- * assert.deepStrictEqual(sqrtUnsafe(9n), 3n)
430
- * assert.deepStrictEqual(sqrtUnsafe(16n), 4n)
431
  * ```
432
  *
 
 
433
  * @category math
434
- * @since 2.0.0
435
  */
436
  export const sqrtUnsafe = n => {
437
  if (n < bigint0) {
@@ -447,10 +623,20 @@ export const sqrtUnsafe = n => {
447
  return x;
448
  };
449
  /**
450
- * Determines the square root of a given `bigint` safely. Returns `Option.none()` if
451
- * the given `bigint` is negative.
 
 
 
 
452
  *
453
- * **Example**
 
 
 
 
 
 
454
  *
455
  * ```ts
456
  * import { BigInt } from "effect"
@@ -461,21 +647,32 @@ export const sqrtUnsafe = n => {
461
  * BigInt.sqrt(-1n) // Option.none()
462
  * ```
463
  *
 
 
464
  * @category math
465
  * @since 2.0.0
466
  */
467
  export const sqrt = n => isGreaterThanOrEqualTo(n, bigint0) ? Option.some(sqrtUnsafe(n)) : Option.none();
468
  /**
469
- * Takes an `Iterable` of `bigint`s and returns their sum as a single `bigint
 
 
 
 
 
 
 
470
  *
471
- * @example
472
  * ```ts
473
- * import { sumAll } from "effect/BigInt"
474
  * import * as assert from "node:assert"
475
  *
476
- * assert.deepStrictEqual(sumAll([2n, 3n, 4n]), 9n)
477
  * ```
478
  *
 
 
 
479
  * @category math
480
  * @since 2.0.0
481
  */
@@ -487,16 +684,24 @@ export const sumAll = collection => {
487
  return out;
488
  };
489
  /**
490
- * Takes an `Iterable` of `bigint`s and returns their multiplication as a single `number`.
 
 
 
 
 
 
491
  *
492
- * @example
493
  * ```ts
494
- * import { multiplyAll } from "effect/BigInt"
495
  * import * as assert from "node:assert"
496
  *
497
- * assert.deepStrictEqual(multiplyAll([2n, 3n, 4n]), 24n)
498
  * ```
499
  *
 
 
 
500
  * @category math
501
  * @since 2.0.0
502
  */
@@ -511,12 +716,20 @@ export const multiplyAll = collection => {
511
  return out;
512
  };
513
  /**
514
- * Converts a `bigint` to a `number`.
 
 
 
 
 
 
 
515
  *
516
  * If the `bigint` is outside the safe integer range for JavaScript (`Number.MAX_SAFE_INTEGER`
517
  * and `Number.MIN_SAFE_INTEGER`), it returns `Option.none()`.
518
  *
519
- * @example
 
520
  * ```ts
521
  * import { BigInt as BI } from "effect"
522
  *
@@ -525,7 +738,9 @@ export const multiplyAll = collection => {
525
  * BI.toNumber(BigInt(Number.MIN_SAFE_INTEGER) - 1n) // Option.none()
526
  * ```
527
  *
528
- * @category conversions
 
 
529
  * @since 2.0.0
530
  */
531
  export const toNumber = b => {
@@ -535,12 +750,19 @@ export const toNumber = b => {
535
  return Option.some(Number(b));
536
  };
537
  /**
538
- * Converts a string to a `bigint`.
 
 
 
 
 
 
539
  *
540
  * If the string is empty or contains characters that cannot be converted into a
541
  * `bigint`, it returns `Option.none()`.
542
  *
543
- * @example
 
544
  * ```ts
545
  * import { BigInt } from "effect"
546
  *
@@ -549,7 +771,9 @@ export const toNumber = b => {
549
  * BigInt.fromString("a") // Option.none()
550
  * ```
551
  *
552
- * @category conversions
 
 
553
  * @since 2.4.12
554
  */
555
  export const fromString = s => {
@@ -562,11 +786,18 @@ export const fromString = s => {
562
  /**
563
  * Converts a number to a `bigint`.
564
  *
 
 
 
 
 
 
565
  * If the number is outside the safe integer range for JavaScript
566
  * (`Number.MAX_SAFE_INTEGER` and `Number.MIN_SAFE_INTEGER`) or if the number is
567
  * not a valid `bigint`, it returns `Option.none()`.
568
  *
569
- * @example
 
570
  * ```ts
571
  * import { BigInt } from "effect"
572
  *
@@ -576,7 +807,10 @@ export const fromString = s => {
576
  * BigInt.fromNumber(Number.MIN_SAFE_INTEGER - 1) // Option.none()
577
  * ```
578
  *
579
- * @category conversions
 
 
 
580
  * @since 2.4.12
581
  */
582
  export function fromNumber(n) {
@@ -590,9 +824,19 @@ export function fromNumber(n) {
590
  }
591
  }
592
  /**
593
- * Returns the remainder of dividing the first `bigint` by the second `bigint`.
 
 
 
 
 
 
 
 
 
 
 
594
  *
595
- * @example
596
  * ```ts
597
  * import { BigInt } from "effect"
598
  *
@@ -601,19 +845,45 @@ export function fromNumber(n) {
601
  * BigInt.remainder(15n, 4n) // 3n
602
  * ```
603
  *
 
 
604
  * @category math
605
  * @since 4.0.0
606
  */
607
  export const remainder = /*#__PURE__*/dual(2, (self, divisor) => self % divisor);
608
  /**
609
- * A `Reducer` for combining `bigint`s using addition.
 
 
 
 
 
 
610
  *
 
 
 
 
 
 
611
  * @since 4.0.0
612
  */
613
  export const ReducerSum = /*#__PURE__*/Reducer.make((a, b) => a + b, bigint0);
614
  /**
615
- * A `Reducer` for combining `bigint`s using multiplication.
 
 
 
 
 
 
616
  *
 
 
 
 
 
 
617
  * @since 4.0.0
618
  */
619
  export const ReducerMultiply = /*#__PURE__*/Reducer.make((a, b) => a * b, bigint1, collection => {
@@ -625,14 +895,30 @@ export const ReducerMultiply = /*#__PURE__*/Reducer.make((a, b) => a * b, bigint
625
  return acc;
626
  });
627
  /**
628
- * A `Combiner` that returns the maximum `bigint`.
 
 
 
 
 
 
 
629
  *
 
630
  * @since 4.0.0
631
  */
632
  export const CombinerMax = /*#__PURE__*/Combiner.max(Order);
633
  /**
634
- * A `Combiner` that returns the minimum `bigint`.
 
 
 
 
635
  *
 
 
 
 
636
  * @since 4.0.0
637
  */
638
  export const CombinerMin = /*#__PURE__*/Combiner.min(Order);
 
1
  /**
2
+ * Works with JavaScript `bigint` values.
3
+ *
4
+ * This module exposes the native `BigInt` constructor together with helpers for
5
+ * checking, arithmetic, comparison, range checks, safe parsing and conversions
6
+ * that return `Option`, integer square roots, aggregation, ordering,
7
+ * equivalence, reducers, and combiners.
8
  *
9
  * @since 2.0.0
10
  */
 
16
  import * as predicate from "./Predicate.js";
17
  import * as Reducer from "./Reducer.js";
18
  /**
19
+ * Exposes the global bigint constructor for JavaScript bigint coercion.
20
+ *
21
+ * **When to use**
22
+ *
23
+ * Use to access native JavaScript bigint constructor coercion from the Effect
24
+ * module namespace.
25
+ *
26
+ * **Gotchas**
27
+ *
28
+ * This follows native `BigInt` coercion rules. It throws for invalid strings or
29
+ * non-integral numbers, and whitespace-only strings coerce to `0n`.
30
+ *
31
+ * @see {@link fromString} for parsing strings into an `Option`
32
+ * @see {@link fromNumber} for converting safe integers into an `Option`
33
+ *
34
+ * **Example** (Constructing bigints)
35
  *
 
36
  * ```ts
37
+ * import { BigInt } from "effect"
38
  *
39
  * const bigInt = BigInt.BigInt(123)
40
  * console.log(bigInt) // 123n
 
51
  const bigint1 = /*#__PURE__*/BigInt(1);
52
  const bigint2 = /*#__PURE__*/BigInt(2);
53
  /**
54
+ * Checks whether a value is a `bigint`.
55
+ *
56
+ * **When to use**
57
+ *
58
+ * Use to validate unknown input and narrow it to `bigint`.
59
+ *
60
+ * **Example** (Checking for bigints)
61
  *
 
62
  * ```ts
63
+ * import { BigInt } from "effect"
64
  * import * as assert from "node:assert"
65
  *
66
+ * assert.deepStrictEqual(BigInt.isBigInt(1n), true)
67
+ * assert.deepStrictEqual(BigInt.isBigInt(1), false)
68
  * ```
69
  *
70
  * @category guards
 
74
  /**
75
  * Provides an addition operation on `bigint`s.
76
  *
77
+ * **When to use**
78
+ *
79
+ * Use when you need a binary addition function for piping or higher-order APIs
80
+ * instead of the infix addition operator.
81
+ *
82
+ * **Example** (Adding bigints)
83
+ *
84
  * ```ts
85
+ * import { BigInt } from "effect"
86
  * import * as assert from "node:assert"
87
  *
88
+ * assert.deepStrictEqual(BigInt.sum(2n, 3n), 5n)
89
  * ```
90
  *
91
+ * @see {@link sumAll} for summing an iterable of `bigint` values
92
+ *
93
  * @category math
94
  * @since 2.0.0
95
  */
 
97
  /**
98
  * Provides a multiplication operation on `bigint`s.
99
  *
100
+ * **When to use**
101
+ *
102
+ * Use to multiply two `bigint` values.
103
+ *
104
+ * **Example** (Multiplying bigints)
105
+ *
106
  * ```ts
107
+ * import { BigInt } from "effect"
108
  * import * as assert from "node:assert"
109
  *
110
+ * assert.deepStrictEqual(BigInt.multiply(2n, 3n), 6n)
111
  * ```
112
  *
113
+ * @see {@link multiplyAll} for multiplying an iterable of `bigint` values
114
+ *
115
  * @category math
116
  * @since 2.0.0
117
  */
 
119
  /**
120
  * Provides a subtraction operation on `bigint`s.
121
  *
122
+ * **When to use**
123
+ *
124
+ * Use to subtract one `bigint` value from another.
125
+ *
126
+ * **Example** (Subtracting bigints)
127
+ *
128
  * ```ts
129
+ * import { BigInt } from "effect"
130
  * import * as assert from "node:assert"
131
  *
132
+ * assert.deepStrictEqual(BigInt.subtract(2n, 3n), -1n)
133
  * ```
134
  *
135
  * @category math
 
137
  */
138
  export const subtract = /*#__PURE__*/dual(2, (self, that) => self - that);
139
  /**
140
+ * Divides one `bigint` by another safely.
141
+ *
142
+ * **When to use**
143
  *
144
+ * Use to divide `bigint` values while representing division by zero as
145
+ * `Option.none`.
146
  *
147
+ * **Details**
148
+ *
149
+ * Uses JavaScript `bigint` division, so non-exact quotients are truncated
150
+ * toward zero. Returns `Option.none()` when the divisor is `0n`.
151
+ *
152
+ * **Example** (Dividing bigints safely)
153
  *
 
154
  * ```ts
155
+ * import { BigInt, Option } from "effect"
156
  * import * as assert from "node:assert"
157
  *
158
+ * assert.deepStrictEqual(BigInt.divide(6n, 3n), Option.some(2n))
159
+ * assert.deepStrictEqual(BigInt.divide(6n, 0n), Option.none())
 
 
160
  * ```
161
  *
162
+ * @see {@link divideUnsafe} for division that throws when the divisor is `0n`
163
+ * @see {@link remainder} for the JavaScript remainder operation
164
+ *
165
  * @category math
166
  * @since 2.0.0
167
  */
168
  export const divide = /*#__PURE__*/dual(2, (self, that) => that === bigint0 ? Option.none() : Option.some(self / that));
169
  /**
170
+ * Divides one `bigint` by another, throwing if the divisor is zero.
171
+ *
172
+ * **When to use**
173
+ *
174
+ * Use to divide `bigint` values where the divisor is known to be non-zero and
175
+ * division by zero should be a thrown exception.
176
+ *
177
+ * **Details**
178
+ *
179
+ * Uses JavaScript `bigint` division, so non-exact quotients are truncated
180
+ * toward zero.
181
+ *
182
+ * **Gotchas**
183
  *
184
+ * Throws a `RangeError` when the divisor is `0n`.
 
185
  *
186
+ * **Example** (Dividing bigints unsafely)
187
  *
 
188
  * ```ts
189
+ * import { BigInt } from "effect"
190
  * import * as assert from "node:assert"
191
  *
192
+ * assert.deepStrictEqual(BigInt.divideUnsafe(6n, 3n), 2n)
193
+ * assert.deepStrictEqual(BigInt.divideUnsafe(6n, 4n), 1n)
194
  * ```
195
  *
196
+ * @see {@link divide} for division that returns `Option.none` when the divisor is `0n`
197
+ *
198
  * @category math
199
+ * @since 4.0.0
200
  */
201
  export const divideUnsafe = /*#__PURE__*/dual(2, (self, that) => self / that);
202
  /**
203
+ * Returns the result of adding `1n` to a `bigint`.
204
+ *
205
+ * **When to use**
206
+ *
207
+ * Use to increment a `bigint` counter by one.
208
+ *
209
+ * **Example** (Incrementing a bigint)
210
  *
 
211
  * ```ts
212
+ * import { BigInt } from "effect"
213
  * import * as assert from "node:assert"
214
  *
215
+ * assert.deepStrictEqual(BigInt.increment(2n), 3n)
216
  * ```
217
  *
218
  * @category math
 
220
  */
221
  export const increment = n => n + bigint1;
222
  /**
223
+ * Returns the result of subtracting `1n` from a `bigint`.
224
+ *
225
+ * **When to use**
226
+ *
227
+ * Use to decrement a `bigint` counter by one.
228
+ *
229
+ * **Example** (Decrementing a bigint)
230
  *
 
231
  * ```ts
232
+ * import { BigInt } from "effect"
233
  * import * as assert from "node:assert"
234
  *
235
+ * assert.deepStrictEqual(BigInt.decrement(3n), 2n)
236
  * ```
237
  *
238
  * @category math
 
242
  /**
243
  * Provides an `Order` instance for `bigint` that allows comparing and sorting BigInt values.
244
  *
245
+ * **When to use**
246
+ *
247
+ * Use when you need to sort or compare bigint values through APIs that accept
248
+ * an ordering instance.
249
+ *
250
+ * **Example** (Comparing bigints with Order)
251
+ *
252
  * ```ts
253
+ * import { BigInt } from "effect"
254
  *
255
  * const a = 123n
256
  * const b = 456n
 
266
  */
267
  export const Order = order.BigInt;
268
  /**
269
+ * Equivalence instance for bigints using strict equality (`===`).
270
+ *
271
+ * **When to use**
272
+ *
273
+ * Use when checking bigint equality through APIs that accept an equivalence
274
+ * relation.
275
+ *
276
+ * **Example** (Comparing bigints for equivalence)
277
  *
 
278
  * ```ts
279
  * import { BigInt } from "effect"
280
  *
 
283
  * ```
284
  *
285
  * @category instances
286
+ * @since 2.0.0
287
  */
288
  export const Equivalence = Equ.BigInt;
289
  /**
290
  * Returns `true` if the first argument is less than the second, otherwise `false`.
291
  *
292
+ * **When to use**
293
+ *
294
+ * Use to test whether one `bigint` is strictly less than another.
295
+ *
296
+ * **Example** (Checking less-than comparisons)
297
+ *
298
  * ```ts
299
+ * import { BigInt } from "effect"
300
  * import * as assert from "node:assert"
301
  *
302
+ * assert.deepStrictEqual(BigInt.isLessThan(2n, 3n), true)
303
+ * assert.deepStrictEqual(BigInt.isLessThan(3n, 3n), false)
304
+ * assert.deepStrictEqual(BigInt.isLessThan(4n, 3n), false)
305
  * ```
306
  *
307
  * @category predicates
308
+ * @since 4.0.0
309
  */
310
  export const isLessThan = /*#__PURE__*/order.isLessThan(Order);
311
  /**
312
  * Returns a function that checks if a given `bigint` is less than or equal to the provided one.
313
  *
314
+ * **When to use**
315
+ *
316
+ * Use to test whether one `bigint` is less than or equal to another.
317
+ *
318
+ * **Example** (Checking less-than-or-equal comparisons)
319
+ *
320
  * ```ts
321
+ * import { BigInt } from "effect"
322
  * import * as assert from "node:assert"
323
  *
324
+ * assert.deepStrictEqual(BigInt.isLessThanOrEqualTo(2n, 3n), true)
325
+ * assert.deepStrictEqual(BigInt.isLessThanOrEqualTo(3n, 3n), true)
326
+ * assert.deepStrictEqual(BigInt.isLessThanOrEqualTo(4n, 3n), false)
327
  * ```
328
  *
329
  * @category predicates
330
+ * @since 4.0.0
331
  */
332
  export const isLessThanOrEqualTo = /*#__PURE__*/order.isLessThanOrEqualTo(Order);
333
  /**
334
  * Returns `true` if the first argument is greater than the second, otherwise `false`.
335
  *
336
+ * **When to use**
337
+ *
338
+ * Use to test whether one `bigint` is strictly greater than another.
339
+ *
340
+ * **Example** (Checking greater-than comparisons)
341
+ *
342
  * ```ts
343
+ * import { BigInt } from "effect"
344
  * import * as assert from "node:assert"
345
  *
346
+ * assert.deepStrictEqual(BigInt.isGreaterThan(2n, 3n), false)
347
+ * assert.deepStrictEqual(BigInt.isGreaterThan(3n, 3n), false)
348
+ * assert.deepStrictEqual(BigInt.isGreaterThan(4n, 3n), true)
349
  * ```
350
  *
351
  * @category predicates
352
+ * @since 4.0.0
353
  */
354
  export const isGreaterThan = /*#__PURE__*/order.isGreaterThan(Order);
355
  /**
356
  * Returns a function that checks if a given `bigint` is greater than or equal to the provided one.
357
  *
358
+ * **When to use**
359
+ *
360
+ * Use to test whether one `bigint` is greater than or equal to another.
361
+ *
362
+ * **Example** (Checking greater-than-or-equal comparisons)
363
+ *
364
  * ```ts
365
+ * import { BigInt } from "effect"
366
  * import * as assert from "node:assert"
367
  *
368
+ * assert.deepStrictEqual(BigInt.isGreaterThanOrEqualTo(2n, 3n), false)
369
+ * assert.deepStrictEqual(BigInt.isGreaterThanOrEqualTo(3n, 3n), true)
370
+ * assert.deepStrictEqual(BigInt.isGreaterThanOrEqualTo(4n, 3n), true)
371
  * ```
372
  *
373
  * @category predicates
374
+ * @since 4.0.0
375
  */
376
  export const isGreaterThanOrEqualTo = /*#__PURE__*/order.isGreaterThanOrEqualTo(Order);
377
  /**
378
+ * Checks whether a `bigint` is between a `minimum` and `maximum` value (inclusive).
379
+ *
380
+ * **When to use**
381
+ *
382
+ * Use to test whether a `bigint` falls inside an inclusive range.
383
+ *
384
+ * **Example** (Checking whether a bigint is within bounds)
385
  *
 
386
  * ```ts
387
+ * import { BigInt } from "effect"
388
  * import * as assert from "node:assert"
389
  *
390
  * const between = BigInt.between({ minimum: 0n, maximum: 5n })
 
394
  * assert.deepStrictEqual(between(6n), false)
395
  * ```
396
  *
397
+ * @see {@link clamp} for forcing a `bigint` into an inclusive range
398
+ *
399
  * @category predicates
400
  * @since 2.0.0
401
  */
 
403
  /**
404
  * Restricts the given `bigint` to be within the range specified by the `minimum` and `maximum` values.
405
  *
406
+ * **When to use**
407
+ *
408
+ * Use to force a `bigint` into an inclusive range.
409
+ *
410
+ * **Details**
411
+ *
412
+ * If the `bigint` is less than the minimum, the function returns the minimum.
413
+ * If the `bigint` is greater than the maximum, the function returns the
414
+ * maximum. Otherwise, it returns the original `bigint`.
415
+ *
416
+ * **Example** (Clamping a bigint to bounds)
417
  *
 
418
  * ```ts
419
+ * import { BigInt } from "effect"
420
  * import * as assert from "node:assert"
421
  *
422
  * const clamp = BigInt.clamp({ minimum: 1n, maximum: 5n })
 
426
  * assert.equal(clamp(6n), 5n)
427
  * ```
428
  *
429
+ * @see {@link between} for checking whether a `bigint` is already inside a range
430
+ *
431
  * @category math
432
  * @since 2.0.0
433
  */
 
435
  /**
436
  * Returns the minimum between two `bigint`s.
437
  *
438
+ * **When to use**
439
+ *
440
+ * Use to select the smaller of two `bigint` values.
441
+ *
442
+ * **Example** (Finding the minimum bigint)
443
+ *
444
  * ```ts
445
+ * import { BigInt } from "effect"
446
  * import * as assert from "node:assert"
447
  *
448
+ * assert.deepStrictEqual(BigInt.min(2n, 3n), 2n)
449
  * ```
450
  *
451
+ * @see {@link max} for selecting the larger value
452
+ *
453
  * @category math
454
  * @since 2.0.0
455
  */
 
457
  /**
458
  * Returns the maximum between two `bigint`s.
459
  *
460
+ * **When to use**
461
+ *
462
+ * Use to select the larger of two `bigint` values.
463
+ *
464
+ * **Example** (Finding the maximum bigint)
465
+ *
466
  * ```ts
467
+ * import { BigInt } from "effect"
468
  * import * as assert from "node:assert"
469
  *
470
+ * assert.deepStrictEqual(BigInt.max(2n, 3n), 3n)
471
  * ```
472
  *
473
+ * @see {@link min} for selecting the smaller value
474
+ *
475
  * @category math
476
  * @since 2.0.0
477
  */
 
479
  /**
480
  * Determines the sign of a given `bigint`.
481
  *
482
+ * **When to use**
483
+ *
484
+ * Use to classify a `bigint` as negative, zero, or positive.
485
+ *
486
+ * **Example** (Determining bigint signs)
487
+ *
488
  * ```ts
489
+ * import { BigInt } from "effect"
490
  * import * as assert from "node:assert"
491
  *
492
+ * assert.deepStrictEqual(BigInt.sign(-5n), -1)
493
+ * assert.deepStrictEqual(BigInt.sign(0n), 0)
494
+ * assert.deepStrictEqual(BigInt.sign(5n), 1)
495
  * ```
496
  *
497
  * @category math
 
501
  /**
502
  * Determines the absolute value of a given `bigint`.
503
  *
504
+ * **When to use**
505
+ *
506
+ * Use to remove the sign from a `bigint` while preserving its magnitude.
507
+ *
508
+ * **Example** (Calculating absolute values)
509
+ *
510
  * ```ts
511
+ * import { BigInt } from "effect"
512
  * import * as assert from "node:assert"
513
  *
514
+ * assert.deepStrictEqual(BigInt.abs(-5n), 5n)
515
+ * assert.deepStrictEqual(BigInt.abs(0n), 0n)
516
+ * assert.deepStrictEqual(BigInt.abs(5n), 5n)
517
  * ```
518
  *
519
  * @category math
 
523
  /**
524
  * Determines the greatest common divisor of two `bigint`s.
525
  *
526
+ * **When to use**
527
+ *
528
+ * Use to compute the greatest common divisor of two integer values.
529
+ *
530
+ * **Example** (Calculating greatest common divisors)
531
+ *
532
  * ```ts
533
+ * import { BigInt } from "effect"
534
  * import * as assert from "node:assert"
535
  *
536
+ * assert.deepStrictEqual(BigInt.gcd(2n, 3n), 1n)
537
+ * assert.deepStrictEqual(BigInt.gcd(2n, 4n), 2n)
538
+ * assert.deepStrictEqual(BigInt.gcd(16n, 24n), 8n)
539
  * ```
540
  *
541
+ * @see {@link lcm} for computing the least common multiple
542
+ *
543
  * @category math
544
  * @since 2.0.0
545
  */
 
554
  /**
555
  * Determines the least common multiple of two `bigint`s.
556
  *
557
+ * **When to use**
558
+ *
559
+ * Use to compute the least common multiple of two integer values.
560
+ *
561
+ * **Example** (Calculating least common multiples)
562
+ *
563
  * ```ts
564
+ * import { BigInt } from "effect"
565
  * import * as assert from "node:assert"
566
  *
567
+ * assert.deepStrictEqual(BigInt.lcm(2n, 3n), 6n)
568
+ * assert.deepStrictEqual(BigInt.lcm(2n, 4n), 4n)
569
+ * assert.deepStrictEqual(BigInt.lcm(16n, 24n), 48n)
570
  * ```
571
  *
572
+ * @see {@link gcd} for computing the greatest common divisor
573
+ *
574
  * @category math
575
  * @since 2.0.0
576
  */
577
  export const lcm = /*#__PURE__*/dual(2, (self, that) => self * that / gcd(self, that));
578
  /**
579
+ * Returns the integer square root of a non-negative `bigint`.
580
+ *
581
+ * **When to use**
582
+ *
583
+ * Use when you need to compute an integer square root for a `bigint` that has
584
+ * already been validated as non-negative, and you want negative input to throw
585
+ * instead of returning `Option.none`.
586
+ *
587
+ * **Details**
588
+ *
589
+ * For non-perfect squares, returns the largest `bigint` whose square is less
590
+ * than or equal to the input.
591
+ *
592
+ * **Gotchas**
593
+ *
594
+ * Throws a `RangeError` if the input is negative.
595
+ *
596
+ * **Example** (Calculating square roots unsafely)
597
  *
 
598
  * ```ts
599
+ * import { BigInt } from "effect"
600
  * import * as assert from "node:assert"
601
  *
602
+ * assert.deepStrictEqual(BigInt.sqrtUnsafe(4n), 2n)
603
+ * assert.deepStrictEqual(BigInt.sqrtUnsafe(9n), 3n)
604
+ * assert.deepStrictEqual(BigInt.sqrtUnsafe(16n), 4n)
605
  * ```
606
  *
607
+ * @see {@link sqrt} for returning `Option.none` when the input is negative
608
+ *
609
  * @category math
610
+ * @since 4.0.0
611
  */
612
  export const sqrtUnsafe = n => {
613
  if (n < bigint0) {
 
623
  return x;
624
  };
625
  /**
626
+ * Computes the integer square root of a `bigint` safely.
627
+ *
628
+ * **When to use**
629
+ *
630
+ * Use to compute an integer square root while representing negative input as
631
+ * `Option.none`.
632
  *
633
+ * **Details**
634
+ *
635
+ * For non-perfect squares, returns the largest `bigint` whose square is less
636
+ * than or equal to the input. Returns `Option.none()` when the input is
637
+ * negative.
638
+ *
639
+ * **Example** (Calculating square roots safely)
640
  *
641
  * ```ts
642
  * import { BigInt } from "effect"
 
647
  * BigInt.sqrt(-1n) // Option.none()
648
  * ```
649
  *
650
+ * @see {@link sqrtUnsafe} for square root computation that throws on negative input
651
+ *
652
  * @category math
653
  * @since 2.0.0
654
  */
655
  export const sqrt = n => isGreaterThanOrEqualTo(n, bigint0) ? Option.some(sqrtUnsafe(n)) : Option.none();
656
  /**
657
+ * Takes an `Iterable` of `bigint`s and returns their sum as a single `bigint`. Returns `0n` for an empty iterable.
658
+ *
659
+ * **When to use**
660
+ *
661
+ * Use when you want an immediate aggregate from an iterable instead of a
662
+ * folding reducer owned by another API.
663
+ *
664
+ * **Example** (Summing iterable bigints)
665
  *
 
666
  * ```ts
667
+ * import { BigInt } from "effect"
668
  * import * as assert from "node:assert"
669
  *
670
+ * assert.deepStrictEqual(BigInt.sumAll([2n, 3n, 4n]), 9n)
671
  * ```
672
  *
673
+ * @see {@link sum} for adding two `bigint` values
674
+ * @see {@link ReducerSum} for summing through APIs that consume a `Reducer`
675
+ *
676
  * @category math
677
  * @since 2.0.0
678
  */
 
684
  return out;
685
  };
686
  /**
687
+ * Takes an `Iterable` of `bigint`s and returns their product as a single `bigint`. Returns `1n` for an empty iterable.
688
+ *
689
+ * **When to use**
690
+ *
691
+ * Use to multiply all `bigint` values in an iterable.
692
+ *
693
+ * **Example** (Multiplying iterable bigints)
694
  *
 
695
  * ```ts
696
+ * import { BigInt } from "effect"
697
  * import * as assert from "node:assert"
698
  *
699
+ * assert.deepStrictEqual(BigInt.multiplyAll([2n, 3n, 4n]), 24n)
700
  * ```
701
  *
702
+ * @see {@link multiply} for multiplying two `bigint` values
703
+ * @see {@link ReducerMultiply} for multiplying through APIs that consume a `Reducer`
704
+ *
705
  * @category math
706
  * @since 2.0.0
707
  */
 
716
  return out;
717
  };
718
  /**
719
+ * Converts a `bigint` to a `number` safely.
720
+ *
721
+ * **When to use**
722
+ *
723
+ * Use to convert a `bigint` to a JavaScript number only when it is a safe
724
+ * integer.
725
+ *
726
+ * **Details**
727
  *
728
  * If the `bigint` is outside the safe integer range for JavaScript (`Number.MAX_SAFE_INTEGER`
729
  * and `Number.MIN_SAFE_INTEGER`), it returns `Option.none()`.
730
  *
731
+ * **Example** (Converting bigints to numbers)
732
+ *
733
  * ```ts
734
  * import { BigInt as BI } from "effect"
735
  *
 
738
  * BI.toNumber(BigInt(Number.MIN_SAFE_INTEGER) - 1n) // Option.none()
739
  * ```
740
  *
741
+ * @see {@link fromNumber} for converting a safe integer number to `bigint`
742
+ *
743
+ * @category converting
744
  * @since 2.0.0
745
  */
746
  export const toNumber = b => {
 
750
  return Option.some(Number(b));
751
  };
752
  /**
753
+ * Parses a string into a `bigint` safely.
754
+ *
755
+ * **When to use**
756
+ *
757
+ * Use to parse a string as a `bigint` without throwing on invalid input.
758
+ *
759
+ * **Details**
760
  *
761
  * If the string is empty or contains characters that cannot be converted into a
762
  * `bigint`, it returns `Option.none()`.
763
  *
764
+ * **Example** (Parsing strings as bigints)
765
+ *
766
  * ```ts
767
  * import { BigInt } from "effect"
768
  *
 
771
  * BigInt.fromString("a") // Option.none()
772
  * ```
773
  *
774
+ * @see {@link BigInt} for native constructor coercion that throws on invalid input
775
+ *
776
+ * @category converting
777
  * @since 2.4.12
778
  */
779
  export const fromString = s => {
 
786
  /**
787
  * Converts a number to a `bigint`.
788
  *
789
+ * **When to use**
790
+ *
791
+ * Use to convert a JavaScript number to `bigint` only when it is a safe integer.
792
+ *
793
+ * **Details**
794
+ *
795
  * If the number is outside the safe integer range for JavaScript
796
  * (`Number.MAX_SAFE_INTEGER` and `Number.MIN_SAFE_INTEGER`) or if the number is
797
  * not a valid `bigint`, it returns `Option.none()`.
798
  *
799
+ * **Example** (Converting numbers to bigints)
800
+ *
801
  * ```ts
802
  * import { BigInt } from "effect"
803
  *
 
807
  * BigInt.fromNumber(Number.MIN_SAFE_INTEGER - 1) // Option.none()
808
  * ```
809
  *
810
+ * @see {@link toNumber} for converting `bigint` values back to safe integer numbers
811
+ * @see {@link BigInt} for native constructor coercion
812
+ *
813
+ * @category converting
814
  * @since 2.4.12
815
  */
816
  export function fromNumber(n) {
 
824
  }
825
  }
826
  /**
827
+ * Returns the JavaScript remainder of dividing one `bigint` by another.
828
+ *
829
+ * **When to use**
830
+ *
831
+ * Use when you want native remainder semantics, including signed remainders and
832
+ * a thrown division-by-zero error.
833
+ *
834
+ * **Gotchas**
835
+ *
836
+ * Throws a `RangeError` when the divisor is `0n`.
837
+ *
838
+ * **Example** (Calculating remainders)
839
  *
 
840
  * ```ts
841
  * import { BigInt } from "effect"
842
  *
 
845
  * BigInt.remainder(15n, 4n) // 3n
846
  * ```
847
  *
848
+ * @see {@link divide} for quotient calculation with division-by-zero represented as `Option.none`
849
+ *
850
  * @category math
851
  * @since 4.0.0
852
  */
853
  export const remainder = /*#__PURE__*/dual(2, (self, divisor) => self % divisor);
854
  /**
855
+ * Reducer for combining `bigint`s using addition.
856
+ *
857
+ * **When to use**
858
+ *
859
+ * Use to sum many `bigint` values through APIs that consume a `Reducer`.
860
+ *
861
+ * **Details**
862
  *
863
+ * The initial value is `0n`, so `combineAll([])` returns `0n`.
864
+ *
865
+ * @see {@link sumAll} for summing an iterable directly
866
+ * @see {@link ReducerMultiply} for multiplying `bigint` values
867
+ *
868
+ * @category math
869
  * @since 4.0.0
870
  */
871
  export const ReducerSum = /*#__PURE__*/Reducer.make((a, b) => a + b, bigint0);
872
  /**
873
+ * Reducer for combining `bigint`s using multiplication.
874
+ *
875
+ * **When to use**
876
+ *
877
+ * Use to multiply many `bigint` values through APIs that consume a `Reducer`.
878
+ *
879
+ * **Details**
880
  *
881
+ * The initial value is `1n`, so `combineAll([])` returns `1n`.
882
+ *
883
+ * @see {@link multiplyAll} for multiplying an iterable directly
884
+ * @see {@link ReducerSum} for summing `bigint` values
885
+ *
886
+ * @category math
887
  * @since 4.0.0
888
  */
889
  export const ReducerMultiply = /*#__PURE__*/Reducer.make((a, b) => a * b, bigint1, collection => {
 
895
  return acc;
896
  });
897
  /**
898
+ * Combiner that returns the maximum `bigint`.
899
+ *
900
+ * **When to use**
901
+ *
902
+ * Use to keep the largest `bigint` when an API consumes a `Combiner`.
903
+ *
904
+ * @see {@link CombinerMin} for keeping the smallest `bigint`
905
+ * @see {@link max} for comparing two `bigint` values directly
906
  *
907
+ * @category math
908
  * @since 4.0.0
909
  */
910
  export const CombinerMax = /*#__PURE__*/Combiner.max(Order);
911
  /**
912
+ * Combiner that returns the minimum `bigint`.
913
+ *
914
+ * **When to use**
915
+ *
916
+ * Use to keep the smallest `bigint` through APIs that consume a `Combiner`.
917
  *
918
+ * @see {@link CombinerMax} for keeping the largest `bigint`
919
+ * @see {@link min} for comparing two `bigint` values directly
920
+ *
921
+ * @category math
922
  * @since 4.0.0
923
  */
924
  export const CombinerMin = /*#__PURE__*/Combiner.min(Order);
.opencode/node_modules/effect/dist/BigInt.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"BigInt.js","names":["Combiner","Equ","dual","Option","order","predicate","Reducer","BigInt","globalThis","bigint0","bigint1","bigint2","isBigInt","sum","self","that","multiply","subtract","divide","none","some","divideUnsafe","increment","n","decrement","Order","Equivalence","isLessThan","isLessThanOrEqualTo","isGreaterThan","isGreaterThanOrEqualTo","between","isBetween","clamp","min","max","sign","abs","gcd","t","lcm","sqrtUnsafe","RangeError","x","sqrt","sumAll","collection","out","multiplyAll","toNumber","b","Number","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","fromString","s","trim","fromNumber","remainder","divisor","ReducerSum","make","a","ReducerMultiply","acc","CombinerMax","CombinerMin"],"sources":["../src/BigInt.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;AAOA,OAAO,KAAKA,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,GAAG,MAAM,kBAAkB;AACvC,SAASC,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,KAAK,MAAM,YAAY;AAEnC,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAC3C,OAAO,KAAKC,OAAO,MAAM,cAAc;AAEvC;;;;;;;;;;;;;;;;;AAiBA,OAAO,MAAMC,MAAM,GAAGC,UAAU,CAACD,MAAM;AAEvC,MAAME,OAAO,gBAAGF,MAAM,CAAC,CAAC,CAAC;AACzB,MAAMG,OAAO,gBAAGH,MAAM,CAAC,CAAC,CAAC;AACzB,MAAMI,OAAO,gBAAGJ,MAAM,CAAC,CAAC,CAAC;AAEzB;;;;;;;;;;;;;;;AAeA,OAAO,MAAMK,QAAQ,GAAgCP,SAAS,CAACO,QAAQ;AAEvE;;;;;;;;;;;;;;AAcA,OAAO,MAAMC,GAAG,gBA+BZX,IAAI,CAAC,CAAC,EAAE,CAACY,IAAY,EAAEC,IAAY,KAAaD,IAAI,GAAGC,IAAI,CAAC;AAEhE;;;;;;;;;;;;;;AAcA,OAAO,MAAMC,QAAQ,gBA+BjBd,IAAI,CAAC,CAAC,EAAE,CAACY,IAAY,EAAE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,CAAC;AAEzF;;;;;AAKA,OAAO,MAAMsD,eAAe,gBAA4BzD,OAAO,CAACuD,IAAI,CAAC,CAACC,CAAC,EAAEZ,CAAC,KAAKY,CAAC,GAAGZ,CAAC,EAAExC,OAAO,EAAGoC,UAAU,IAAI;EAC5G,IAAIkB,GAAG,GAAGtD,OAAO;EACjB,KAAK,MAAMa,CAAC,IAAIuB,UAAU,EAAE;IAC1B,IAAIvB,CAAC,KAAKd,OAAO,EAAE,OAAOA,OAAO;IACjCuD,GAAG,IAAIzC,CAAC;EACV;EACA,OAAOyC,GAAG;AACZ,CAAC,CAAC;AAEF;;;;;AAKA,OAAO,MAAMC,WAAW,gBAA8BjE,QAAQ,CAACmC,GAAG,CAACV,KAAK,CAAC;AAEzE;;;;;AAKA,OAAO,MAAMyC,WAAW,gBAA8BlE,QAAQ,CAACkC,GAAG,CAACT,KAAK,CAAC","ignoreList":[]}
 
1
+ {"version":3,"file":"BigInt.js","names":["Combiner","Equ","dual","Option","order","predicate","Reducer","BigInt","globalThis","bigint0","bigint1","bigint2","isBigInt","sum","self","that","multiply","subtract","divide","none","some","divideUnsafe","increment","n","decrement","Order","Equivalence","isLessThan","isLessThanOrEqualTo","isGreaterThan","isGreaterThanOrEqualTo","between","isBetween","clamp","min","max","sign","abs","gcd","t","lcm","sqrtUnsafe","RangeError","x","sqrt","sumAll","collection","out","multiplyAll","toNumber","b","Number","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","fromString","s","trim","fromNumber","remainder","divisor","ReducerSum","make","a","ReducerMultiply","acc","CombinerMax","CombinerMin"],"sources":["../src/BigInt.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;AAWA,OAAO,KAAKA,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,GAAG,MAAM,kBAAkB;AACvC,SAASC,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,KAAK,MAAM,YAAY;AAEnC,OAAO,K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Kd,OAAO,EAAE,OAAOA,OAAO;IACjCuD,GAAG,IAAIzC,CAAC;EACV;EACA,OAAOyC,GAAG;AACZ,CAAC,CAAC;AAEF;;;;;;;;;;;;;AAaA,OAAO,MAAMC,WAAW,gBAA8BjE,QAAQ,CAACmC,GAAG,CAACV,KAAK,CAAC;AAEzE;;;;;;;;;;;;;AAaA,OAAO,MAAMyC,WAAW,gBAA8BlE,QAAQ,CAACkC,GAAG,CAACT,KAAK,CAAC","ignoreList":[]}
.opencode/node_modules/effect/dist/Boolean.d.ts CHANGED
@@ -1,6 +1,10 @@
1
  /**
2
- * This module provides utility functions and type class instances for working with the `boolean` type in TypeScript.
3
- * It includes functions for basic boolean operations.
 
 
 
 
4
  *
5
  * @since 2.0.0
6
  */
@@ -9,11 +13,23 @@ import type { LazyArg } from "./Function.ts";
9
  import * as order from "./Order.ts";
10
  import * as Reducer from "./Reducer.ts";
11
  /**
12
- * Reference to the global Boolean constructor.
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  *
14
- * @example
15
  * ```ts
16
- * import * as Boolean from "effect/Boolean"
17
  *
18
  * const bool = Boolean.Boolean(1)
19
  * console.log(bool) // true
@@ -30,15 +46,20 @@ import * as Reducer from "./Reducer.ts";
30
  */
31
  export declare const Boolean: BooleanConstructor;
32
  /**
33
- * Tests if a value is a `boolean`.
 
 
 
 
 
 
34
  *
35
- * @example
36
  * ```ts
37
- * import { isBoolean } from "effect/Boolean"
38
  * import * as assert from "node:assert"
39
  *
40
- * assert.deepStrictEqual(isBoolean(true), true)
41
- * assert.deepStrictEqual(isBoolean("true"), false)
42
  * ```
43
  *
44
  * @category guards
@@ -46,12 +67,16 @@ export declare const Boolean: BooleanConstructor;
46
  */
47
  export declare const isBoolean: (input: unknown) => input is boolean;
48
  /**
49
- * This function returns the result of either of the given functions depending on the value of the boolean parameter.
50
- * It is useful when you have to run one of two functions depending on the boolean value.
 
 
 
 
 
51
  *
52
- * @example
53
  * ```ts
54
- * import * as Boolean from "effect/Boolean"
55
  * import * as assert from "node:assert"
56
  *
57
  * assert.deepStrictEqual(
@@ -68,12 +93,16 @@ export declare const isBoolean: (input: unknown) => input is boolean;
68
  */
69
  export declare const match: {
70
  /**
71
- * This function returns the result of either of the given functions depending on the value of the boolean parameter.
72
- * It is useful when you have to run one of two functions depending on the boolean value.
 
 
 
 
 
73
  *
74
- * @example
75
  * ```ts
76
- * import * as Boolean from "effect/Boolean"
77
  * import * as assert from "node:assert"
78
  *
79
  * assert.deepStrictEqual(
@@ -93,12 +122,16 @@ export declare const match: {
93
  readonly onTrue: LazyArg<B>;
94
  }): (value: boolean) => A | B;
95
  /**
96
- * This function returns the result of either of the given functions depending on the value of the boolean parameter.
97
- * It is useful when you have to run one of two functions depending on the boolean value.
 
 
 
 
 
98
  *
99
- * @example
100
  * ```ts
101
- * import * as Boolean from "effect/Boolean"
102
  * import * as assert from "node:assert"
103
  *
104
  * assert.deepStrictEqual(
@@ -122,9 +155,15 @@ export declare const match: {
122
  * Provides an `Order` instance for `boolean` that allows comparing and sorting boolean values.
123
  * In this ordering, `false` is considered less than `true`.
124
  *
125
- * @example
 
 
 
 
 
 
126
  * ```ts
127
- * import * as Boolean from "effect/Boolean"
128
  *
129
  * console.log(Boolean.Order(false, true)) // -1 (false < true)
130
  * console.log(Boolean.Order(true, false)) // 1 (true > false)
@@ -136,9 +175,15 @@ export declare const match: {
136
  */
137
  export declare const Order: order.Order<boolean>;
138
  /**
139
- * An `Equivalence` instance for booleans using strict equality (`===`).
 
 
 
 
 
 
 
140
  *
141
- * @example
142
  * ```ts
143
  * import { Boolean } from "effect"
144
  *
@@ -147,19 +192,24 @@ export declare const Order: order.Order<boolean>;
147
  * ```
148
  *
149
  * @category instances
150
- * @since 4.0.0
151
  */
152
  export declare const Equivalence: Equ.Equivalence<boolean>;
153
  /**
154
  * Negates the given boolean: `!self`
155
  *
156
- * @example
 
 
 
 
 
157
  * ```ts
158
- * import { not } from "effect/Boolean"
159
  * import * as assert from "node:assert"
160
  *
161
- * assert.deepStrictEqual(not(true), false)
162
- * assert.deepStrictEqual(not(false), true)
163
  * ```
164
  *
165
  * @category combinators
@@ -167,17 +217,26 @@ export declare const Equivalence: Equ.Equivalence<boolean>;
167
  */
168
  export declare const not: (self: boolean) => boolean;
169
  /**
170
- * Combines two boolean using AND: `self && that`.
 
 
 
 
 
 
 
 
 
 
171
  *
172
- * @example
173
  * ```ts
174
- * import { and } from "effect/Boolean"
175
  * import * as assert from "node:assert"
176
  *
177
- * assert.deepStrictEqual(and(true, true), true)
178
- * assert.deepStrictEqual(and(true, false), false)
179
- * assert.deepStrictEqual(and(false, true), false)
180
- * assert.deepStrictEqual(and(false, false), false)
181
  * ```
182
  *
183
  * @category combinators
@@ -185,17 +244,26 @@ export declare const not: (self: boolean) => boolean;
185
  */
186
  export declare const and: {
187
  /**
188
- * Combines two boolean using AND: `self && that`.
 
 
 
 
 
 
 
 
 
 
189
  *
190
- * @example
191
  * ```ts
192
- * import { and } from "effect/Boolean"
193
  * import * as assert from "node:assert"
194
  *
195
- * assert.deepStrictEqual(and(true, true), true)
196
- * assert.deepStrictEqual(and(true, false), false)
197
- * assert.deepStrictEqual(and(false, true), false)
198
- * assert.deepStrictEqual(and(false, false), false)
199
  * ```
200
  *
201
  * @category combinators
@@ -203,17 +271,26 @@ export declare const and: {
203
  */
204
  (that: boolean): (self: boolean) => boolean;
205
  /**
206
- * Combines two boolean using AND: `self && that`.
 
 
 
 
 
 
 
 
 
 
207
  *
208
- * @example
209
  * ```ts
210
- * import { and } from "effect/Boolean"
211
  * import * as assert from "node:assert"
212
  *
213
- * assert.deepStrictEqual(and(true, true), true)
214
- * assert.deepStrictEqual(and(true, false), false)
215
- * assert.deepStrictEqual(and(false, true), false)
216
- * assert.deepStrictEqual(and(false, false), false)
217
  * ```
218
  *
219
  * @category combinators
@@ -222,17 +299,22 @@ export declare const and: {
222
  (self: boolean, that: boolean): boolean;
223
  };
224
  /**
225
- * Combines two boolean using NAND: `!(self && that)`.
 
 
 
 
 
 
226
  *
227
- * @example
228
  * ```ts
229
- * import { nand } from "effect/Boolean"
230
  * import * as assert from "node:assert"
231
  *
232
- * assert.deepStrictEqual(nand(true, true), false)
233
- * assert.deepStrictEqual(nand(true, false), true)
234
- * assert.deepStrictEqual(nand(false, true), true)
235
- * assert.deepStrictEqual(nand(false, false), true)
236
  * ```
237
  *
238
  * @category combinators
@@ -240,17 +322,22 @@ export declare const and: {
240
  */
241
  export declare const nand: {
242
  /**
243
- * Combines two boolean using NAND: `!(self && that)`.
 
 
 
 
 
 
244
  *
245
- * @example
246
  * ```ts
247
- * import { nand } from "effect/Boolean"
248
  * import * as assert from "node:assert"
249
  *
250
- * assert.deepStrictEqual(nand(true, true), false)
251
- * assert.deepStrictEqual(nand(true, false), true)
252
- * assert.deepStrictEqual(nand(false, true), true)
253
- * assert.deepStrictEqual(nand(false, false), true)
254
  * ```
255
  *
256
  * @category combinators
@@ -258,17 +345,22 @@ export declare const nand: {
258
  */
259
  (that: boolean): (self: boolean) => boolean;
260
  /**
261
- * Combines two boolean using NAND: `!(self && that)`.
 
 
 
 
 
 
262
  *
263
- * @example
264
  * ```ts
265
- * import { nand } from "effect/Boolean"
266
  * import * as assert from "node:assert"
267
  *
268
- * assert.deepStrictEqual(nand(true, true), false)
269
- * assert.deepStrictEqual(nand(true, false), true)
270
- * assert.deepStrictEqual(nand(false, true), true)
271
- * assert.deepStrictEqual(nand(false, false), true)
272
  * ```
273
  *
274
  * @category combinators
@@ -277,17 +369,22 @@ export declare const nand: {
277
  (self: boolean, that: boolean): boolean;
278
  };
279
  /**
280
- * Combines two boolean using OR: `self || that`.
 
 
 
 
 
 
281
  *
282
- * @example
283
  * ```ts
284
- * import { or } from "effect/Boolean"
285
  * import * as assert from "node:assert"
286
  *
287
- * assert.deepStrictEqual(or(true, true), true)
288
- * assert.deepStrictEqual(or(true, false), true)
289
- * assert.deepStrictEqual(or(false, true), true)
290
- * assert.deepStrictEqual(or(false, false), false)
291
  * ```
292
  *
293
  * @category combinators
@@ -295,17 +392,22 @@ export declare const nand: {
295
  */
296
  export declare const or: {
297
  /**
298
- * Combines two boolean using OR: `self || that`.
 
 
 
 
 
 
299
  *
300
- * @example
301
  * ```ts
302
- * import { or } from "effect/Boolean"
303
  * import * as assert from "node:assert"
304
  *
305
- * assert.deepStrictEqual(or(true, true), true)
306
- * assert.deepStrictEqual(or(true, false), true)
307
- * assert.deepStrictEqual(or(false, true), true)
308
- * assert.deepStrictEqual(or(false, false), false)
309
  * ```
310
  *
311
  * @category combinators
@@ -313,17 +415,22 @@ export declare const or: {
313
  */
314
  (that: boolean): (self: boolean) => boolean;
315
  /**
316
- * Combines two boolean using OR: `self || that`.
 
 
 
 
 
 
317
  *
318
- * @example
319
  * ```ts
320
- * import { or } from "effect/Boolean"
321
  * import * as assert from "node:assert"
322
  *
323
- * assert.deepStrictEqual(or(true, true), true)
324
- * assert.deepStrictEqual(or(true, false), true)
325
- * assert.deepStrictEqual(or(false, true), true)
326
- * assert.deepStrictEqual(or(false, false), false)
327
  * ```
328
  *
329
  * @category combinators
@@ -334,15 +441,20 @@ export declare const or: {
334
  /**
335
  * Combines two booleans using NOR: `!(self || that)`.
336
  *
337
- * @example
 
 
 
 
 
338
  * ```ts
339
- * import { nor } from "effect/Boolean"
340
  * import * as assert from "node:assert"
341
  *
342
- * assert.deepStrictEqual(nor(true, true), false)
343
- * assert.deepStrictEqual(nor(true, false), false)
344
- * assert.deepStrictEqual(nor(false, true), false)
345
- * assert.deepStrictEqual(nor(false, false), true)
346
  * ```
347
  *
348
  * @category combinators
@@ -352,15 +464,20 @@ export declare const nor: {
352
  /**
353
  * Combines two booleans using NOR: `!(self || that)`.
354
  *
355
- * @example
 
 
 
 
 
356
  * ```ts
357
- * import { nor } from "effect/Boolean"
358
  * import * as assert from "node:assert"
359
  *
360
- * assert.deepStrictEqual(nor(true, true), false)
361
- * assert.deepStrictEqual(nor(true, false), false)
362
- * assert.deepStrictEqual(nor(false, true), false)
363
- * assert.deepStrictEqual(nor(false, false), true)
364
  * ```
365
  *
366
  * @category combinators
@@ -370,15 +487,20 @@ export declare const nor: {
370
  /**
371
  * Combines two booleans using NOR: `!(self || that)`.
372
  *
373
- * @example
 
 
 
 
 
374
  * ```ts
375
- * import { nor } from "effect/Boolean"
376
  * import * as assert from "node:assert"
377
  *
378
- * assert.deepStrictEqual(nor(true, true), false)
379
- * assert.deepStrictEqual(nor(true, false), false)
380
- * assert.deepStrictEqual(nor(false, true), false)
381
- * assert.deepStrictEqual(nor(false, false), true)
382
  * ```
383
  *
384
  * @category combinators
@@ -389,15 +511,20 @@ export declare const nor: {
389
  /**
390
  * Combines two booleans using XOR: `(!self && that) || (self && !that)`.
391
  *
392
- * @example
 
 
 
 
 
393
  * ```ts
394
- * import { xor } from "effect/Boolean"
395
  * import * as assert from "node:assert"
396
  *
397
- * assert.deepStrictEqual(xor(true, true), false)
398
- * assert.deepStrictEqual(xor(true, false), true)
399
- * assert.deepStrictEqual(xor(false, true), true)
400
- * assert.deepStrictEqual(xor(false, false), false)
401
  * ```
402
  *
403
  * @category combinators
@@ -407,15 +534,20 @@ export declare const xor: {
407
  /**
408
  * Combines two booleans using XOR: `(!self && that) || (self && !that)`.
409
  *
410
- * @example
 
 
 
 
 
411
  * ```ts
412
- * import { xor } from "effect/Boolean"
413
  * import * as assert from "node:assert"
414
  *
415
- * assert.deepStrictEqual(xor(true, true), false)
416
- * assert.deepStrictEqual(xor(true, false), true)
417
- * assert.deepStrictEqual(xor(false, true), true)
418
- * assert.deepStrictEqual(xor(false, false), false)
419
  * ```
420
  *
421
  * @category combinators
@@ -425,15 +557,20 @@ export declare const xor: {
425
  /**
426
  * Combines two booleans using XOR: `(!self && that) || (self && !that)`.
427
  *
428
- * @example
 
 
 
 
 
429
  * ```ts
430
- * import { xor } from "effect/Boolean"
431
  * import * as assert from "node:assert"
432
  *
433
- * assert.deepStrictEqual(xor(true, true), false)
434
- * assert.deepStrictEqual(xor(true, false), true)
435
- * assert.deepStrictEqual(xor(false, true), true)
436
- * assert.deepStrictEqual(xor(false, false), false)
437
  * ```
438
  *
439
  * @category combinators
@@ -444,15 +581,20 @@ export declare const xor: {
444
  /**
445
  * Combines two booleans using EQV (aka XNOR): `!xor(self, that)`.
446
  *
447
- * @example
 
 
 
 
 
448
  * ```ts
449
- * import { eqv } from "effect/Boolean"
450
  * import * as assert from "node:assert"
451
  *
452
- * assert.deepStrictEqual(eqv(true, true), true)
453
- * assert.deepStrictEqual(eqv(true, false), false)
454
- * assert.deepStrictEqual(eqv(false, true), false)
455
- * assert.deepStrictEqual(eqv(false, false), true)
456
  * ```
457
  *
458
  * @category combinators
@@ -462,15 +604,20 @@ export declare const eqv: {
462
  /**
463
  * Combines two booleans using EQV (aka XNOR): `!xor(self, that)`.
464
  *
465
- * @example
 
 
 
 
 
466
  * ```ts
467
- * import { eqv } from "effect/Boolean"
468
  * import * as assert from "node:assert"
469
  *
470
- * assert.deepStrictEqual(eqv(true, true), true)
471
- * assert.deepStrictEqual(eqv(true, false), false)
472
- * assert.deepStrictEqual(eqv(false, true), false)
473
- * assert.deepStrictEqual(eqv(false, false), true)
474
  * ```
475
  *
476
  * @category combinators
@@ -480,15 +627,20 @@ export declare const eqv: {
480
  /**
481
  * Combines two booleans using EQV (aka XNOR): `!xor(self, that)`.
482
  *
483
- * @example
 
 
 
 
 
484
  * ```ts
485
- * import { eqv } from "effect/Boolean"
486
  * import * as assert from "node:assert"
487
  *
488
- * assert.deepStrictEqual(eqv(true, true), true)
489
- * assert.deepStrictEqual(eqv(true, false), false)
490
- * assert.deepStrictEqual(eqv(false, true), false)
491
- * assert.deepStrictEqual(eqv(false, false), true)
492
  * ```
493
  *
494
  * @category combinators
@@ -499,15 +651,20 @@ export declare const eqv: {
499
  /**
500
  * Combines two booleans using an implication: `(!self || that)`.
501
  *
502
- * @example
 
 
 
 
 
503
  * ```ts
504
- * import { implies } from "effect/Boolean"
505
  * import * as assert from "node:assert"
506
  *
507
- * assert.deepStrictEqual(implies(true, true), true)
508
- * assert.deepStrictEqual(implies(true, false), false)
509
- * assert.deepStrictEqual(implies(false, true), true)
510
- * assert.deepStrictEqual(implies(false, false), true)
511
  * ```
512
  *
513
  * @category combinators
@@ -517,15 +674,20 @@ export declare const implies: {
517
  /**
518
  * Combines two booleans using an implication: `(!self || that)`.
519
  *
520
- * @example
 
 
 
 
 
521
  * ```ts
522
- * import { implies } from "effect/Boolean"
523
  * import * as assert from "node:assert"
524
  *
525
- * assert.deepStrictEqual(implies(true, true), true)
526
- * assert.deepStrictEqual(implies(true, false), false)
527
- * assert.deepStrictEqual(implies(false, true), true)
528
- * assert.deepStrictEqual(implies(false, false), true)
529
  * ```
530
  *
531
  * @category combinators
@@ -535,15 +697,20 @@ export declare const implies: {
535
  /**
536
  * Combines two booleans using an implication: `(!self || that)`.
537
  *
538
- * @example
 
 
 
 
 
539
  * ```ts
540
- * import { implies } from "effect/Boolean"
541
  * import * as assert from "node:assert"
542
  *
543
- * assert.deepStrictEqual(implies(true, true), true)
544
- * assert.deepStrictEqual(implies(true, false), false)
545
- * assert.deepStrictEqual(implies(false, true), true)
546
- * assert.deepStrictEqual(implies(false, false), true)
547
  * ```
548
  *
549
  * @category combinators
@@ -552,50 +719,93 @@ export declare const implies: {
552
  (self: boolean, that: boolean): boolean;
553
  };
554
  /**
555
- * This utility function is used to check if all the elements in a collection of boolean values are `true`.
 
 
 
 
 
 
556
  *
557
- * @example
558
  * ```ts
559
- * import { every } from "effect/Boolean"
560
  * import * as assert from "node:assert"
561
  *
562
- * assert.deepStrictEqual(every([true, true, true]), true)
563
- * assert.deepStrictEqual(every([true, false, true]), false)
564
  * ```
565
  *
566
- * @category utilities
 
 
 
567
  * @since 2.0.0
568
  */
569
  export declare const every: (collection: Iterable<boolean>) => boolean;
570
  /**
571
- * This utility function is used to check if at least one of the elements in a collection of boolean values is `true`.
 
 
 
 
 
 
572
  *
573
- * @example
574
  * ```ts
575
- * import { some } from "effect/Boolean"
576
  * import * as assert from "node:assert"
577
  *
578
- * assert.deepStrictEqual(some([true, false, true]), true)
579
- * assert.deepStrictEqual(some([false, false, false]), false)
580
  * ```
581
  *
582
- * @category utilities
 
 
 
583
  * @since 2.0.0
584
  */
585
  export declare const some: (collection: Iterable<boolean>) => boolean;
586
  /**
587
- * A `Reducer` for combining `boolean`s using AND.
 
 
 
 
 
588
  *
589
- * The `initialValue` is `true`.
590
  *
 
 
 
 
 
 
 
 
 
 
 
591
  * @since 4.0.0
592
  */
593
  export declare const ReducerAnd: Reducer.Reducer<boolean>;
594
  /**
595
- * A `Reducer` for combining `boolean`s using OR.
 
 
 
 
 
 
 
596
  *
597
  * The `initialValue` is `false`.
598
  *
 
 
 
 
599
  * @since 4.0.0
600
  */
601
  export declare const ReducerOr: Reducer.Reducer<boolean>;
 
1
  /**
2
+ * Works with TypeScript `boolean` values.
3
+ *
4
+ * This module exposes the native `Boolean` constructor together with helpers
5
+ * for checking values, choosing between lazy branches, combining booleans with
6
+ * logical operations, checking collections with `every` or `some`, ordering
7
+ * booleans, and reducing boolean values.
8
  *
9
  * @since 2.0.0
10
  */
 
13
  import * as order from "./Order.ts";
14
  import * as Reducer from "./Reducer.ts";
15
  /**
16
+ * Exposes the global boolean constructor for JavaScript truthiness
17
+ * coercion.
18
+ *
19
+ * **When to use**
20
+ *
21
+ * Use to access native JavaScript truthiness coercion from the Effect module
22
+ * namespace.
23
+ *
24
+ * **Gotchas**
25
+ *
26
+ * This follows native truthiness rules. For example, non-empty strings such as
27
+ * `"false"` coerce to `true`.
28
+ *
29
+ * **Example** (Coercing values to booleans)
30
  *
 
31
  * ```ts
32
+ * import { Boolean } from "effect"
33
  *
34
  * const bool = Boolean.Boolean(1)
35
  * console.log(bool) // true
 
46
  */
47
  export declare const Boolean: BooleanConstructor;
48
  /**
49
+ * Checks whether a value is a `boolean`.
50
+ *
51
+ * **When to use**
52
+ *
53
+ * Use to validate unknown input and narrow it to `boolean`.
54
+ *
55
+ * **Example** (Checking for booleans)
56
  *
 
57
  * ```ts
58
+ * import { Boolean } from "effect"
59
  * import * as assert from "node:assert"
60
  *
61
+ * assert.deepStrictEqual(Boolean.isBoolean(true), true)
62
+ * assert.deepStrictEqual(Boolean.isBoolean("true"), false)
63
  * ```
64
  *
65
  * @category guards
 
67
  */
68
  export declare const isBoolean: (input: unknown) => input is boolean;
69
  /**
70
+ * Chooses between two lazy branches based on a boolean value.
71
+ *
72
+ * **When to use**
73
+ *
74
+ * Use to choose between two lazy branches based on a boolean value.
75
+ *
76
+ * **Example** (Pattern matching on booleans)
77
  *
 
78
  * ```ts
79
+ * import { Boolean } from "effect"
80
  * import * as assert from "node:assert"
81
  *
82
  * assert.deepStrictEqual(
 
93
  */
94
  export declare const match: {
95
  /**
96
+ * Chooses between two lazy branches based on a boolean value.
97
+ *
98
+ * **When to use**
99
+ *
100
+ * Use to choose between two lazy branches based on a boolean value.
101
+ *
102
+ * **Example** (Pattern matching on booleans)
103
  *
 
104
  * ```ts
105
+ * import { Boolean } from "effect"
106
  * import * as assert from "node:assert"
107
  *
108
  * assert.deepStrictEqual(
 
122
  readonly onTrue: LazyArg<B>;
123
  }): (value: boolean) => A | B;
124
  /**
125
+ * Chooses between two lazy branches based on a boolean value.
126
+ *
127
+ * **When to use**
128
+ *
129
+ * Use to choose between two lazy branches based on a boolean value.
130
+ *
131
+ * **Example** (Pattern matching on booleans)
132
  *
 
133
  * ```ts
134
+ * import { Boolean } from "effect"
135
  * import * as assert from "node:assert"
136
  *
137
  * assert.deepStrictEqual(
 
155
  * Provides an `Order` instance for `boolean` that allows comparing and sorting boolean values.
156
  * In this ordering, `false` is considered less than `true`.
157
  *
158
+ * **When to use**
159
+ *
160
+ * Use when you need to sort or compare boolean values through APIs that accept
161
+ * an ordering instance where `false` comes before `true`.
162
+ *
163
+ * **Example** (Comparing booleans)
164
+ *
165
  * ```ts
166
+ * import { Boolean } from "effect"
167
  *
168
  * console.log(Boolean.Order(false, true)) // -1 (false < true)
169
  * console.log(Boolean.Order(true, false)) // 1 (true > false)
 
175
  */
176
  export declare const Order: order.Order<boolean>;
177
  /**
178
+ * Equivalence instance for booleans using strict equality (`===`).
179
+ *
180
+ * **When to use**
181
+ *
182
+ * Use when checking boolean equality through APIs that accept an equivalence
183
+ * relation.
184
+ *
185
+ * **Example** (Comparing booleans for equivalence)
186
  *
 
187
  * ```ts
188
  * import { Boolean } from "effect"
189
  *
 
192
  * ```
193
  *
194
  * @category instances
195
+ * @since 2.0.0
196
  */
197
  export declare const Equivalence: Equ.Equivalence<boolean>;
198
  /**
199
  * Negates the given boolean: `!self`
200
  *
201
+ * **When to use**
202
+ *
203
+ * Use to invert a boolean value.
204
+ *
205
+ * **Example** (Negating booleans)
206
+ *
207
  * ```ts
208
+ * import { Boolean } from "effect"
209
  * import * as assert from "node:assert"
210
  *
211
+ * assert.deepStrictEqual(Boolean.not(true), false)
212
+ * assert.deepStrictEqual(Boolean.not(false), true)
213
  * ```
214
  *
215
  * @category combinators
 
217
  */
218
  export declare const not: (self: boolean) => boolean;
219
  /**
220
+ * Combines two booleans using logical AND: `self && that`.
221
+ *
222
+ * **When to use**
223
+ *
224
+ * Use to require both boolean operands to be `true`.
225
+ *
226
+ * **Details**
227
+ *
228
+ * Supports both data-first and data-last forms.
229
+ *
230
+ * **Example** (Combining booleans with AND)
231
  *
 
232
  * ```ts
233
+ * import { Boolean } from "effect"
234
  * import * as assert from "node:assert"
235
  *
236
+ * assert.deepStrictEqual(Boolean.and(true, true), true)
237
+ * assert.deepStrictEqual(Boolean.and(true, false), false)
238
+ * assert.deepStrictEqual(Boolean.and(false, true), false)
239
+ * assert.deepStrictEqual(Boolean.and(false, false), false)
240
  * ```
241
  *
242
  * @category combinators
 
244
  */
245
  export declare const and: {
246
  /**
247
+ * Combines two booleans using logical AND: `self && that`.
248
+ *
249
+ * **When to use**
250
+ *
251
+ * Use to require both boolean operands to be `true`.
252
+ *
253
+ * **Details**
254
+ *
255
+ * Supports both data-first and data-last forms.
256
+ *
257
+ * **Example** (Combining booleans with AND)
258
  *
 
259
  * ```ts
260
+ * import { Boolean } from "effect"
261
  * import * as assert from "node:assert"
262
  *
263
+ * assert.deepStrictEqual(Boolean.and(true, true), true)
264
+ * assert.deepStrictEqual(Boolean.and(true, false), false)
265
+ * assert.deepStrictEqual(Boolean.and(false, true), false)
266
+ * assert.deepStrictEqual(Boolean.and(false, false), false)
267
  * ```
268
  *
269
  * @category combinators
 
271
  */
272
  (that: boolean): (self: boolean) => boolean;
273
  /**
274
+ * Combines two booleans using logical AND: `self && that`.
275
+ *
276
+ * **When to use**
277
+ *
278
+ * Use to require both boolean operands to be `true`.
279
+ *
280
+ * **Details**
281
+ *
282
+ * Supports both data-first and data-last forms.
283
+ *
284
+ * **Example** (Combining booleans with AND)
285
  *
 
286
  * ```ts
287
+ * import { Boolean } from "effect"
288
  * import * as assert from "node:assert"
289
  *
290
+ * assert.deepStrictEqual(Boolean.and(true, true), true)
291
+ * assert.deepStrictEqual(Boolean.and(true, false), false)
292
+ * assert.deepStrictEqual(Boolean.and(false, true), false)
293
+ * assert.deepStrictEqual(Boolean.and(false, false), false)
294
  * ```
295
  *
296
  * @category combinators
 
299
  (self: boolean, that: boolean): boolean;
300
  };
301
  /**
302
+ * Combines two booleans using NAND: `!(self && that)`.
303
+ *
304
+ * **When to use**
305
+ *
306
+ * Use to negate a logical AND result.
307
+ *
308
+ * **Example** (Combining booleans with NAND)
309
  *
 
310
  * ```ts
311
+ * import { Boolean } from "effect"
312
  * import * as assert from "node:assert"
313
  *
314
+ * assert.deepStrictEqual(Boolean.nand(true, true), false)
315
+ * assert.deepStrictEqual(Boolean.nand(true, false), true)
316
+ * assert.deepStrictEqual(Boolean.nand(false, true), true)
317
+ * assert.deepStrictEqual(Boolean.nand(false, false), true)
318
  * ```
319
  *
320
  * @category combinators
 
322
  */
323
  export declare const nand: {
324
  /**
325
+ * Combines two booleans using NAND: `!(self && that)`.
326
+ *
327
+ * **When to use**
328
+ *
329
+ * Use to negate a logical AND result.
330
+ *
331
+ * **Example** (Combining booleans with NAND)
332
  *
 
333
  * ```ts
334
+ * import { Boolean } from "effect"
335
  * import * as assert from "node:assert"
336
  *
337
+ * assert.deepStrictEqual(Boolean.nand(true, true), false)
338
+ * assert.deepStrictEqual(Boolean.nand(true, false), true)
339
+ * assert.deepStrictEqual(Boolean.nand(false, true), true)
340
+ * assert.deepStrictEqual(Boolean.nand(false, false), true)
341
  * ```
342
  *
343
  * @category combinators
 
345
  */
346
  (that: boolean): (self: boolean) => boolean;
347
  /**
348
+ * Combines two booleans using NAND: `!(self && that)`.
349
+ *
350
+ * **When to use**
351
+ *
352
+ * Use to negate a logical AND result.
353
+ *
354
+ * **Example** (Combining booleans with NAND)
355
  *
 
356
  * ```ts
357
+ * import { Boolean } from "effect"
358
  * import * as assert from "node:assert"
359
  *
360
+ * assert.deepStrictEqual(Boolean.nand(true, true), false)
361
+ * assert.deepStrictEqual(Boolean.nand(true, false), true)
362
+ * assert.deepStrictEqual(Boolean.nand(false, true), true)
363
+ * assert.deepStrictEqual(Boolean.nand(false, false), true)
364
  * ```
365
  *
366
  * @category combinators
 
369
  (self: boolean, that: boolean): boolean;
370
  };
371
  /**
372
+ * Combines two booleans using OR: `self || that`.
373
+ *
374
+ * **When to use**
375
+ *
376
+ * Use to accept when either boolean operand is `true`.
377
+ *
378
+ * **Example** (Combining booleans with OR)
379
  *
 
380
  * ```ts
381
+ * import { Boolean } from "effect"
382
  * import * as assert from "node:assert"
383
  *
384
+ * assert.deepStrictEqual(Boolean.or(true, true), true)
385
+ * assert.deepStrictEqual(Boolean.or(true, false), true)
386
+ * assert.deepStrictEqual(Boolean.or(false, true), true)
387
+ * assert.deepStrictEqual(Boolean.or(false, false), false)
388
  * ```
389
  *
390
  * @category combinators
 
392
  */
393
  export declare const or: {
394
  /**
395
+ * Combines two booleans using OR: `self || that`.
396
+ *
397
+ * **When to use**
398
+ *
399
+ * Use to accept when either boolean operand is `true`.
400
+ *
401
+ * **Example** (Combining booleans with OR)
402
  *
 
403
  * ```ts
404
+ * import { Boolean } from "effect"
405
  * import * as assert from "node:assert"
406
  *
407
+ * assert.deepStrictEqual(Boolean.or(true, true), true)
408
+ * assert.deepStrictEqual(Boolean.or(true, false), true)
409
+ * assert.deepStrictEqual(Boolean.or(false, true), true)
410
+ * assert.deepStrictEqual(Boolean.or(false, false), false)
411
  * ```
412
  *
413
  * @category combinators
 
415
  */
416
  (that: boolean): (self: boolean) => boolean;
417
  /**
418
+ * Combines two booleans using OR: `self || that`.
419
+ *
420
+ * **When to use**
421
+ *
422
+ * Use to accept when either boolean operand is `true`.
423
+ *
424
+ * **Example** (Combining booleans with OR)
425
  *
 
426
  * ```ts
427
+ * import { Boolean } from "effect"
428
  * import * as assert from "node:assert"
429
  *
430
+ * assert.deepStrictEqual(Boolean.or(true, true), true)
431
+ * assert.deepStrictEqual(Boolean.or(true, false), true)
432
+ * assert.deepStrictEqual(Boolean.or(false, true), true)
433
+ * assert.deepStrictEqual(Boolean.or(false, false), false)
434
  * ```
435
  *
436
  * @category combinators
 
441
  /**
442
  * Combines two booleans using NOR: `!(self || that)`.
443
  *
444
+ * **When to use**
445
+ *
446
+ * Use to accept only when both boolean operands are `false`.
447
+ *
448
+ * **Example** (Combining booleans with NOR)
449
+ *
450
  * ```ts
451
+ * import { Boolean } from "effect"
452
  * import * as assert from "node:assert"
453
  *
454
+ * assert.deepStrictEqual(Boolean.nor(true, true), false)
455
+ * assert.deepStrictEqual(Boolean.nor(true, false), false)
456
+ * assert.deepStrictEqual(Boolean.nor(false, true), false)
457
+ * assert.deepStrictEqual(Boolean.nor(false, false), true)
458
  * ```
459
  *
460
  * @category combinators
 
464
  /**
465
  * Combines two booleans using NOR: `!(self || that)`.
466
  *
467
+ * **When to use**
468
+ *
469
+ * Use to accept only when both boolean operands are `false`.
470
+ *
471
+ * **Example** (Combining booleans with NOR)
472
+ *
473
  * ```ts
474
+ * import { Boolean } from "effect"
475
  * import * as assert from "node:assert"
476
  *
477
+ * assert.deepStrictEqual(Boolean.nor(true, true), false)
478
+ * assert.deepStrictEqual(Boolean.nor(true, false), false)
479
+ * assert.deepStrictEqual(Boolean.nor(false, true), false)
480
+ * assert.deepStrictEqual(Boolean.nor(false, false), true)
481
  * ```
482
  *
483
  * @category combinators
 
487
  /**
488
  * Combines two booleans using NOR: `!(self || that)`.
489
  *
490
+ * **When to use**
491
+ *
492
+ * Use to accept only when both boolean operands are `false`.
493
+ *
494
+ * **Example** (Combining booleans with NOR)
495
+ *
496
  * ```ts
497
+ * import { Boolean } from "effect"
498
  * import * as assert from "node:assert"
499
  *
500
+ * assert.deepStrictEqual(Boolean.nor(true, true), false)
501
+ * assert.deepStrictEqual(Boolean.nor(true, false), false)
502
+ * assert.deepStrictEqual(Boolean.nor(false, true), false)
503
+ * assert.deepStrictEqual(Boolean.nor(false, false), true)
504
  * ```
505
  *
506
  * @category combinators
 
511
  /**
512
  * Combines two booleans using XOR: `(!self && that) || (self && !that)`.
513
  *
514
+ * **When to use**
515
+ *
516
+ * Use to accept when exactly one boolean operand is `true`.
517
+ *
518
+ * **Example** (Combining booleans with XOR)
519
+ *
520
  * ```ts
521
+ * import { Boolean } from "effect"
522
  * import * as assert from "node:assert"
523
  *
524
+ * assert.deepStrictEqual(Boolean.xor(true, true), false)
525
+ * assert.deepStrictEqual(Boolean.xor(true, false), true)
526
+ * assert.deepStrictEqual(Boolean.xor(false, true), true)
527
+ * assert.deepStrictEqual(Boolean.xor(false, false), false)
528
  * ```
529
  *
530
  * @category combinators
 
534
  /**
535
  * Combines two booleans using XOR: `(!self && that) || (self && !that)`.
536
  *
537
+ * **When to use**
538
+ *
539
+ * Use to accept when exactly one boolean operand is `true`.
540
+ *
541
+ * **Example** (Combining booleans with XOR)
542
+ *
543
  * ```ts
544
+ * import { Boolean } from "effect"
545
  * import * as assert from "node:assert"
546
  *
547
+ * assert.deepStrictEqual(Boolean.xor(true, true), false)
548
+ * assert.deepStrictEqual(Boolean.xor(true, false), true)
549
+ * assert.deepStrictEqual(Boolean.xor(false, true), true)
550
+ * assert.deepStrictEqual(Boolean.xor(false, false), false)
551
  * ```
552
  *
553
  * @category combinators
 
557
  /**
558
  * Combines two booleans using XOR: `(!self && that) || (self && !that)`.
559
  *
560
+ * **When to use**
561
+ *
562
+ * Use to accept when exactly one boolean operand is `true`.
563
+ *
564
+ * **Example** (Combining booleans with XOR)
565
+ *
566
  * ```ts
567
+ * import { Boolean } from "effect"
568
  * import * as assert from "node:assert"
569
  *
570
+ * assert.deepStrictEqual(Boolean.xor(true, true), false)
571
+ * assert.deepStrictEqual(Boolean.xor(true, false), true)
572
+ * assert.deepStrictEqual(Boolean.xor(false, true), true)
573
+ * assert.deepStrictEqual(Boolean.xor(false, false), false)
574
  * ```
575
  *
576
  * @category combinators
 
581
  /**
582
  * Combines two booleans using EQV (aka XNOR): `!xor(self, that)`.
583
  *
584
+ * **When to use**
585
+ *
586
+ * Use to accept when both boolean operands have the same truth value.
587
+ *
588
+ * **Example** (Checking boolean equivalence)
589
+ *
590
  * ```ts
591
+ * import { Boolean } from "effect"
592
  * import * as assert from "node:assert"
593
  *
594
+ * assert.deepStrictEqual(Boolean.eqv(true, true), true)
595
+ * assert.deepStrictEqual(Boolean.eqv(true, false), false)
596
+ * assert.deepStrictEqual(Boolean.eqv(false, true), false)
597
+ * assert.deepStrictEqual(Boolean.eqv(false, false), true)
598
  * ```
599
  *
600
  * @category combinators
 
604
  /**
605
  * Combines two booleans using EQV (aka XNOR): `!xor(self, that)`.
606
  *
607
+ * **When to use**
608
+ *
609
+ * Use to accept when both boolean operands have the same truth value.
610
+ *
611
+ * **Example** (Checking boolean equivalence)
612
+ *
613
  * ```ts
614
+ * import { Boolean } from "effect"
615
  * import * as assert from "node:assert"
616
  *
617
+ * assert.deepStrictEqual(Boolean.eqv(true, true), true)
618
+ * assert.deepStrictEqual(Boolean.eqv(true, false), false)
619
+ * assert.deepStrictEqual(Boolean.eqv(false, true), false)
620
+ * assert.deepStrictEqual(Boolean.eqv(false, false), true)
621
  * ```
622
  *
623
  * @category combinators
 
627
  /**
628
  * Combines two booleans using EQV (aka XNOR): `!xor(self, that)`.
629
  *
630
+ * **When to use**
631
+ *
632
+ * Use to accept when both boolean operands have the same truth value.
633
+ *
634
+ * **Example** (Checking boolean equivalence)
635
+ *
636
  * ```ts
637
+ * import { Boolean } from "effect"
638
  * import * as assert from "node:assert"
639
  *
640
+ * assert.deepStrictEqual(Boolean.eqv(true, true), true)
641
+ * assert.deepStrictEqual(Boolean.eqv(true, false), false)
642
+ * assert.deepStrictEqual(Boolean.eqv(false, true), false)
643
+ * assert.deepStrictEqual(Boolean.eqv(false, false), true)
644
  * ```
645
  *
646
  * @category combinators
 
651
  /**
652
  * Combines two booleans using an implication: `(!self || that)`.
653
  *
654
+ * **When to use**
655
+ *
656
+ * Use to model logical implication between a condition and a consequence.
657
+ *
658
+ * **Example** (Checking boolean implication)
659
+ *
660
  * ```ts
661
+ * import { Boolean } from "effect"
662
  * import * as assert from "node:assert"
663
  *
664
+ * assert.deepStrictEqual(Boolean.implies(true, true), true)
665
+ * assert.deepStrictEqual(Boolean.implies(true, false), false)
666
+ * assert.deepStrictEqual(Boolean.implies(false, true), true)
667
+ * assert.deepStrictEqual(Boolean.implies(false, false), true)
668
  * ```
669
  *
670
  * @category combinators
 
674
  /**
675
  * Combines two booleans using an implication: `(!self || that)`.
676
  *
677
+ * **When to use**
678
+ *
679
+ * Use to model logical implication between a condition and a consequence.
680
+ *
681
+ * **Example** (Checking boolean implication)
682
+ *
683
  * ```ts
684
+ * import { Boolean } from "effect"
685
  * import * as assert from "node:assert"
686
  *
687
+ * assert.deepStrictEqual(Boolean.implies(true, true), true)
688
+ * assert.deepStrictEqual(Boolean.implies(true, false), false)
689
+ * assert.deepStrictEqual(Boolean.implies(false, true), true)
690
+ * assert.deepStrictEqual(Boolean.implies(false, false), true)
691
  * ```
692
  *
693
  * @category combinators
 
697
  /**
698
  * Combines two booleans using an implication: `(!self || that)`.
699
  *
700
+ * **When to use**
701
+ *
702
+ * Use to model logical implication between a condition and a consequence.
703
+ *
704
+ * **Example** (Checking boolean implication)
705
+ *
706
  * ```ts
707
+ * import { Boolean } from "effect"
708
  * import * as assert from "node:assert"
709
  *
710
+ * assert.deepStrictEqual(Boolean.implies(true, true), true)
711
+ * assert.deepStrictEqual(Boolean.implies(true, false), false)
712
+ * assert.deepStrictEqual(Boolean.implies(false, true), true)
713
+ * assert.deepStrictEqual(Boolean.implies(false, false), true)
714
  * ```
715
  *
716
  * @category combinators
 
719
  (self: boolean, that: boolean): boolean;
720
  };
721
  /**
722
+ * Checks whether every boolean in a collection is `true`.
723
+ *
724
+ * **When to use**
725
+ *
726
+ * Use to check that every boolean in an iterable is `true`.
727
+ *
728
+ * **Example** (Checking every boolean)
729
  *
 
730
  * ```ts
731
+ * import { Boolean } from "effect"
732
  * import * as assert from "node:assert"
733
  *
734
+ * assert.deepStrictEqual(Boolean.every([true, true, true]), true)
735
+ * assert.deepStrictEqual(Boolean.every([true, false, true]), false)
736
  * ```
737
  *
738
+ * @see {@link some} for checking whether at least one value is `true`
739
+ * @see {@link ReducerAnd} for reducing booleans with AND through a `Reducer`
740
+ *
741
+ * @category predicates
742
  * @since 2.0.0
743
  */
744
  export declare const every: (collection: Iterable<boolean>) => boolean;
745
  /**
746
+ * Checks whether at least one boolean in a collection is `true`.
747
+ *
748
+ * **When to use**
749
+ *
750
+ * Use to check that at least one boolean in an iterable is `true`.
751
+ *
752
+ * **Example** (Checking some booleans)
753
  *
 
754
  * ```ts
755
+ * import { Boolean } from "effect"
756
  * import * as assert from "node:assert"
757
  *
758
+ * assert.deepStrictEqual(Boolean.some([true, false, true]), true)
759
+ * assert.deepStrictEqual(Boolean.some([false, false, false]), false)
760
  * ```
761
  *
762
+ * @see {@link every} for checking whether all values are `true`
763
+ * @see {@link ReducerOr} for reducing booleans with OR through a `Reducer`
764
+ *
765
+ * @category predicates
766
  * @since 2.0.0
767
  */
768
  export declare const some: (collection: Iterable<boolean>) => boolean;
769
  /**
770
+ * Reducer for combining `boolean`s using AND.
771
+ *
772
+ * **When to use**
773
+ *
774
+ * Use to require every accumulated boolean to be `true` through APIs that
775
+ * consume a `Reducer`.
776
  *
777
+ * **Details**
778
  *
779
+ * The `initialValue` is `true`, so `combineAll([])` returns `true`.
780
+ *
781
+ * **Gotchas**
782
+ *
783
+ * `combineAll` uses the default left-to-right `Reducer.make` fold and does not
784
+ * short-circuit on `false`.
785
+ *
786
+ * @see {@link ReducerOr} for reducing with OR semantics
787
+ * @see {@link every} for checking an iterable directly
788
+ *
789
+ * @category math
790
  * @since 4.0.0
791
  */
792
  export declare const ReducerAnd: Reducer.Reducer<boolean>;
793
  /**
794
+ * Reducer for combining `boolean`s using OR.
795
+ *
796
+ * **When to use**
797
+ *
798
+ * Use to reduce boolean values where the result should be `true` if any
799
+ * combined value is `true`.
800
+ *
801
+ * **Details**
802
  *
803
  * The `initialValue` is `false`.
804
  *
805
+ * @see {@link ReducerAnd} for reducing with AND semantics
806
+ * @see {@link some} for checking an iterable directly
807
+ *
808
+ * @category math
809
  * @since 4.0.0
810
  */
811
  export declare const ReducerOr: Reducer.Reducer<boolean>;
.opencode/node_modules/effect/dist/Boolean.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Boolean.d.ts","sourceRoot":"","sources":["../src/Boolean.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,GAAG,MAAM,kBAAkB,CAAA;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAE5C,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AAEnC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAEvC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,OAAO,oBAAqB,CAAA;AAEzC;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,SAAS,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,KAAK,IAAI,OAA6B,CAAA;AAElF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH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G;IACH,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAA;CACiD,CAAA;AAE1F;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,GAAG,EAAE;IAChB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,CAAC,IAAI,EAAE,OAAO,GAAG,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAA;IAC3C;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAA;CAC+B,CAAA;AAExE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,OAAO,EAAE;IACpB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,CAAC,IAAI,EAAE,OAAO,GAAG,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAA;IAC3C;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAA;CACM,CAAA;AAE/C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,KAAK,GAAI,YAAY,QAAQ,CAAC,OAAO,CAAC,KAAG,OAOrD,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,IAAI,GAAI,YAAY,QAAQ,CAAC,OAAO,CAAC,KAAG,OAOpD,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,UAAU,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,CAAwC,CAAA;AAExF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,SAAS,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,CAAyC,CAAA"}
.opencode/node_modules/effect/dist/Boolean.js CHANGED
@@ -1,6 +1,10 @@
1
  /**
2
- * This module provides utility functions and type class instances for working with the `boolean` type in TypeScript.
3
- * It includes functions for basic boolean operations.
 
 
 
 
4
  *
5
  * @since 2.0.0
6
  */
@@ -10,11 +14,23 @@ import * as order from "./Order.js";
10
  import * as predicate from "./Predicate.js";
11
  import * as Reducer from "./Reducer.js";
12
  /**
13
- * Reference to the global Boolean constructor.
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  *
15
- * @example
16
  * ```ts
17
- * import * as Boolean from "effect/Boolean"
18
  *
19
  * const bool = Boolean.Boolean(1)
20
  * console.log(bool) // true
@@ -31,15 +47,20 @@ import * as Reducer from "./Reducer.js";
31
  */
32
  export const Boolean = globalThis.Boolean;
33
  /**
34
- * Tests if a value is a `boolean`.
 
 
 
 
 
 
35
  *
36
- * @example
37
  * ```ts
38
- * import { isBoolean } from "effect/Boolean"
39
  * import * as assert from "node:assert"
40
  *
41
- * assert.deepStrictEqual(isBoolean(true), true)
42
- * assert.deepStrictEqual(isBoolean("true"), false)
43
  * ```
44
  *
45
  * @category guards
@@ -47,12 +68,16 @@ export const Boolean = globalThis.Boolean;
47
  */
48
  export const isBoolean = predicate.isBoolean;
49
  /**
50
- * This function returns the result of either of the given functions depending on the value of the boolean parameter.
51
- * It is useful when you have to run one of two functions depending on the boolean value.
 
 
 
 
 
52
  *
53
- * @example
54
  * ```ts
55
- * import * as Boolean from "effect/Boolean"
56
  * import * as assert from "node:assert"
57
  *
58
  * assert.deepStrictEqual(
@@ -72,9 +97,15 @@ export const match = /*#__PURE__*/dual(2, (value, options) => value ? options.on
72
  * Provides an `Order` instance for `boolean` that allows comparing and sorting boolean values.
73
  * In this ordering, `false` is considered less than `true`.
74
  *
75
- * @example
 
 
 
 
 
 
76
  * ```ts
77
- * import * as Boolean from "effect/Boolean"
78
  *
79
  * console.log(Boolean.Order(false, true)) // -1 (false < true)
80
  * console.log(Boolean.Order(true, false)) // 1 (true > false)
@@ -86,9 +117,15 @@ export const match = /*#__PURE__*/dual(2, (value, options) => value ? options.on
86
  */
87
  export const Order = order.Boolean;
88
  /**
89
- * An `Equivalence` instance for booleans using strict equality (`===`).
 
 
 
 
 
 
 
90
  *
91
- * @example
92
  * ```ts
93
  * import { Boolean } from "effect"
94
  *
@@ -97,19 +134,24 @@ export const Order = order.Boolean;
97
  * ```
98
  *
99
  * @category instances
100
- * @since 4.0.0
101
  */
102
  export const Equivalence = Equ.Boolean;
103
  /**
104
  * Negates the given boolean: `!self`
105
  *
106
- * @example
 
 
 
 
 
107
  * ```ts
108
- * import { not } from "effect/Boolean"
109
  * import * as assert from "node:assert"
110
  *
111
- * assert.deepStrictEqual(not(true), false)
112
- * assert.deepStrictEqual(not(false), true)
113
  * ```
114
  *
115
  * @category combinators
@@ -117,17 +159,26 @@ export const Equivalence = Equ.Boolean;
117
  */
118
  export const not = self => !self;
119
  /**
120
- * Combines two boolean using AND: `self && that`.
 
 
 
 
 
 
 
 
 
 
121
  *
122
- * @example
123
  * ```ts
124
- * import { and } from "effect/Boolean"
125
  * import * as assert from "node:assert"
126
  *
127
- * assert.deepStrictEqual(and(true, true), true)
128
- * assert.deepStrictEqual(and(true, false), false)
129
- * assert.deepStrictEqual(and(false, true), false)
130
- * assert.deepStrictEqual(and(false, false), false)
131
  * ```
132
  *
133
  * @category combinators
@@ -135,17 +186,22 @@ export const not = self => !self;
135
  */
136
  export const and = /*#__PURE__*/dual(2, (self, that) => self && that);
137
  /**
138
- * Combines two boolean using NAND: `!(self && that)`.
 
 
 
 
 
 
139
  *
140
- * @example
141
  * ```ts
142
- * import { nand } from "effect/Boolean"
143
  * import * as assert from "node:assert"
144
  *
145
- * assert.deepStrictEqual(nand(true, true), false)
146
- * assert.deepStrictEqual(nand(true, false), true)
147
- * assert.deepStrictEqual(nand(false, true), true)
148
- * assert.deepStrictEqual(nand(false, false), true)
149
  * ```
150
  *
151
  * @category combinators
@@ -153,17 +209,22 @@ export const and = /*#__PURE__*/dual(2, (self, that) => self && that);
153
  */
154
  export const nand = /*#__PURE__*/dual(2, (self, that) => !(self && that));
155
  /**
156
- * Combines two boolean using OR: `self || that`.
 
 
 
 
 
 
157
  *
158
- * @example
159
  * ```ts
160
- * import { or } from "effect/Boolean"
161
  * import * as assert from "node:assert"
162
  *
163
- * assert.deepStrictEqual(or(true, true), true)
164
- * assert.deepStrictEqual(or(true, false), true)
165
- * assert.deepStrictEqual(or(false, true), true)
166
- * assert.deepStrictEqual(or(false, false), false)
167
  * ```
168
  *
169
  * @category combinators
@@ -173,15 +234,20 @@ export const or = /*#__PURE__*/dual(2, (self, that) => self || that);
173
  /**
174
  * Combines two booleans using NOR: `!(self || that)`.
175
  *
176
- * @example
 
 
 
 
 
177
  * ```ts
178
- * import { nor } from "effect/Boolean"
179
  * import * as assert from "node:assert"
180
  *
181
- * assert.deepStrictEqual(nor(true, true), false)
182
- * assert.deepStrictEqual(nor(true, false), false)
183
- * assert.deepStrictEqual(nor(false, true), false)
184
- * assert.deepStrictEqual(nor(false, false), true)
185
  * ```
186
  *
187
  * @category combinators
@@ -191,15 +257,20 @@ export const nor = /*#__PURE__*/dual(2, (self, that) => !(self || that));
191
  /**
192
  * Combines two booleans using XOR: `(!self && that) || (self && !that)`.
193
  *
194
- * @example
 
 
 
 
 
195
  * ```ts
196
- * import { xor } from "effect/Boolean"
197
  * import * as assert from "node:assert"
198
  *
199
- * assert.deepStrictEqual(xor(true, true), false)
200
- * assert.deepStrictEqual(xor(true, false), true)
201
- * assert.deepStrictEqual(xor(false, true), true)
202
- * assert.deepStrictEqual(xor(false, false), false)
203
  * ```
204
  *
205
  * @category combinators
@@ -209,15 +280,20 @@ export const xor = /*#__PURE__*/dual(2, (self, that) => !self && that || self &&
209
  /**
210
  * Combines two booleans using EQV (aka XNOR): `!xor(self, that)`.
211
  *
212
- * @example
 
 
 
 
 
213
  * ```ts
214
- * import { eqv } from "effect/Boolean"
215
  * import * as assert from "node:assert"
216
  *
217
- * assert.deepStrictEqual(eqv(true, true), true)
218
- * assert.deepStrictEqual(eqv(true, false), false)
219
- * assert.deepStrictEqual(eqv(false, true), false)
220
- * assert.deepStrictEqual(eqv(false, false), true)
221
  * ```
222
  *
223
  * @category combinators
@@ -227,15 +303,20 @@ export const eqv = /*#__PURE__*/dual(2, (self, that) => !xor(self, that));
227
  /**
228
  * Combines two booleans using an implication: `(!self || that)`.
229
  *
230
- * @example
 
 
 
 
 
231
  * ```ts
232
- * import { implies } from "effect/Boolean"
233
  * import * as assert from "node:assert"
234
  *
235
- * assert.deepStrictEqual(implies(true, true), true)
236
- * assert.deepStrictEqual(implies(true, false), false)
237
- * assert.deepStrictEqual(implies(false, true), true)
238
- * assert.deepStrictEqual(implies(false, false), true)
239
  * ```
240
  *
241
  * @category combinators
@@ -243,18 +324,26 @@ export const eqv = /*#__PURE__*/dual(2, (self, that) => !xor(self, that));
243
  */
244
  export const implies = /*#__PURE__*/dual(2, (self, that) => self ? that : true);
245
  /**
246
- * This utility function is used to check if all the elements in a collection of boolean values are `true`.
 
 
 
 
 
 
247
  *
248
- * @example
249
  * ```ts
250
- * import { every } from "effect/Boolean"
251
  * import * as assert from "node:assert"
252
  *
253
- * assert.deepStrictEqual(every([true, true, true]), true)
254
- * assert.deepStrictEqual(every([true, false, true]), false)
255
  * ```
256
  *
257
- * @category utilities
 
 
 
258
  * @since 2.0.0
259
  */
260
  export const every = collection => {
@@ -266,18 +355,26 @@ export const every = collection => {
266
  return true;
267
  };
268
  /**
269
- * This utility function is used to check if at least one of the elements in a collection of boolean values is `true`.
 
 
 
 
 
 
270
  *
271
- * @example
272
  * ```ts
273
- * import { some } from "effect/Boolean"
274
  * import * as assert from "node:assert"
275
  *
276
- * assert.deepStrictEqual(some([true, false, true]), true)
277
- * assert.deepStrictEqual(some([false, false, false]), false)
278
  * ```
279
  *
280
- * @category utilities
 
 
 
281
  * @since 2.0.0
282
  */
283
  export const some = collection => {
@@ -289,18 +386,45 @@ export const some = collection => {
289
  return false;
290
  };
291
  /**
292
- * A `Reducer` for combining `boolean`s using AND.
 
 
293
  *
294
- * The `initialValue` is `true`.
 
295
  *
 
 
 
 
 
 
 
 
 
 
 
 
 
296
  * @since 4.0.0
297
  */
298
  export const ReducerAnd = /*#__PURE__*/Reducer.make((a, b) => a && b, true);
299
  /**
300
- * A `Reducer` for combining `boolean`s using OR.
 
 
 
 
 
 
 
301
  *
302
  * The `initialValue` is `false`.
303
  *
 
 
 
 
304
  * @since 4.0.0
305
  */
306
  export const ReducerOr = /*#__PURE__*/Reducer.make((a, b) => a || b, false);
 
1
  /**
2
+ * Works with TypeScript `boolean` values.
3
+ *
4
+ * This module exposes the native `Boolean` constructor together with helpers
5
+ * for checking values, choosing between lazy branches, combining booleans with
6
+ * logical operations, checking collections with `every` or `some`, ordering
7
+ * booleans, and reducing boolean values.
8
  *
9
  * @since 2.0.0
10
  */
 
14
  import * as predicate from "./Predicate.js";
15
  import * as Reducer from "./Reducer.js";
16
  /**
17
+ * Exposes the global boolean constructor for JavaScript truthiness
18
+ * coercion.
19
+ *
20
+ * **When to use**
21
+ *
22
+ * Use to access native JavaScript truthiness coercion from the Effect module
23
+ * namespace.
24
+ *
25
+ * **Gotchas**
26
+ *
27
+ * This follows native truthiness rules. For example, non-empty strings such as
28
+ * `"false"` coerce to `true`.
29
+ *
30
+ * **Example** (Coercing values to booleans)
31
  *
 
32
  * ```ts
33
+ * import { Boolean } from "effect"
34
  *
35
  * const bool = Boolean.Boolean(1)
36
  * console.log(bool) // true
 
47
  */
48
  export const Boolean = globalThis.Boolean;
49
  /**
50
+ * Checks whether a value is a `boolean`.
51
+ *
52
+ * **When to use**
53
+ *
54
+ * Use to validate unknown input and narrow it to `boolean`.
55
+ *
56
+ * **Example** (Checking for booleans)
57
  *
 
58
  * ```ts
59
+ * import { Boolean } from "effect"
60
  * import * as assert from "node:assert"
61
  *
62
+ * assert.deepStrictEqual(Boolean.isBoolean(true), true)
63
+ * assert.deepStrictEqual(Boolean.isBoolean("true"), false)
64
  * ```
65
  *
66
  * @category guards
 
68
  */
69
  export const isBoolean = predicate.isBoolean;
70
  /**
71
+ * Chooses between two lazy branches based on a boolean value.
72
+ *
73
+ * **When to use**
74
+ *
75
+ * Use to choose between two lazy branches based on a boolean value.
76
+ *
77
+ * **Example** (Pattern matching on booleans)
78
  *
 
79
  * ```ts
80
+ * import { Boolean } from "effect"
81
  * import * as assert from "node:assert"
82
  *
83
  * assert.deepStrictEqual(
 
97
  * Provides an `Order` instance for `boolean` that allows comparing and sorting boolean values.
98
  * In this ordering, `false` is considered less than `true`.
99
  *
100
+ * **When to use**
101
+ *
102
+ * Use when you need to sort or compare boolean values through APIs that accept
103
+ * an ordering instance where `false` comes before `true`.
104
+ *
105
+ * **Example** (Comparing booleans)
106
+ *
107
  * ```ts
108
+ * import { Boolean } from "effect"
109
  *
110
  * console.log(Boolean.Order(false, true)) // -1 (false < true)
111
  * console.log(Boolean.Order(true, false)) // 1 (true > false)
 
117
  */
118
  export const Order = order.Boolean;
119
  /**
120
+ * Equivalence instance for booleans using strict equality (`===`).
121
+ *
122
+ * **When to use**
123
+ *
124
+ * Use when checking boolean equality through APIs that accept an equivalence
125
+ * relation.
126
+ *
127
+ * **Example** (Comparing booleans for equivalence)
128
  *
 
129
  * ```ts
130
  * import { Boolean } from "effect"
131
  *
 
134
  * ```
135
  *
136
  * @category instances
137
+ * @since 2.0.0
138
  */
139
  export const Equivalence = Equ.Boolean;
140
  /**
141
  * Negates the given boolean: `!self`
142
  *
143
+ * **When to use**
144
+ *
145
+ * Use to invert a boolean value.
146
+ *
147
+ * **Example** (Negating booleans)
148
+ *
149
  * ```ts
150
+ * import { Boolean } from "effect"
151
  * import * as assert from "node:assert"
152
  *
153
+ * assert.deepStrictEqual(Boolean.not(true), false)
154
+ * assert.deepStrictEqual(Boolean.not(false), true)
155
  * ```
156
  *
157
  * @category combinators
 
159
  */
160
  export const not = self => !self;
161
  /**
162
+ * Combines two booleans using logical AND: `self && that`.
163
+ *
164
+ * **When to use**
165
+ *
166
+ * Use to require both boolean operands to be `true`.
167
+ *
168
+ * **Details**
169
+ *
170
+ * Supports both data-first and data-last forms.
171
+ *
172
+ * **Example** (Combining booleans with AND)
173
  *
 
174
  * ```ts
175
+ * import { Boolean } from "effect"
176
  * import * as assert from "node:assert"
177
  *
178
+ * assert.deepStrictEqual(Boolean.and(true, true), true)
179
+ * assert.deepStrictEqual(Boolean.and(true, false), false)
180
+ * assert.deepStrictEqual(Boolean.and(false, true), false)
181
+ * assert.deepStrictEqual(Boolean.and(false, false), false)
182
  * ```
183
  *
184
  * @category combinators
 
186
  */
187
  export const and = /*#__PURE__*/dual(2, (self, that) => self && that);
188
  /**
189
+ * Combines two booleans using NAND: `!(self && that)`.
190
+ *
191
+ * **When to use**
192
+ *
193
+ * Use to negate a logical AND result.
194
+ *
195
+ * **Example** (Combining booleans with NAND)
196
  *
 
197
  * ```ts
198
+ * import { Boolean } from "effect"
199
  * import * as assert from "node:assert"
200
  *
201
+ * assert.deepStrictEqual(Boolean.nand(true, true), false)
202
+ * assert.deepStrictEqual(Boolean.nand(true, false), true)
203
+ * assert.deepStrictEqual(Boolean.nand(false, true), true)
204
+ * assert.deepStrictEqual(Boolean.nand(false, false), true)
205
  * ```
206
  *
207
  * @category combinators
 
209
  */
210
  export const nand = /*#__PURE__*/dual(2, (self, that) => !(self && that));
211
  /**
212
+ * Combines two booleans using OR: `self || that`.
213
+ *
214
+ * **When to use**
215
+ *
216
+ * Use to accept when either boolean operand is `true`.
217
+ *
218
+ * **Example** (Combining booleans with OR)
219
  *
 
220
  * ```ts
221
+ * import { Boolean } from "effect"
222
  * import * as assert from "node:assert"
223
  *
224
+ * assert.deepStrictEqual(Boolean.or(true, true), true)
225
+ * assert.deepStrictEqual(Boolean.or(true, false), true)
226
+ * assert.deepStrictEqual(Boolean.or(false, true), true)
227
+ * assert.deepStrictEqual(Boolean.or(false, false), false)
228
  * ```
229
  *
230
  * @category combinators
 
234
  /**
235
  * Combines two booleans using NOR: `!(self || that)`.
236
  *
237
+ * **When to use**
238
+ *
239
+ * Use to accept only when both boolean operands are `false`.
240
+ *
241
+ * **Example** (Combining booleans with NOR)
242
+ *
243
  * ```ts
244
+ * import { Boolean } from "effect"
245
  * import * as assert from "node:assert"
246
  *
247
+ * assert.deepStrictEqual(Boolean.nor(true, true), false)
248
+ * assert.deepStrictEqual(Boolean.nor(true, false), false)
249
+ * assert.deepStrictEqual(Boolean.nor(false, true), false)
250
+ * assert.deepStrictEqual(Boolean.nor(false, false), true)
251
  * ```
252
  *
253
  * @category combinators
 
257
  /**
258
  * Combines two booleans using XOR: `(!self && that) || (self && !that)`.
259
  *
260
+ * **When to use**
261
+ *
262
+ * Use to accept when exactly one boolean operand is `true`.
263
+ *
264
+ * **Example** (Combining booleans with XOR)
265
+ *
266
  * ```ts
267
+ * import { Boolean } from "effect"
268
  * import * as assert from "node:assert"
269
  *
270
+ * assert.deepStrictEqual(Boolean.xor(true, true), false)
271
+ * assert.deepStrictEqual(Boolean.xor(true, false), true)
272
+ * assert.deepStrictEqual(Boolean.xor(false, true), true)
273
+ * assert.deepStrictEqual(Boolean.xor(false, false), false)
274
  * ```
275
  *
276
  * @category combinators
 
280
  /**
281
  * Combines two booleans using EQV (aka XNOR): `!xor(self, that)`.
282
  *
283
+ * **When to use**
284
+ *
285
+ * Use to accept when both boolean operands have the same truth value.
286
+ *
287
+ * **Example** (Checking boolean equivalence)
288
+ *
289
  * ```ts
290
+ * import { Boolean } from "effect"
291
  * import * as assert from "node:assert"
292
  *
293
+ * assert.deepStrictEqual(Boolean.eqv(true, true), true)
294
+ * assert.deepStrictEqual(Boolean.eqv(true, false), false)
295
+ * assert.deepStrictEqual(Boolean.eqv(false, true), false)
296
+ * assert.deepStrictEqual(Boolean.eqv(false, false), true)
297
  * ```
298
  *
299
  * @category combinators
 
303
  /**
304
  * Combines two booleans using an implication: `(!self || that)`.
305
  *
306
+ * **When to use**
307
+ *
308
+ * Use to model logical implication between a condition and a consequence.
309
+ *
310
+ * **Example** (Checking boolean implication)
311
+ *
312
  * ```ts
313
+ * import { Boolean } from "effect"
314
  * import * as assert from "node:assert"
315
  *
316
+ * assert.deepStrictEqual(Boolean.implies(true, true), true)
317
+ * assert.deepStrictEqual(Boolean.implies(true, false), false)
318
+ * assert.deepStrictEqual(Boolean.implies(false, true), true)
319
+ * assert.deepStrictEqual(Boolean.implies(false, false), true)
320
  * ```
321
  *
322
  * @category combinators
 
324
  */
325
  export const implies = /*#__PURE__*/dual(2, (self, that) => self ? that : true);
326
  /**
327
+ * Checks whether every boolean in a collection is `true`.
328
+ *
329
+ * **When to use**
330
+ *
331
+ * Use to check that every boolean in an iterable is `true`.
332
+ *
333
+ * **Example** (Checking every boolean)
334
  *
 
335
  * ```ts
336
+ * import { Boolean } from "effect"
337
  * import * as assert from "node:assert"
338
  *
339
+ * assert.deepStrictEqual(Boolean.every([true, true, true]), true)
340
+ * assert.deepStrictEqual(Boolean.every([true, false, true]), false)
341
  * ```
342
  *
343
+ * @see {@link some} for checking whether at least one value is `true`
344
+ * @see {@link ReducerAnd} for reducing booleans with AND through a `Reducer`
345
+ *
346
+ * @category predicates
347
  * @since 2.0.0
348
  */
349
  export const every = collection => {
 
355
  return true;
356
  };
357
  /**
358
+ * Checks whether at least one boolean in a collection is `true`.
359
+ *
360
+ * **When to use**
361
+ *
362
+ * Use to check that at least one boolean in an iterable is `true`.
363
+ *
364
+ * **Example** (Checking some booleans)
365
  *
 
366
  * ```ts
367
+ * import { Boolean } from "effect"
368
  * import * as assert from "node:assert"
369
  *
370
+ * assert.deepStrictEqual(Boolean.some([true, false, true]), true)
371
+ * assert.deepStrictEqual(Boolean.some([false, false, false]), false)
372
  * ```
373
  *
374
+ * @see {@link every} for checking whether all values are `true`
375
+ * @see {@link ReducerOr} for reducing booleans with OR through a `Reducer`
376
+ *
377
+ * @category predicates
378
  * @since 2.0.0
379
  */
380
  export const some = collection => {
 
386
  return false;
387
  };
388
  /**
389
+ * Reducer for combining `boolean`s using AND.
390
+ *
391
+ * **When to use**
392
  *
393
+ * Use to require every accumulated boolean to be `true` through APIs that
394
+ * consume a `Reducer`.
395
  *
396
+ * **Details**
397
+ *
398
+ * The `initialValue` is `true`, so `combineAll([])` returns `true`.
399
+ *
400
+ * **Gotchas**
401
+ *
402
+ * `combineAll` uses the default left-to-right `Reducer.make` fold and does not
403
+ * short-circuit on `false`.
404
+ *
405
+ * @see {@link ReducerOr} for reducing with OR semantics
406
+ * @see {@link every} for checking an iterable directly
407
+ *
408
+ * @category math
409
  * @since 4.0.0
410
  */
411
  export const ReducerAnd = /*#__PURE__*/Reducer.make((a, b) => a && b, true);
412
  /**
413
+ * Reducer for combining `boolean`s using OR.
414
+ *
415
+ * **When to use**
416
+ *
417
+ * Use to reduce boolean values where the result should be `true` if any
418
+ * combined value is `true`.
419
+ *
420
+ * **Details**
421
  *
422
  * The `initialValue` is `false`.
423
  *
424
+ * @see {@link ReducerAnd} for reducing with AND semantics
425
+ * @see {@link some} for checking an iterable directly
426
+ *
427
+ * @category math
428
  * @since 4.0.0
429
  */
430
  export const ReducerOr = /*#__PURE__*/Reducer.make((a, b) => a || b, false);
.opencode/node_modules/effect/dist/Boolean.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Boolean.js","names":["Equ","dual","order","predicate","Reducer","Boolean","globalThis","isBoolean","match","value","options","onTrue","onFalse","Order","Equivalence","not","self","and","that","nand","or","nor","xor","eqv","implies","every","collection","b","some","ReducerAnd","make","a","ReducerOr"],"sources":["../src/Boolean.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;AAMA,OAAO,KAAKA,GAAG,MAAM,kBAAkB;AAEvC,SAASC,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAC3C,OAAO,KAAKC,OAAO,MAAM,cAAc;AAEvC;;;;;;;;;;;;;;;;;;;;AAoBA,OAAO,MAAMC,OAAO,GAAGC,UAAU,CAACD,OAAO;AAEzC;;;;;;;;;;;;;;;AAeA,OAAO,MAAME,SAAS,GAAyCJ,SAAS,CAACI,SAAS;AAElF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;;;;;;;;AAiBA,OAAO,MAAMK,GAAG,gBAqCZtB,IAAI,CAAC,CAAC,EAAE,CAACe,IAAa,EAAEE,IAAa,KAAc,CAACI,GAAG,CAACN,IAAI,EAAEE,IAAI,CAAC,CAAC;AAExE;;;;;;;;;;;;;;;;;AAiBA,OAAO,MAAMM,OAAO,gBAqChBvB,IAAI,CAAC,CAAC,EAAE,CAACe,IAAI,EAAEE,IAAI,KAAKF,IAAI,GAAGE,IAAI,GAAG,IAAI,CAAC;AAE/C;;;;;;;;;;;;;;;AAeA,OAAO,MAAMO,KAAK,GAAIC,UAA6B,IAAa;EAC9D,KAAK,MAAMC,CAAC,IAAID,UAAU,EAAE;IAC1B,IAAI,CAACC,CAAC,EAAE;MACN,OAAO,KAAK;IACd;EACF;EACA,OAAO,IAAI;AACb,CAAC;AAED;;;;;;;;;;;;;;;AAeA,OAAO,MAAMC,IAAI,GAAIF,UAA6B,IAAa;EAC7D,KAAK,MAAMC,CAAC,IAAID,UAAU,EAAE;IAC1B,IAAIC,CAAC,EAAE;MACL,OAAO,IAAI;IACb;EACF;EACA,OAAO,KAAK;AACd,CAAC;AAED;;;;;;;AAOA,OAAO,MAAME,UAAU,gBAA6BzB,OAAO,CAAC0B,IAAI,CAAC,CAACC,CAAC,EAAEJ,CAAC,KAAKI,CAAC,IAAIJ,CAAC,EAAE,IAAI,CAAC;AAExF;;;;;;;AAOA,OAAO,MAAMK,SAAS,gBAA6B5B,OAAO,CAAC0B,IAAI,CAAC,CAACC,CAAC,EAAEJ,CAAC,KAAKI,CAAC,IAAIJ,CAAC,EAAE,KAAK,CAAC","ignoreList":[]}
 
1
+ {"version":3,"file":"Boolean.js","names":["Equ","dual","order","predicate","Reducer","Boolean","globalThis","isBoolean","match","value","options","onTrue","onFalse","Order","Equivalence","not","self","and","that","nand","or","nor","xor","eqv","implies","every","collection","b","some","ReducerAnd","make","a","ReducerOr"],"sources":["../src/Boolean.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;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BzB,OAAO,CAAC0B,IAAI,CAAC,CAACC,CAAC,EAAEJ,CAAC,KAAKI,CAAC,IAAIJ,CAAC,EAAE,IAAI,CAAC;AAExF;;;;;;;;;;;;;;;;;;AAkBA,OAAO,MAAMK,SAAS,gBAA6B5B,OAAO,CAAC0B,IAAI,CAAC,CAACC,CAAC,EAAEJ,CAAC,KAAKI,CAAC,IAAIJ,CAAC,EAAE,KAAK,CAAC","ignoreList":[]}
.opencode/node_modules/effect/dist/Brand.d.ts CHANGED
@@ -1,15 +1,24 @@
1
  import * as Option from "./Option.ts";
2
  import * as Result from "./Result.ts";
3
  import type * as Schema from "./Schema.ts";
4
- import * as AST from "./SchemaAST.ts";
5
- import type * as Issue from "./SchemaIssue.ts";
6
  import type * as Types from "./Types.ts";
7
  declare const TypeId = "~effect/Brand";
8
  /**
9
  * A generic interface that defines a branded type.
10
  *
11
- * @since 2.0.0
 
 
 
 
 
 
 
 
12
  * @category models
 
13
  */
14
  export interface Brand<in out Keys extends string> {
15
  readonly [TypeId]: {
@@ -20,6 +29,17 @@ export interface Brand<in out Keys extends string> {
20
  * A constructor for a branded type that provides validation and safe
21
  * construction methods.
22
  *
 
 
 
 
 
 
 
 
 
 
 
23
  * @category models
24
  * @since 2.0.0
25
  */
@@ -47,60 +67,86 @@ export interface Constructor<in out B extends Brand<any>> {
47
  is(unbranded: Brand.Unbranded<B>): unbranded is Brand.Unbranded<B> & B;
48
  }
49
  /**
50
- * A `BrandError` is returned when a branded type is constructed from an invalid
51
- * value.
52
  *
53
- * @category models
 
 
 
 
 
 
 
 
 
 
54
  * @since 4.0.0
55
  */
56
  export declare class BrandError {
57
- constructor(issue: Issue.Issue);
58
  /**
 
 
59
  * @since 4.0.0
60
  */
61
  readonly _tag = "BrandError";
62
  /**
 
 
63
  * @since 4.0.0
64
  */
65
  readonly name: string;
66
  /**
 
 
67
  * @since 4.0.0
68
  */
69
- readonly issue: Issue.Issue;
70
  /**
 
 
71
  * @since 4.0.0
72
  */
73
  get message(): string;
74
  /**
 
 
75
  * @since 4.0.0
76
  */
77
  toString(): string;
78
  }
79
  /**
 
 
 
80
  * @since 2.0.0
81
  */
82
  export declare namespace Brand {
83
  /**
84
  * A utility type to extract a branded type from a `Constructor`.
85
  *
 
86
  * @since 2.0.0
87
  */
88
  type FromConstructor<C> = C extends Constructor<infer B> ? B : never;
89
  /**
90
  * A utility type to extract the unbranded value type from a brand.
91
  *
 
92
  * @since 2.0.0
93
  */
94
  type Unbranded<B extends Brand<any>> = B extends infer U & Brands<B> ? U : B;
95
  /**
96
  * A utility type to extract the keys of a branded type.
97
  *
98
- * @since 2.0.0
 
99
  */
100
  type Keys<B extends Brand<any>> = keyof B[typeof TypeId];
101
  /**
102
  * A utility type to extract the brands from a branded type.
103
  *
 
104
  * @since 2.0.0
105
  */
106
  type Brands<B extends Brand<any>> = Types.UnionToIntersection<{
@@ -109,6 +155,7 @@ export declare namespace Brand {
109
  /**
110
  * A utility type that checks that all brands have the same base type.
111
  *
 
112
  * @since 2.0.0
113
  */
114
  type EnsureCommonBase<Brands extends readonly [Constructor<any>, ...Array<Constructor<any>>]> = {
@@ -118,46 +165,76 @@ export declare namespace Brand {
118
  /**
119
  * A type alias for creating branded types more concisely.
120
  *
121
- * @category alias
122
  * @since 2.0.0
123
  */
124
  export type Branded<A, Key extends string> = A & Brand<Key>;
125
  /**
126
- * This function returns a `Constructor` that **does not apply any runtime
127
- * checks**, it just returns the provided value. It can be used to create
128
- * nominal types that allow distinguishing between two values of the same type
129
- * but with different meanings.
130
  *
131
- * If you also want to perform some validation, see {@link make} or
132
- * {@link check} or {@link refine}.
 
 
 
133
  *
134
  * @category constructors
135
  * @since 2.0.0
136
  */
137
  export declare function nominal<A extends Brand<any>>(): Constructor<A>;
138
  /**
139
- * Returns a `Constructor` that can construct a branded type from an
140
- * unbranded value using the provided `filter` predicate as validation of
141
- * the input data.
 
142
  *
143
- * If you don't want to perform any validation but only distinguish between two
144
- * values of the same type but with different meanings, see {@link nominal}.
 
145
  *
146
  * @category constructors
147
- * @since 2.0.0
148
  */
149
  export declare function make<A extends Brand<any>>(filter: (unbranded: Brand.Unbranded<A>) => Schema.FilterOutput): Constructor<A>;
150
  /**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
151
  * @since 4.0.0
152
  */
153
  export declare function check<A extends Brand<any>>(...checks: readonly [
154
- AST.Check<Brand.Unbranded<A>>,
155
- ...Array<AST.Check<Brand.Unbranded<A>>>
156
  ]): Constructor<A>;
157
  /**
158
- * Combines two or more brands together to form a single branded type. This API
159
- * is useful when you want to validate that the input data passes multiple brand
160
- * validators.
 
 
 
 
 
 
 
 
 
161
  *
162
  * @category combining
163
  * @since 2.0.0
 
1
  import * as Option from "./Option.ts";
2
  import * as Result from "./Result.ts";
3
  import type * as Schema from "./Schema.ts";
4
+ import * as SchemaAST from "./SchemaAST.ts";
5
+ import type * as SchemaIssue from "./SchemaIssue.ts";
6
  import type * as Types from "./Types.ts";
7
  declare const TypeId = "~effect/Brand";
8
  /**
9
  * A generic interface that defines a branded type.
10
  *
11
+ * **When to use**
12
+ *
13
+ * Use to define a branded type such as `number & Brand<"Positive">` when
14
+ * TypeScript should keep structurally identical values separate without
15
+ * changing their runtime value.
16
+ *
17
+ * @see {@link Branded} for applying a brand key to a base type
18
+ * @see {@link Constructor} for validating or constructing branded values
19
+ *
20
  * @category models
21
+ * @since 2.0.0
22
  */
23
  export interface Brand<in out Keys extends string> {
24
  readonly [TypeId]: {
 
29
  * A constructor for a branded type that provides validation and safe
30
  * construction methods.
31
  *
32
+ * **When to use**
33
+ *
34
+ * Use as the shared callable interface for branded values when an API accepts
35
+ * or returns a brand constructor and callers need throwing, `Option`, `Result`,
36
+ * or type-guard validation forms.
37
+ *
38
+ * @see {@link nominal} for a constructor without runtime validation
39
+ * @see {@link make} for creating a constructor from a validation predicate
40
+ * @see {@link check} for creating a constructor from schema checks
41
+ * @see {@link all} for combining brand constructors
42
+ *
43
  * @category models
44
  * @since 2.0.0
45
  */
 
67
  is(unbranded: Brand.Unbranded<B>): unbranded is Brand.Unbranded<B> & B;
68
  }
69
  /**
70
+ * Error returned when a branded type is constructed from an invalid value.
 
71
  *
72
+ * **Details**
73
+ *
74
+ * The error wraps a `SchemaIssue.Issue`, exposes `message` through
75
+ * `issue.toString()`, and formats as `BrandError(<message>)`.
76
+ *
77
+ * **Gotchas**
78
+ *
79
+ * `BrandError` is an error-like model with `_tag`, `name`, `message`, and
80
+ * `toString`; it does not extend JavaScript `Error`.
81
+ *
82
+ * @category errors
83
  * @since 4.0.0
84
  */
85
  export declare class BrandError {
86
+ constructor(issue: SchemaIssue.Issue);
87
  /**
88
+ * Discriminant used to identify brand construction failures.
89
+ *
90
  * @since 4.0.0
91
  */
92
  readonly _tag = "BrandError";
93
  /**
94
+ * Error name used by tools that inspect JavaScript error-like objects.
95
+ *
96
  * @since 4.0.0
97
  */
98
  readonly name: string;
99
  /**
100
+ * Schema issue describing why brand validation failed.
101
+ *
102
  * @since 4.0.0
103
  */
104
+ readonly issue: SchemaIssue.Issue;
105
  /**
106
+ * Human-readable rendering of the validation issue.
107
+ *
108
  * @since 4.0.0
109
  */
110
  get message(): string;
111
  /**
112
+ * Formats the brand error together with its validation message.
113
+ *
114
  * @since 4.0.0
115
  */
116
  toString(): string;
117
  }
118
  /**
119
+ * Namespace containing type-level helpers for working with branded types and
120
+ * brand constructors.
121
+ *
122
  * @since 2.0.0
123
  */
124
  export declare namespace Brand {
125
  /**
126
  * A utility type to extract a branded type from a `Constructor`.
127
  *
128
+ * @category utility types
129
  * @since 2.0.0
130
  */
131
  type FromConstructor<C> = C extends Constructor<infer B> ? B : never;
132
  /**
133
  * A utility type to extract the unbranded value type from a brand.
134
  *
135
+ * @category utility types
136
  * @since 2.0.0
137
  */
138
  type Unbranded<B extends Brand<any>> = B extends infer U & Brands<B> ? U : B;
139
  /**
140
  * A utility type to extract the keys of a branded type.
141
  *
142
+ * @category utility types
143
+ * @since 4.0.0
144
  */
145
  type Keys<B extends Brand<any>> = keyof B[typeof TypeId];
146
  /**
147
  * A utility type to extract the brands from a branded type.
148
  *
149
+ * @category utility types
150
  * @since 2.0.0
151
  */
152
  type Brands<B extends Brand<any>> = Types.UnionToIntersection<{
 
155
  /**
156
  * A utility type that checks that all brands have the same base type.
157
  *
158
+ * @category utility types
159
  * @since 2.0.0
160
  */
161
  type EnsureCommonBase<Brands extends readonly [Constructor<any>, ...Array<Constructor<any>>]> = {
 
165
  /**
166
  * A type alias for creating branded types more concisely.
167
  *
168
+ * @category utility types
169
  * @since 2.0.0
170
  */
171
  export type Branded<A, Key extends string> = A & Brand<Key>;
172
  /**
173
+ * Returns a `Constructor` that **does not apply any runtime checks** and just
174
+ * returns the provided value.
175
+ *
176
+ * **When to use**
177
  *
178
+ * Use to create nominal types that allow distinguishing between two values
179
+ * of the same type but with different meanings.
180
+ *
181
+ * @see {@link make} for constructing branded values with validation.
182
+ * @see {@link check} for constructing branded values from schema checks.
183
  *
184
  * @category constructors
185
  * @since 2.0.0
186
  */
187
  export declare function nominal<A extends Brand<any>>(): Constructor<A>;
188
  /**
189
+ * Returns a `Constructor` that can construct a branded type from an unbranded
190
+ * value using the provided `filter` predicate as validation of the input data.
191
+ *
192
+ * **When to use**
193
  *
194
+ * Use when you want validation while constructing the branded type.
195
+ *
196
+ * @see {@link nominal} for a brand constructor that performs no validation.
197
  *
198
  * @category constructors
199
+ * @since 4.0.0
200
  */
201
  export declare function make<A extends Brand<any>>(filter: (unbranded: Brand.Unbranded<A>) => Schema.FilterOutput): Constructor<A>;
202
  /**
203
+ * Creates a branded type `Constructor` from one or more schema checks.
204
+ *
205
+ * **When to use**
206
+ *
207
+ * Use when you need a branded type constructor that performs runtime validation
208
+ * via schema checks.
209
+ *
210
+ * **Details**
211
+ *
212
+ * Calling the returned constructor validates the unbranded value and throws on
213
+ * failure. Use the returned `option`, `result`, or `is` methods for
214
+ * non-throwing validation.
215
+ *
216
+ * @see {@link nominal} for a brand constructor without runtime validation
217
+ * @see {@link all} for combining multiple brand constructors
218
+ * @category constructors
219
  * @since 4.0.0
220
  */
221
  export declare function check<A extends Brand<any>>(...checks: readonly [
222
+ SchemaAST.Check<Brand.Unbranded<A>>,
223
+ ...Array<SchemaAST.Check<Brand.Unbranded<A>>>
224
  ]): Constructor<A>;
225
  /**
226
+ * Combines one or more brand constructors to form a single branded type.
227
+ *
228
+ * **When to use**
229
+ *
230
+ * Use to require an input to satisfy every runtime check collected by the
231
+ * provided brand constructors.
232
+ *
233
+ * **Details**
234
+ *
235
+ * If the provided constructors contain runtime checks, the combined
236
+ * constructor succeeds only when all checks pass. If no runtime checks are
237
+ * present, it behaves as a nominal constructor.
238
  *
239
  * @category combining
240
  * @since 2.0.0
.opencode/node_modules/effect/dist/Brand.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Brand.d.ts","sourceRoot":"","sources":["../src/Brand.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,KAAK,MAAM,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAA;AACrC,OAAO,KAAK,KAAK,KAAK,MAAM,kBAAkB,CAAA;AAC9C,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAA;AAExC,QAAA,MAAM,MAAM,kBAAkB,CAAA;AAE9B;;;;;GAKG;AACH,MAAM,WAAW,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,SAAS,MAAM;IAC/C,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE;QACjB,QAAQ,EAAE,CAAC,IAAI,IAAI,GAAG,IAAI;KAC3B,CAAA;CACF;AAED;;;;;;GAMG;AACH,MAAM,WAAW,WAAW,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC;IACtD;;;OAGG;IACH,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS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C,GACxC,WAAW,CACZ,KAAK,CAAC,mBAAmB,CAAC;KAAG,CAAC,IAAI,MAAM,MAAM,GAAG,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC,MAAM,CAAC,CAAC,SAC1F,MAAM,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAC9C,CAKA"}
.opencode/node_modules/effect/dist/Brand.js CHANGED
@@ -1,20 +1,31 @@
1
  /**
2
- * This module provides types and utility functions to create and work with
3
- * branded types, which are TypeScript types with an added type tag to prevent
4
- * accidental usage of a value in the wrong context.
 
 
5
  *
6
  * @since 2.0.0
7
  */
8
  import * as Arr from "./Array.js";
9
  import * as Option from "./Option.js";
10
  import * as Result from "./Result.js";
11
- import * as AST from "./SchemaAST.js";
12
  const TypeId = "~effect/Brand";
13
  /**
14
- * A `BrandError` is returned when a branded type is constructed from an invalid
15
- * value.
16
  *
17
- * @category models
 
 
 
 
 
 
 
 
 
 
18
  * @since 4.0.0
19
  */
20
  export class BrandError {
@@ -22,24 +33,34 @@ export class BrandError {
22
  this.issue = issue;
23
  }
24
  /**
 
 
25
  * @since 4.0.0
26
  */
27
  _tag = "BrandError";
28
  /**
 
 
29
  * @since 4.0.0
30
  */
31
  name = "BrandError";
32
  /**
 
 
33
  * @since 4.0.0
34
  */
35
  issue;
36
  /**
 
 
37
  * @since 4.0.0
38
  */
39
  get message() {
40
  return this.issue.toString();
41
  }
42
  /**
 
 
43
  * @since 4.0.0
44
  */
45
  toString() {
@@ -47,13 +68,16 @@ export class BrandError {
47
  }
48
  }
49
  /**
50
- * This function returns a `Constructor` that **does not apply any runtime
51
- * checks**, it just returns the provided value. It can be used to create
52
- * nominal types that allow distinguishing between two values of the same type
53
- * but with different meanings.
54
  *
55
- * If you also want to perform some validation, see {@link make} or
56
- * {@link check} or {@link refine}.
 
 
 
57
  *
58
  * @category constructors
59
  * @since 2.0.0
@@ -66,25 +90,43 @@ export function nominal() {
66
  });
67
  }
68
  /**
69
- * Returns a `Constructor` that can construct a branded type from an
70
- * unbranded value using the provided `filter` predicate as validation of
71
- * the input data.
 
 
 
72
  *
73
- * If you don't want to perform any validation but only distinguish between two
74
- * values of the same type but with different meanings, see {@link nominal}.
75
  *
76
  * @category constructors
77
- * @since 2.0.0
78
  */
79
  export function make(filter) {
80
- return check(AST.makeFilter(filter));
81
  }
82
  /**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  * @since 4.0.0
84
  */
85
  export function check(...checks) {
86
  const result = input => {
87
- return Result.mapError(AST.runChecks(checks, input), issue => new BrandError(issue));
88
  };
89
  return Object.assign(input => Result.getOrThrow(result(input)), {
90
  option: input => Option.getSuccess(result(input)),
@@ -94,9 +136,18 @@ export function check(...checks) {
94
  });
95
  }
96
  /**
97
- * Combines two or more brands together to form a single branded type. This API
98
- * is useful when you want to validate that the input data passes multiple brand
99
- * validators.
 
 
 
 
 
 
 
 
 
100
  *
101
  * @category combining
102
  * @since 2.0.0
 
1
  /**
2
+ * The `Brand` module adds compile-time names to ordinary TypeScript values so
3
+ * structurally identical values cannot be mixed accidentally. A branded value
4
+ * has the same runtime representation as its unbranded value; the extra
5
+ * information lives in the type system unless you choose a validating
6
+ * constructor.
7
  *
8
  * @since 2.0.0
9
  */
10
  import * as Arr from "./Array.js";
11
  import * as Option from "./Option.js";
12
  import * as Result from "./Result.js";
13
+ import * as SchemaAST from "./SchemaAST.js";
14
  const TypeId = "~effect/Brand";
15
  /**
16
+ * Error returned when a branded type is constructed from an invalid value.
 
17
  *
18
+ * **Details**
19
+ *
20
+ * The error wraps a `SchemaIssue.Issue`, exposes `message` through
21
+ * `issue.toString()`, and formats as `BrandError(<message>)`.
22
+ *
23
+ * **Gotchas**
24
+ *
25
+ * `BrandError` is an error-like model with `_tag`, `name`, `message`, and
26
+ * `toString`; it does not extend JavaScript `Error`.
27
+ *
28
+ * @category errors
29
  * @since 4.0.0
30
  */
31
  export class BrandError {
 
33
  this.issue = issue;
34
  }
35
  /**
36
+ * Discriminant used to identify brand construction failures.
37
+ *
38
  * @since 4.0.0
39
  */
40
  _tag = "BrandError";
41
  /**
42
+ * Error name used by tools that inspect JavaScript error-like objects.
43
+ *
44
  * @since 4.0.0
45
  */
46
  name = "BrandError";
47
  /**
48
+ * Schema issue describing why brand validation failed.
49
+ *
50
  * @since 4.0.0
51
  */
52
  issue;
53
  /**
54
+ * Human-readable rendering of the validation issue.
55
+ *
56
  * @since 4.0.0
57
  */
58
  get message() {
59
  return this.issue.toString();
60
  }
61
  /**
62
+ * Formats the brand error together with its validation message.
63
+ *
64
  * @since 4.0.0
65
  */
66
  toString() {
 
68
  }
69
  }
70
  /**
71
+ * Returns a `Constructor` that **does not apply any runtime checks** and just
72
+ * returns the provided value.
73
+ *
74
+ * **When to use**
75
  *
76
+ * Use to create nominal types that allow distinguishing between two values
77
+ * of the same type but with different meanings.
78
+ *
79
+ * @see {@link make} for constructing branded values with validation.
80
+ * @see {@link check} for constructing branded values from schema checks.
81
  *
82
  * @category constructors
83
  * @since 2.0.0
 
90
  });
91
  }
92
  /**
93
+ * Returns a `Constructor` that can construct a branded type from an unbranded
94
+ * value using the provided `filter` predicate as validation of the input data.
95
+ *
96
+ * **When to use**
97
+ *
98
+ * Use when you want validation while constructing the branded type.
99
  *
100
+ * @see {@link nominal} for a brand constructor that performs no validation.
 
101
  *
102
  * @category constructors
103
+ * @since 4.0.0
104
  */
105
  export function make(filter) {
106
+ return check(SchemaAST.makeFilter(filter));
107
  }
108
  /**
109
+ * Creates a branded type `Constructor` from one or more schema checks.
110
+ *
111
+ * **When to use**
112
+ *
113
+ * Use when you need a branded type constructor that performs runtime validation
114
+ * via schema checks.
115
+ *
116
+ * **Details**
117
+ *
118
+ * Calling the returned constructor validates the unbranded value and throws on
119
+ * failure. Use the returned `option`, `result`, or `is` methods for
120
+ * non-throwing validation.
121
+ *
122
+ * @see {@link nominal} for a brand constructor without runtime validation
123
+ * @see {@link all} for combining multiple brand constructors
124
+ * @category constructors
125
  * @since 4.0.0
126
  */
127
  export function check(...checks) {
128
  const result = input => {
129
+ return Result.mapError(SchemaAST.runChecks(checks, input), issue => new BrandError(issue));
130
  };
131
  return Object.assign(input => Result.getOrThrow(result(input)), {
132
  option: input => Option.getSuccess(result(input)),
 
136
  });
137
  }
138
  /**
139
+ * Combines one or more brand constructors to form a single branded type.
140
+ *
141
+ * **When to use**
142
+ *
143
+ * Use to require an input to satisfy every runtime check collected by the
144
+ * provided brand constructors.
145
+ *
146
+ * **Details**
147
+ *
148
+ * If the provided constructors contain runtime checks, the combined
149
+ * constructor succeeds only when all checks pass. If no runtime checks are
150
+ * present, it behaves as a nominal constructor.
151
  *
152
  * @category combining
153
  * @since 2.0.0
.opencode/node_modules/effect/dist/Brand.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Brand.js","names":["Arr","Option","Result","AST","TypeId","BrandError","constructor","issue","_tag","name","message","toString","nominal","Object","assign","input","option","some","result","succeed","is","_","make","filter","check","makeFilter","checks","mapError","runChecks","getOrThrow","getSuccess","isSuccess","all","brands","flatMap","brand","isArrayNonEmpty"],"sources":["../src/Brand.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;AAOA,OAAO,KAAKA,GAAG,MAAM,YAAY;AACjC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,MAAM,MAAM,aAAa;AAErC,OAAO,KAAKC,GAAG,MAAM,gBAAgB;AAIrC,MAAMC,MAAM,GAAG,eAAe;AAoD9B;;;;;;;AAOA,OAAM,MAAOC,UAAU;EACrBC,YAAYC,KAAkB;IAC5B,IAAI,CAACA,KAAK,GAAGA,KAAK;EACpB;EACA;;;EAGSC,IAAI,GAAG,YAAY;EAC5B;;;EAGSC,IAAI,GAAW,YAAY;EACpC;;;EAGSF,KAAK;EACd;;;EAGA,IAAIG,OAAOA,CAAA;IACT,OAAO,IAAI,CAACH,KAAK,CAACI,QAAQ,EAA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C,OAAO,CAAEC,KAAK,IAAKA,KAAK,CAACT,MAAM,IAAI,EAAE,CAAC;EAC5D,OAAO1B,GAAG,CAACoC,eAAe,CAACV,MAAM,CAAC,GAChCF,KAAK,CAAC,GAAGE,MAAM,CAAC,GAChBd,OAAO,EAAE;AACb","ignoreList":[]}
 
1
+ {"version":3,"file":"Brand.js","names":["Arr","Option","Result","SchemaAST","TypeId","BrandError","constructor","issue","_tag","name","message","toString","nominal","Object","assign","input","option","some","result","succeed","is","_","make","filter","check","makeFilter","checks","mapError","runChecks","getOrThrow","getSuccess","isSuccess","all","brands","flatMap","brand","isArrayNonEmpty"],"sources":["../src/Brand.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;AASA,OAAO,KAAKA,GAAG,MAAM,YAAY;AACjC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,OAAO,KAAKC,MAAM,MAAM,aAAa;AAErC,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAI3C,MAAMC,MAAM,GAAG,eAAe;AAwE9B;;;;;;;;;;;;;;;;AAgBA,OAAM,MAAOC,UAAU;EACrBC,YAAYC,KAAwB;IAClC,IAAI,CAACA,KAAK,GAAGA,KAAK;EACpB;EACA;;;;;EAKSC,IAAI,GAAG,YAAY;EAC5B;;;;;EAKSC,IAAI,GAAW,YAAY;EACpC;;;;;EAKSF,KAAK;EACd;;;;;EAKA,IAAIG,OAAOA,CAAA;IACT,OAAO,IAAI,CAACH,KAAK,CAACI,QAAQ,EAAE;EAC9B;EACA;;;;;EAKAA,QAAQA,CAAA;IACN,OAAO,cAAc,IAAI,CAACD,OAAO,GAAG;EACtC;;AAsEF;;;;;;;;;;;;;;;AAeA,OAAM,SAAUE,OAAOA,CAAA;EACrB,OAAOC,MAAM,CAACC,MAAM,CAAEC,KAAyB,IAAKA,KAAU,EAAE;IAC9DC,MAAM,EAAGD,KAAyB,IAAKd,MAAM,CAACgB,IAAI,CAACF,KAAU,CAAC;IAC9DG,MAAM,EAAGH,KA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ache";
11
  * A cache interface that provides a mutable key-value store with automatic TTL management,
12
  * capacity limits, and lookup functions for cache misses.
13
  *
14
- * @example
 
15
  * ```ts
16
  * import { Cache, Effect } from "effect"
17
  *
@@ -31,7 +32,8 @@ declare const TypeId = "~effect/Cache";
31
  * })
32
  * ```
33
  *
34
- * @example
 
35
  * ```ts
36
  * import { Cache, Effect } from "effect"
37
  *
@@ -53,7 +55,8 @@ declare const TypeId = "~effect/Cache";
53
  * })
54
  * ```
55
  *
56
- * @example
 
57
  * ```ts
58
  * import { Cache, Data, Duration, Effect } from "effect"
59
  *
@@ -74,8 +77,8 @@ declare const TypeId = "~effect/Cache";
74
  * })
75
  * ```
76
  *
77
- * @since 4.0.0
78
- * @category Models
79
  */
80
  export interface Cache<in out Key, in out A, in out E = never, out R = never> extends Pipeable {
81
  readonly [TypeId]: typeof TypeId;
@@ -85,11 +88,23 @@ export interface Cache<in out Key, in out A, in out E = never, out R = never> ex
85
  readonly timeToLive: (exit: Exit.Exit<A, E>, key: Key) => Duration.Duration;
86
  }
87
  /**
88
- * Represents a cache entry containing a deferred value and optional expiration time.
89
- * This is used internally by the cache implementation to track cached values and their lifetimes.
 
 
 
 
 
 
 
90
  *
 
 
 
 
 
 
91
  * @since 4.0.0
92
- * @category Models
93
  */
94
  export interface Entry<A, E> {
95
  expiresAt: number | undefined;
@@ -98,10 +113,18 @@ export interface Entry<A, E> {
98
  /**
99
  * Creates a cache with dynamic time-to-live based on the result and key.
100
  *
 
 
 
 
 
 
 
101
  * The timeToLive function receives both the exit result and the key, allowing
102
  * for flexible TTL policies based on success/failure state and key characteristics.
103
  *
104
- * @example
 
105
  * ```ts
106
  * import { Cache, Effect, Exit } from "effect"
107
  *
@@ -125,8 +148,9 @@ export interface Entry<A, E> {
125
  * })
126
  * ```
127
  *
128
- * @since 4.0.0
129
- * @category Constructors
 
130
  */
131
  export declare const makeWith: <Key, A, E = never, R = never, ServiceMode extends "lookup" | "construction" = never>(lookup: (key: Key) => Effect.Effect<A, E, R>, options: {
132
  readonly capacity: number;
@@ -136,10 +160,13 @@ export declare const makeWith: <Key, A, E = never, R = never, ServiceMode extend
136
  /**
137
  * Creates a cache with a fixed time-to-live for all entries.
138
  *
 
 
139
  * This is the basic cache constructor where all entries share the same TTL.
140
  * The lookup function will be called when a key is not found or has expired.
141
  *
142
- * @example
 
143
  * ```ts
144
  * import { Cache, Effect } from "effect"
145
  *
@@ -156,12 +183,17 @@ export declare const makeWith: <Key, A, E = never, R = never, ServiceMode extend
156
  * })
157
  * ```
158
  *
159
- * @example
 
160
  * ```ts
161
  * import { Cache, Effect } from "effect"
162
  *
163
- * // Cache with TTL and async lookup
164
- * const fetchUserCache = Effect.gen(function*() {
 
 
 
 
165
  * const cache = yield* Cache.make<
166
  * number,
167
  * { name: string; email: string },
@@ -169,22 +201,25 @@ export declare const makeWith: <Key, A, E = never, R = never, ServiceMode extend
169
  * >({
170
  * capacity: 500,
171
  * lookup: (userId) =>
172
- * Effect.tryPromise({
173
- * try: () => fetch(`/api/users/${userId}`).then((r) => r.json()),
174
- * catch: () => "Failed to fetch user"
 
 
175
  * }),
176
  * timeToLive: "15 minutes"
177
  * })
178
  *
179
- * // First call fetches from API, second call returns cached result
180
  * const user1 = yield* Cache.get(cache, 123)
181
- * const user2 = yield* Cache.get(cache, 123) // From cache
182
- * return { user1, user2 }
 
 
183
  * })
184
  * ```
185
  *
186
- * @since 4.0.0
187
- * @category Constructors
188
  */
189
  export declare const make: <Key, A, E = never, R = never, ServiceMode extends "lookup" | "construction" = never>(options: {
190
  readonly lookup: (key: Key) => Effect.Effect<A, E, R>;
@@ -193,12 +228,17 @@ export declare const make: <Key, A, E = never, R = never, ServiceMode extends "l
193
  readonly requireServicesAt?: ServiceMode | undefined;
194
  }) => Effect.Effect<Cache<Key, A, E, "lookup" extends ServiceMode ? R : never>, never, "lookup" extends ServiceMode ? never : R>;
195
  /**
196
- * Retrieves the value associated with the specified key from the cache.
 
197
  *
198
- * If the key is not present or has expired, it will invoke the lookup function
199
- * to construct the value, store it in the cache, and return it.
 
 
 
 
 
200
  *
201
- * @example
202
  * ```ts
203
  * import { Cache, Effect } from "effect"
204
  *
@@ -220,7 +260,8 @@ export declare const make: <Key, A, E = never, R = never, ServiceMode extends "l
220
  * })
221
  * ```
222
  *
223
- * @example
 
224
  * ```ts
225
  * import { Cache, Effect } from "effect"
226
  *
@@ -244,7 +285,8 @@ export declare const make: <Key, A, E = never, R = never, ServiceMode extends "l
244
  * })
245
  * ```
246
  *
247
- * @example
 
248
  * ```ts
249
  * import { Cache, Effect } from "effect"
250
  *
@@ -272,17 +314,22 @@ export declare const make: <Key, A, E = never, R = never, ServiceMode extends "l
272
  * })
273
  * ```
274
  *
 
275
  * @since 4.0.0
276
- * @category Combinators
277
  */
278
  export declare const get: {
279
  /**
280
- * Retrieves the value associated with the specified key from the cache.
 
281
  *
282
- * If the key is not present or has expired, it will invoke the lookup function
283
- * to construct the value, store it in the cache, and return it.
 
 
 
 
 
284
  *
285
- * @example
286
  * ```ts
287
  * import { Cache, Effect } from "effect"
288
  *
@@ -304,7 +351,8 @@ export declare const get: {
304
  * })
305
  * ```
306
  *
307
- * @example
 
308
  * ```ts
309
  * import { Cache, Effect } from "effect"
310
  *
@@ -328,7 +376,8 @@ export declare const get: {
328
  * })
329
  * ```
330
  *
331
- * @example
 
332
  * ```ts
333
  * import { Cache, Effect } from "effect"
334
  *
@@ -356,17 +405,22 @@ export declare const get: {
356
  * })
357
  * ```
358
  *
 
359
  * @since 4.0.0
360
- * @category Combinators
361
  */
362
  <Key, A>(key: Key): <E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<A, E, R>;
363
  /**
364
- * Retrieves the value associated with the specified key from the cache.
 
 
 
365
  *
366
- * If the key is not present or has expired, it will invoke the lookup function
367
- * to construct the value, store it in the cache, and return it.
 
 
 
368
  *
369
- * @example
370
  * ```ts
371
  * import { Cache, Effect } from "effect"
372
  *
@@ -388,7 +442,8 @@ export declare const get: {
388
  * })
389
  * ```
390
  *
391
- * @example
 
392
  * ```ts
393
  * import { Cache, Effect } from "effect"
394
  *
@@ -412,7 +467,8 @@ export declare const get: {
412
  * })
413
  * ```
414
  *
415
- * @example
 
416
  * ```ts
417
  * import { Cache, Effect } from "effect"
418
  *
@@ -440,20 +496,23 @@ export declare const get: {
440
  * })
441
  * ```
442
  *
 
443
  * @since 4.0.0
444
- * @category Combinators
445
  */
446
  <Key, A, E, R>(self: Cache<Key, A, E, R>, key: Key): Effect.Effect<A, E, R>;
447
  };
448
  /**
449
- * Retrieves the value associated with the specified key from the cache,
450
- * returning an `Option` that is `Some` if the key exists and has not expired,
451
- * or `None` if the key does not exist or has expired.
 
 
 
 
 
452
  *
453
- * Unlike `get`, this function will not invoke the lookup function if the key
454
- * is missing or expired.
455
  *
456
- * @example
457
  * ```ts
458
  * import { Cache, Effect } from "effect"
459
  *
@@ -478,7 +537,8 @@ export declare const get: {
478
  * })
479
  * ```
480
  *
481
- * @example
 
482
  * ```ts
483
  * import { Cache, Effect } from "effect"
484
  * import { TestClock } from "effect/testing"
@@ -507,7 +567,8 @@ export declare const get: {
507
  * })
508
  * ```
509
  *
510
- * @example
 
511
  * ```ts
512
  * import { Cache, Deferred, Effect, Fiber } from "effect"
513
  *
@@ -530,22 +591,28 @@ export declare const get: {
530
  *
531
  * const result = yield* Fiber.join(optionFiber)
532
  * console.log(result) // Option.some(42)
 
 
 
533
  * })
534
  * ```
535
  *
 
536
  * @since 4.0.0
537
- * @category Combinators
538
  */
539
  export declare const getOption: {
540
  /**
541
- * Retrieves the value associated with the specified key from the cache,
542
- * returning an `Option` that is `Some` if the key exists and has not expired,
543
- * or `None` if the key does not exist or has expired.
544
  *
545
- * Unlike `get`, this function will not invoke the lookup function if the key
546
- * is missing or expired.
 
 
 
 
547
  *
548
- * @example
549
  * ```ts
550
  * import { Cache, Effect } from "effect"
551
  *
@@ -570,7 +637,8 @@ export declare const getOption: {
570
  * })
571
  * ```
572
  *
573
- * @example
 
574
  * ```ts
575
  * import { Cache, Effect } from "effect"
576
  * import { TestClock } from "effect/testing"
@@ -599,7 +667,8 @@ export declare const getOption: {
599
  * })
600
  * ```
601
  *
602
- * @example
 
603
  * ```ts
604
  * import { Cache, Deferred, Effect, Fiber } from "effect"
605
  *
@@ -622,22 +691,28 @@ export declare const getOption: {
622
  *
623
  * const result = yield* Fiber.join(optionFiber)
624
  * console.log(result) // Option.some(42)
 
 
 
625
  * })
626
  * ```
627
  *
 
628
  * @since 4.0.0
629
- * @category Combinators
630
  */
631
  <Key, A>(key: Key): <E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<Option.Option<A>, E>;
632
  /**
633
- * Retrieves the value associated with the specified key from the cache,
634
- * returning an `Option` that is `Some` if the key exists and has not expired,
635
- * or `None` if the key does not exist or has expired.
636
  *
637
- * Unlike `get`, this function will not invoke the lookup function if the key
638
- * is missing or expired.
 
 
 
 
639
  *
640
- * @example
641
  * ```ts
642
  * import { Cache, Effect } from "effect"
643
  *
@@ -662,7 +737,8 @@ export declare const getOption: {
662
  * })
663
  * ```
664
  *
665
- * @example
 
666
  * ```ts
667
  * import { Cache, Effect } from "effect"
668
  * import { TestClock } from "effect/testing"
@@ -691,7 +767,8 @@ export declare const getOption: {
691
  * })
692
  * ```
693
  *
694
- * @example
 
695
  * ```ts
696
  * import { Cache, Deferred, Effect, Fiber } from "effect"
697
  *
@@ -714,11 +791,14 @@ export declare const getOption: {
714
  *
715
  * const result = yield* Fiber.join(optionFiber)
716
  * console.log(result) // Option.some(42)
 
 
 
717
  * })
718
  * ```
719
  *
 
720
  * @since 4.0.0
721
- * @category Combinators
722
  */
723
  <Key, A, E, R>(self: Cache<Key, A, E, R>, key: Key): Effect.Effect<Option.Option<A>, E>;
724
  };
@@ -726,24 +806,51 @@ export declare const getOption: {
726
  * Retrieves the value associated with the specified key from the cache, only if
727
  * it contains a resolved successful value.
728
  *
 
 
 
 
 
 
 
 
 
 
729
  * @since 4.0.0
730
- * @category Combinators
731
  */
732
  export declare const getSuccess: {
733
  /**
734
  * Retrieves the value associated with the specified key from the cache, only if
735
  * it contains a resolved successful value.
736
  *
 
 
 
 
 
 
 
 
 
 
737
  * @since 4.0.0
738
- * @category Combinators
739
  */
740
  <Key, A, R>(key: Key): <E>(self: Cache<Key, A, E, R>) => Effect.Effect<Option.Option<A>>;
741
  /**
742
  * Retrieves the value associated with the specified key from the cache, only if
743
  * it contains a resolved successful value.
744
  *
 
 
 
 
 
 
 
 
 
 
745
  * @since 4.0.0
746
- * @category Combinators
747
  */
748
  <Key, A, E, R>(self: Cache<Key, A, E, R>, key: Key): Effect.Effect<Option.Option<A>>;
749
  };
@@ -751,7 +858,8 @@ export declare const getSuccess: {
751
  * Sets the value associated with the specified key in the cache. This will
752
  * overwrite any existing value for that key, skipping the lookup function.
753
  *
754
- * @example
 
755
  * ```ts
756
  * import { Cache, Effect } from "effect"
757
  *
@@ -768,7 +876,8 @@ export declare const getSuccess: {
768
  * })
769
  * ```
770
  *
771
- * @example
 
772
  * ```ts
773
  * import { Cache, Effect } from "effect"
774
  *
@@ -790,7 +899,8 @@ export declare const getSuccess: {
790
  * })
791
  * ```
792
  *
793
- * @example
 
794
  * ```ts
795
  * import { Cache, Effect } from "effect"
796
  * import { TestClock } from "effect/testing"
@@ -813,7 +923,8 @@ export declare const getSuccess: {
813
  * })
814
  * ```
815
  *
816
- * @example
 
817
  * ```ts
818
  * import { Cache, Effect } from "effect"
819
  *
@@ -837,15 +948,16 @@ export declare const getSuccess: {
837
  * })
838
  * ```
839
  *
 
840
  * @since 4.0.0
841
- * @category Combinators
842
  */
843
  export declare const set: {
844
  /**
845
  * Sets the value associated with the specified key in the cache. This will
846
  * overwrite any existing value for that key, skipping the lookup function.
847
  *
848
- * @example
 
849
  * ```ts
850
  * import { Cache, Effect } from "effect"
851
  *
@@ -862,7 +974,8 @@ export declare const set: {
862
  * })
863
  * ```
864
  *
865
- * @example
 
866
  * ```ts
867
  * import { Cache, Effect } from "effect"
868
  *
@@ -884,7 +997,8 @@ export declare const set: {
884
  * })
885
  * ```
886
  *
887
- * @example
 
888
  * ```ts
889
  * import { Cache, Effect } from "effect"
890
  * import { TestClock } from "effect/testing"
@@ -907,7 +1021,8 @@ export declare const set: {
907
  * })
908
  * ```
909
  *
910
- * @example
 
911
  * ```ts
912
  * import { Cache, Effect } from "effect"
913
  *
@@ -931,15 +1046,16 @@ export declare const set: {
931
  * })
932
  * ```
933
  *
 
934
  * @since 4.0.0
935
- * @category Combinators
936
  */
937
  <Key, A>(key: Key, value: A): <E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<void>;
938
  /**
939
  * Sets the value associated with the specified key in the cache. This will
940
  * overwrite any existing value for that key, skipping the lookup function.
941
  *
942
- * @example
 
943
  * ```ts
944
  * import { Cache, Effect } from "effect"
945
  *
@@ -956,7 +1072,8 @@ export declare const set: {
956
  * })
957
  * ```
958
  *
959
- * @example
 
960
  * ```ts
961
  * import { Cache, Effect } from "effect"
962
  *
@@ -978,7 +1095,8 @@ export declare const set: {
978
  * })
979
  * ```
980
  *
981
- * @example
 
982
  * ```ts
983
  * import { Cache, Effect } from "effect"
984
  * import { TestClock } from "effect/testing"
@@ -1001,7 +1119,8 @@ export declare const set: {
1001
  * })
1002
  * ```
1003
  *
1004
- * @example
 
1005
  * ```ts
1006
  * import { Cache, Effect } from "effect"
1007
  *
@@ -1025,15 +1144,21 @@ export declare const set: {
1025
  * })
1026
  * ```
1027
  *
 
1028
  * @since 4.0.0
1029
- * @category Combinators
1030
  */
1031
  <Key, A, E, R>(self: Cache<Key, A, E, R>, key: Key, value: A): Effect.Effect<void>;
1032
  };
1033
  /**
1034
- * Checks if the cache contains an entry for the specified key.
 
 
 
 
 
 
 
1035
  *
1036
- * @example
1037
  * ```ts
1038
  * import { Cache, Effect } from "effect"
1039
  *
@@ -1052,7 +1177,8 @@ export declare const set: {
1052
  * })
1053
  * ```
1054
  *
1055
- * @example
 
1056
  * ```ts
1057
  * import { Cache, Effect } from "effect"
1058
  * import { TestClock } from "effect/testing"
@@ -1079,7 +1205,8 @@ export declare const set: {
1079
  * })
1080
  * ```
1081
  *
1082
- * @example
 
1083
  * ```ts
1084
  * import { Cache, Effect } from "effect"
1085
  *
@@ -1108,14 +1235,20 @@ export declare const set: {
1108
  * })
1109
  * ```
1110
  *
 
1111
  * @since 4.0.0
1112
- * @category Combinators
1113
  */
1114
  export declare const has: {
1115
  /**
1116
- * Checks if the cache contains an entry for the specified key.
 
 
 
 
 
 
 
1117
  *
1118
- * @example
1119
  * ```ts
1120
  * import { Cache, Effect } from "effect"
1121
  *
@@ -1134,7 +1267,8 @@ export declare const has: {
1134
  * })
1135
  * ```
1136
  *
1137
- * @example
 
1138
  * ```ts
1139
  * import { Cache, Effect } from "effect"
1140
  * import { TestClock } from "effect/testing"
@@ -1161,7 +1295,8 @@ export declare const has: {
1161
  * })
1162
  * ```
1163
  *
1164
- * @example
 
1165
  * ```ts
1166
  * import { Cache, Effect } from "effect"
1167
  *
@@ -1190,14 +1325,20 @@ export declare const has: {
1190
  * })
1191
  * ```
1192
  *
 
1193
  * @since 4.0.0
1194
- * @category Combinators
1195
  */
1196
  <Key, A>(key: Key): <E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<boolean>;
1197
  /**
1198
- * Checks if the cache contains an entry for the specified key.
 
 
 
 
 
 
 
1199
  *
1200
- * @example
1201
  * ```ts
1202
  * import { Cache, Effect } from "effect"
1203
  *
@@ -1216,7 +1357,8 @@ export declare const has: {
1216
  * })
1217
  * ```
1218
  *
1219
- * @example
 
1220
  * ```ts
1221
  * import { Cache, Effect } from "effect"
1222
  * import { TestClock } from "effect/testing"
@@ -1243,7 +1385,8 @@ export declare const has: {
1243
  * })
1244
  * ```
1245
  *
1246
- * @example
 
1247
  * ```ts
1248
  * import { Cache, Effect } from "effect"
1249
  *
@@ -1272,15 +1415,16 @@ export declare const has: {
1272
  * })
1273
  * ```
1274
  *
 
1275
  * @since 4.0.0
1276
- * @category Combinators
1277
  */
1278
  <Key, A, E, R>(self: Cache<Key, A, E, R>, key: Key): Effect.Effect<boolean>;
1279
  };
1280
  /**
1281
  * Invalidates the entry associated with the specified key in the cache.
1282
  *
1283
- * @example
 
1284
  * ```ts
1285
  * import { Cache, Effect } from "effect"
1286
  *
@@ -1318,14 +1462,15 @@ export declare const has: {
1318
  * })
1319
  * ```
1320
  *
 
1321
  * @since 4.0.0
1322
- * @category Combinators
1323
  */
1324
  export declare const invalidate: {
1325
  /**
1326
  * Invalidates the entry associated with the specified key in the cache.
1327
  *
1328
- * @example
 
1329
  * ```ts
1330
  * import { Cache, Effect } from "effect"
1331
  *
@@ -1363,14 +1508,15 @@ export declare const invalidate: {
1363
  * })
1364
  * ```
1365
  *
 
1366
  * @since 4.0.0
1367
- * @category Combinators
1368
  */
1369
  <Key, A>(key: Key): <E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<void>;
1370
  /**
1371
  * Invalidates the entry associated with the specified key in the cache.
1372
  *
1373
- * @example
 
1374
  * ```ts
1375
  * import { Cache, Effect } from "effect"
1376
  *
@@ -1408,16 +1554,17 @@ export declare const invalidate: {
1408
  * })
1409
  * ```
1410
  *
 
1411
  * @since 4.0.0
1412
- * @category Combinators
1413
  */
1414
  <Key, A, E, R>(self: Cache<Key, A, E, R>, key: Key): Effect.Effect<void>;
1415
  };
1416
  /**
1417
- * Conditionally invalidates the entry associated with the specified key in the cache
1418
- * if the predicate returns true for the cached value.
 
 
1419
  *
1420
- * @example
1421
  * ```ts
1422
  * import { Cache, Effect } from "effect"
1423
  *
@@ -1474,15 +1621,16 @@ export declare const invalidate: {
1474
  * })
1475
  * ```
1476
  *
 
1477
  * @since 4.0.0
1478
- * @category Combinators
1479
  */
1480
  export declare const invalidateWhen: {
1481
  /**
1482
- * Conditionally invalidates the entry associated with the specified key in the cache
1483
- * if the predicate returns true for the cached value.
 
 
1484
  *
1485
- * @example
1486
  * ```ts
1487
  * import { Cache, Effect } from "effect"
1488
  *
@@ -1539,15 +1687,16 @@ export declare const invalidateWhen: {
1539
  * })
1540
  * ```
1541
  *
 
1542
  * @since 4.0.0
1543
- * @category Combinators
1544
  */
1545
  <Key, A>(key: Key, f: Predicate<A>): <E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<boolean>;
1546
  /**
1547
- * Conditionally invalidates the entry associated with the specified key in the cache
1548
- * if the predicate returns true for the cached value.
 
 
1549
  *
1550
- * @example
1551
  * ```ts
1552
  * import { Cache, Effect } from "effect"
1553
  *
@@ -1604,18 +1753,21 @@ export declare const invalidateWhen: {
1604
  * })
1605
  * ```
1606
  *
 
1607
  * @since 4.0.0
1608
- * @category Combinators
1609
  */
1610
  <Key, A, E, R>(self: Cache<Key, A, E, R>, key: Key, f: Predicate<A>): Effect.Effect<boolean>;
1611
  };
1612
  /**
1613
  * Forces a refresh of the value associated with the specified key in the cache.
1614
  *
 
 
1615
  * It will always invoke the lookup function to construct a new value,
1616
  * overwriting any existing value for that key.
1617
  *
1618
- * @example
 
1619
  * ```ts
1620
  * import { Cache, Effect } from "effect"
1621
  *
@@ -1645,7 +1797,8 @@ export declare const invalidateWhen: {
1645
  * })
1646
  * ```
1647
  *
1648
- * @example
 
1649
  * ```ts
1650
  * import { Cache, Effect } from "effect"
1651
  * import { TestClock } from "effect/testing"
@@ -1673,7 +1826,8 @@ export declare const invalidateWhen: {
1673
  * })
1674
  * ```
1675
  *
1676
- * @example
 
1677
  * ```ts
1678
  * import { Cache, Effect } from "effect"
1679
  *
@@ -1693,17 +1847,20 @@ export declare const invalidateWhen: {
1693
  * })
1694
  * ```
1695
  *
 
1696
  * @since 4.0.0
1697
- * @category Combinators
1698
  */
1699
  export declare const refresh: {
1700
  /**
1701
  * Forces a refresh of the value associated with the specified key in the cache.
1702
  *
 
 
1703
  * It will always invoke the lookup function to construct a new value,
1704
  * overwriting any existing value for that key.
1705
  *
1706
- * @example
 
1707
  * ```ts
1708
  * import { Cache, Effect } from "effect"
1709
  *
@@ -1733,7 +1890,8 @@ export declare const refresh: {
1733
  * })
1734
  * ```
1735
  *
1736
- * @example
 
1737
  * ```ts
1738
  * import { Cache, Effect } from "effect"
1739
  * import { TestClock } from "effect/testing"
@@ -1761,7 +1919,8 @@ export declare const refresh: {
1761
  * })
1762
  * ```
1763
  *
1764
- * @example
 
1765
  * ```ts
1766
  * import { Cache, Effect } from "effect"
1767
  *
@@ -1781,17 +1940,20 @@ export declare const refresh: {
1781
  * })
1782
  * ```
1783
  *
 
1784
  * @since 4.0.0
1785
- * @category Combinators
1786
  */
1787
  <Key, A>(key: Key): <E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<A, E, R>;
1788
  /**
1789
  * Forces a refresh of the value associated with the specified key in the cache.
1790
  *
 
 
1791
  * It will always invoke the lookup function to construct a new value,
1792
  * overwriting any existing value for that key.
1793
  *
1794
- * @example
 
1795
  * ```ts
1796
  * import { Cache, Effect } from "effect"
1797
  *
@@ -1821,7 +1983,8 @@ export declare const refresh: {
1821
  * })
1822
  * ```
1823
  *
1824
- * @example
 
1825
  * ```ts
1826
  * import { Cache, Effect } from "effect"
1827
  * import { TestClock } from "effect/testing"
@@ -1849,7 +2012,8 @@ export declare const refresh: {
1849
  * })
1850
  * ```
1851
  *
1852
- * @example
 
1853
  * ```ts
1854
  * import { Cache, Effect } from "effect"
1855
  *
@@ -1869,15 +2033,16 @@ export declare const refresh: {
1869
  * })
1870
  * ```
1871
  *
 
1872
  * @since 4.0.0
1873
- * @category Combinators
1874
  */
1875
  <Key, A, E, R>(self: Cache<Key, A, E, R>, key: Key): Effect.Effect<A, E, R>;
1876
  };
1877
  /**
1878
  * Invalidates all entries in the cache.
1879
  *
1880
- * @example
 
1881
  * ```ts
1882
  * import { Cache, Effect } from "effect"
1883
  *
@@ -1907,18 +2072,21 @@ export declare const refresh: {
1907
  * })
1908
  * ```
1909
  *
 
1910
  * @since 4.0.0
1911
- * @category Combinators
1912
  */
1913
  export declare const invalidateAll: <Key, A, E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<void>;
1914
  /**
1915
  * Retrieves the approximate number of entries in the cache.
1916
  *
 
 
1917
  * Note that expired entries are counted until they are accessed and removed.
1918
  * The size reflects the current number of entries stored, not the number
1919
  * of valid entries.
1920
  *
1921
- * @example
 
1922
  * ```ts
1923
  * import { Cache, Effect } from "effect"
1924
  *
@@ -1945,14 +2113,15 @@ export declare const invalidateAll: <Key, A, E, R>(self: Cache<Key, A, E, R>) =>
1945
  * })
1946
  * ```
1947
  *
 
1948
  * @since 4.0.0
1949
- * @category Combinators
1950
  */
1951
  export declare const size: <Key, A, E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<number>;
1952
  /**
1953
  * Retrieves all active keys from the cache, automatically filtering out expired entries.
1954
  *
1955
- * @example
 
1956
  * ```ts
1957
  * import { Cache, Effect } from "effect"
1958
  *
@@ -1971,19 +2140,20 @@ export declare const size: <Key, A, E, R>(self: Cache<Key, A, E, R>) => Effect.E
1971
  * // Retrieve all active keys
1972
  * const keys = yield* Cache.keys(cache)
1973
  *
1974
- * console.log(Array.from(keys)) // ["hello", "world", "cache"]
1975
  * })
1976
  * ```
1977
  *
 
1978
  * @since 4.0.0
1979
- * @category Combinators
1980
  */
1981
  export declare const keys: <Key, A, E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<Iterable<Key>>;
1982
  /**
1983
  * Retrieves all successfully cached values from the cache, excluding failed
1984
  * lookups and expired entries.
1985
  *
1986
- * @example
 
1987
  * ```ts
1988
  * import { Cache, Effect } from "effect"
1989
  *
@@ -2006,8 +2176,8 @@ export declare const keys: <Key, A, E, R>(self: Cache<Key, A, E, R>) => Effect.E
2006
  * })
2007
  * ```
2008
  *
 
2009
  * @since 4.0.0
2010
- * @category Combinators
2011
  */
2012
  export declare const values: <Key, A, E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<Iterable<A>>;
2013
  /**
@@ -2015,8 +2185,15 @@ export declare const values: <Key, A, E, R>(self: Cache<Key, A, E, R>) => Effect
2015
  * only returns entries with successfully resolved values, filtering out any
2016
  * failed lookups or expired entries.
2017
  *
 
 
 
 
 
 
 
 
2018
  * @since 4.0.0
2019
- * @category Combinators
2020
  */
2021
  export declare const entries: <Key, A, E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<Iterable<[Key, A]>>;
2022
  export {};
 
11
  * A cache interface that provides a mutable key-value store with automatic TTL management,
12
  * capacity limits, and lookup functions for cache misses.
13
  *
14
+ * **Example** (Creating a basic cache)
15
+ *
16
  * ```ts
17
  * import { Cache, Effect } from "effect"
18
  *
 
32
  * })
33
  * ```
34
  *
35
+ * **Example** (Handling lookup failures)
36
+ *
37
  * ```ts
38
  * import { Cache, Effect } from "effect"
39
  *
 
55
  * })
56
  * ```
57
  *
58
+ * **Example** (Using complex keys with TTL)
59
+ *
60
  * ```ts
61
  * import { Cache, Data, Duration, Effect } from "effect"
62
  *
 
77
  * })
78
  * ```
79
  *
80
+ * @category models
81
+ * @since 2.0.0
82
  */
83
  export interface Cache<in out Key, in out A, in out E = never, out R = never> extends Pipeable {
84
  readonly [TypeId]: typeof TypeId;
 
88
  readonly timeToLive: (exit: Exit.Exit<A, E>, key: Key) => Duration.Duration;
89
  }
90
  /**
91
+ * Represents a low-level cache entry containing a deferred lookup result and
92
+ * an optional expiration timestamp.
93
+ *
94
+ * **When to use**
95
+ *
96
+ * Use when inspecting a `Cache`'s low-level map and you need the stored
97
+ * deferred lookup result or expiration timestamp for a key.
98
+ *
99
+ * **Details**
100
  *
101
+ * An `expiresAt` value of `undefined` means the entry does not expire.
102
+ *
103
+ * @see {@link Cache} for the public cache API that manages entries through
104
+ * combinators
105
+ *
106
+ * @category models
107
  * @since 4.0.0
 
108
  */
109
  export interface Entry<A, E> {
110
  expiresAt: number | undefined;
 
113
  /**
114
  * Creates a cache with dynamic time-to-live based on the result and key.
115
  *
116
+ * **When to use**
117
+ *
118
+ * Use when you need different cache entry lifetimes based on the lookup result
119
+ * or key characteristics.
120
+ *
121
+ * **Details**
122
+ *
123
  * The timeToLive function receives both the exit result and the key, allowing
124
  * for flexible TTL policies based on success/failure state and key characteristics.
125
  *
126
+ * **Example** (Using dynamic time to live)
127
+ *
128
  * ```ts
129
  * import { Cache, Effect, Exit } from "effect"
130
  *
 
148
  * })
149
  * ```
150
  *
151
+ * @see {@link make} for a simpler cache constructor with a fixed time-to-live for all entries
152
+ * @category constructors
153
+ * @since 2.0.0
154
  */
155
  export declare const makeWith: <Key, A, E = never, R = never, ServiceMode extends "lookup" | "construction" = never>(lookup: (key: Key) => Effect.Effect<A, E, R>, options: {
156
  readonly capacity: number;
 
160
  /**
161
  * Creates a cache with a fixed time-to-live for all entries.
162
  *
163
+ * **Details**
164
+ *
165
  * This is the basic cache constructor where all entries share the same TTL.
166
  * The lookup function will be called when a key is not found or has expired.
167
  *
168
+ * **Example** (Creating a basic cache)
169
+ *
170
  * ```ts
171
  * import { Cache, Effect } from "effect"
172
  *
 
183
  * })
184
  * ```
185
  *
186
+ * **Example** (Creating a cache with TTL)
187
+ *
188
  * ```ts
189
  * import { Cache, Effect } from "effect"
190
  *
191
+ * const program = Effect.gen(function*() {
192
+ * const users = new Map([
193
+ * [123, { name: "Ada", email: "ada@example.com" }],
194
+ * [456, { name: "Grace", email: "grace@example.com" }]
195
+ * ])
196
+ *
197
  * const cache = yield* Cache.make<
198
  * number,
199
  * { name: string; email: string },
 
201
  * >({
202
  * capacity: 500,
203
  * lookup: (userId) =>
204
+ * Effect.suspend(() => {
205
+ * const user = users.get(userId)
206
+ * return user === undefined
207
+ * ? Effect.fail(`User ${userId} not found`)
208
+ * : Effect.succeed(user)
209
  * }),
210
  * timeToLive: "15 minutes"
211
  * })
212
  *
 
213
  * const user1 = yield* Cache.get(cache, 123)
214
+ * console.log(user1) // { name: "Ada", email: "ada@example.com" }
215
+ *
216
+ * const user2 = yield* Cache.get(cache, 123)
217
+ * console.log(user2) // { name: "Ada", email: "ada@example.com" }
218
  * })
219
  * ```
220
  *
221
+ * @category constructors
222
+ * @since 2.0.0
223
  */
224
  export declare const make: <Key, A, E = never, R = never, ServiceMode extends "lookup" | "construction" = never>(options: {
225
  readonly lookup: (key: Key) => Effect.Effect<A, E, R>;
 
228
  readonly requireServicesAt?: ServiceMode | undefined;
229
  }) => Effect.Effect<Cache<Key, A, E, "lookup" extends ServiceMode ? R : never>, never, "lookup" extends ServiceMode ? never : R>;
230
  /**
231
+ * Retrieves the value for a key, invoking the lookup function on a cache miss
232
+ * or expired entry.
233
  *
234
+ * **Details**
235
+ *
236
+ * Concurrent `get` calls for the same missing key share the same pending
237
+ * lookup. The cache stores the lookup `Exit`, so failed lookups are cached and
238
+ * will fail again until the entry expires, is invalidated, or is refreshed.
239
+ *
240
+ * **Example** (Getting cached values)
241
  *
 
242
  * ```ts
243
  * import { Cache, Effect } from "effect"
244
  *
 
260
  * })
261
  * ```
262
  *
263
+ * **Example** (Handling lookup failures)
264
+ *
265
  * ```ts
266
  * import { Cache, Effect } from "effect"
267
  *
 
285
  * })
286
  * ```
287
  *
288
+ * **Example** (Sharing concurrent lookups)
289
+ *
290
  * ```ts
291
  * import { Cache, Effect } from "effect"
292
  *
 
314
  * })
315
  * ```
316
  *
317
+ * @category combinators
318
  * @since 4.0.0
 
319
  */
320
  export declare const get: {
321
  /**
322
+ * Retrieves the value for a key, invoking the lookup function on a cache miss
323
+ * or expired entry.
324
  *
325
+ * **Details**
326
+ *
327
+ * Concurrent `get` calls for the same missing key share the same pending
328
+ * lookup. The cache stores the lookup `Exit`, so failed lookups are cached and
329
+ * will fail again until the entry expires, is invalidated, or is refreshed.
330
+ *
331
+ * **Example** (Getting cached values)
332
  *
 
333
  * ```ts
334
  * import { Cache, Effect } from "effect"
335
  *
 
351
  * })
352
  * ```
353
  *
354
+ * **Example** (Handling lookup failures)
355
+ *
356
  * ```ts
357
  * import { Cache, Effect } from "effect"
358
  *
 
376
  * })
377
  * ```
378
  *
379
+ * **Example** (Sharing concurrent lookups)
380
+ *
381
  * ```ts
382
  * import { Cache, Effect } from "effect"
383
  *
 
405
  * })
406
  * ```
407
  *
408
+ * @category combinators
409
  * @since 4.0.0
 
410
  */
411
  <Key, A>(key: Key): <E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<A, E, R>;
412
  /**
413
+ * Retrieves the value for a key, invoking the lookup function on a cache miss
414
+ * or expired entry.
415
+ *
416
+ * **Details**
417
  *
418
+ * Concurrent `get` calls for the same missing key share the same pending
419
+ * lookup. The cache stores the lookup `Exit`, so failed lookups are cached and
420
+ * will fail again until the entry expires, is invalidated, or is refreshed.
421
+ *
422
+ * **Example** (Getting cached values)
423
  *
 
424
  * ```ts
425
  * import { Cache, Effect } from "effect"
426
  *
 
442
  * })
443
  * ```
444
  *
445
+ * **Example** (Handling lookup failures)
446
+ *
447
  * ```ts
448
  * import { Cache, Effect } from "effect"
449
  *
 
467
  * })
468
  * ```
469
  *
470
+ * **Example** (Sharing concurrent lookups)
471
+ *
472
  * ```ts
473
  * import { Cache, Effect } from "effect"
474
  *
 
496
  * })
497
  * ```
498
  *
499
+ * @category combinators
500
  * @since 4.0.0
 
501
  */
502
  <Key, A, E, R>(self: Cache<Key, A, E, R>, key: Key): Effect.Effect<A, E, R>;
503
  };
504
  /**
505
+ * Reads an existing cache entry without invoking the lookup function.
506
+ *
507
+ * **Details**
508
+ *
509
+ * Returns `Option.none()` when the key is missing or expired, and `Option.some`
510
+ * when a cached lookup has succeeded. If the entry is still pending, waits for
511
+ * it to complete. If the cached or pending lookup fails, this effect fails with
512
+ * the same error.
513
  *
514
+ * **Example** (Reading cached values without lookup)
 
515
  *
 
516
  * ```ts
517
  * import { Cache, Effect } from "effect"
518
  *
 
537
  * })
538
  * ```
539
  *
540
+ * **Example** (Skipping expired entries)
541
+ *
542
  * ```ts
543
  * import { Cache, Effect } from "effect"
544
  * import { TestClock } from "effect/testing"
 
567
  * })
568
  * ```
569
  *
570
+ * **Example** (Waiting for pending lookups)
571
+ *
572
  * ```ts
573
  * import { Cache, Deferred, Effect, Fiber } from "effect"
574
  *
 
591
  *
592
  * const result = yield* Fiber.join(optionFiber)
593
  * console.log(result) // Option.some(42)
594
+ *
595
+ * const value = yield* Fiber.join(getFiber)
596
+ * console.log(value) // 42
597
  * })
598
  * ```
599
  *
600
+ * @category combinators
601
  * @since 4.0.0
 
602
  */
603
  export declare const getOption: {
604
  /**
605
+ * Reads an existing cache entry without invoking the lookup function.
606
+ *
607
+ * **Details**
608
  *
609
+ * Returns `Option.none()` when the key is missing or expired, and `Option.some`
610
+ * when a cached lookup has succeeded. If the entry is still pending, waits for
611
+ * it to complete. If the cached or pending lookup fails, this effect fails with
612
+ * the same error.
613
+ *
614
+ * **Example** (Reading cached values without lookup)
615
  *
 
616
  * ```ts
617
  * import { Cache, Effect } from "effect"
618
  *
 
637
  * })
638
  * ```
639
  *
640
+ * **Example** (Skipping expired entries)
641
+ *
642
  * ```ts
643
  * import { Cache, Effect } from "effect"
644
  * import { TestClock } from "effect/testing"
 
667
  * })
668
  * ```
669
  *
670
+ * **Example** (Waiting for pending lookups)
671
+ *
672
  * ```ts
673
  * import { Cache, Deferred, Effect, Fiber } from "effect"
674
  *
 
691
  *
692
  * const result = yield* Fiber.join(optionFiber)
693
  * console.log(result) // Option.some(42)
694
+ *
695
+ * const value = yield* Fiber.join(getFiber)
696
+ * console.log(value) // 42
697
  * })
698
  * ```
699
  *
700
+ * @category combinators
701
  * @since 4.0.0
 
702
  */
703
  <Key, A>(key: Key): <E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<Option.Option<A>, E>;
704
  /**
705
+ * Reads an existing cache entry without invoking the lookup function.
706
+ *
707
+ * **Details**
708
  *
709
+ * Returns `Option.none()` when the key is missing or expired, and `Option.some`
710
+ * when a cached lookup has succeeded. If the entry is still pending, waits for
711
+ * it to complete. If the cached or pending lookup fails, this effect fails with
712
+ * the same error.
713
+ *
714
+ * **Example** (Reading cached values without lookup)
715
  *
 
716
  * ```ts
717
  * import { Cache, Effect } from "effect"
718
  *
 
737
  * })
738
  * ```
739
  *
740
+ * **Example** (Skipping expired entries)
741
+ *
742
  * ```ts
743
  * import { Cache, Effect } from "effect"
744
  * import { TestClock } from "effect/testing"
 
767
  * })
768
  * ```
769
  *
770
+ * **Example** (Waiting for pending lookups)
771
+ *
772
  * ```ts
773
  * import { Cache, Deferred, Effect, Fiber } from "effect"
774
  *
 
791
  *
792
  * const result = yield* Fiber.join(optionFiber)
793
  * console.log(result) // Option.some(42)
794
+ *
795
+ * const value = yield* Fiber.join(getFiber)
796
+ * console.log(value) // 42
797
  * })
798
  * ```
799
  *
800
+ * @category combinators
801
  * @since 4.0.0
 
802
  */
803
  <Key, A, E, R>(self: Cache<Key, A, E, R>, key: Key): Effect.Effect<Option.Option<A>, E>;
804
  };
 
806
  * Retrieves the value associated with the specified key from the cache, only if
807
  * it contains a resolved successful value.
808
  *
809
+ * **Details**
810
+ *
811
+ * This checks only an existing non-expired entry. It returns `Option.some` when
812
+ * the entry has already resolved successfully, and `Option.none` for missing,
813
+ * expired, failed, or still-pending entries.
814
+ *
815
+ * @see {@link get} for triggering or awaiting the cache lookup
816
+ * @see {@link getOption} for reading an existing entry as an optional effect
817
+ *
818
+ * @category combinators
819
  * @since 4.0.0
 
820
  */
821
  export declare const getSuccess: {
822
  /**
823
  * Retrieves the value associated with the specified key from the cache, only if
824
  * it contains a resolved successful value.
825
  *
826
+ * **Details**
827
+ *
828
+ * This checks only an existing non-expired entry. It returns `Option.some` when
829
+ * the entry has already resolved successfully, and `Option.none` for missing,
830
+ * expired, failed, or still-pending entries.
831
+ *
832
+ * @see {@link get} for triggering or awaiting the cache lookup
833
+ * @see {@link getOption} for reading an existing entry as an optional effect
834
+ *
835
+ * @category combinators
836
  * @since 4.0.0
 
837
  */
838
  <Key, A, R>(key: Key): <E>(self: Cache<Key, A, E, R>) => Effect.Effect<Option.Option<A>>;
839
  /**
840
  * Retrieves the value associated with the specified key from the cache, only if
841
  * it contains a resolved successful value.
842
  *
843
+ * **Details**
844
+ *
845
+ * This checks only an existing non-expired entry. It returns `Option.some` when
846
+ * the entry has already resolved successfully, and `Option.none` for missing,
847
+ * expired, failed, or still-pending entries.
848
+ *
849
+ * @see {@link get} for triggering or awaiting the cache lookup
850
+ * @see {@link getOption} for reading an existing entry as an optional effect
851
+ *
852
+ * @category combinators
853
  * @since 4.0.0
 
854
  */
855
  <Key, A, E, R>(self: Cache<Key, A, E, R>, key: Key): Effect.Effect<Option.Option<A>>;
856
  };
 
858
  * Sets the value associated with the specified key in the cache. This will
859
  * overwrite any existing value for that key, skipping the lookup function.
860
  *
861
+ * **Example** (Setting values directly)
862
+ *
863
  * ```ts
864
  * import { Cache, Effect } from "effect"
865
  *
 
876
  * })
877
  * ```
878
  *
879
+ * **Example** (Overwriting cached values)
880
+ *
881
  * ```ts
882
  * import { Cache, Effect } from "effect"
883
  *
 
899
  * })
900
  * ```
901
  *
902
+ * **Example** (Applying TTL to set values)
903
+ *
904
  * ```ts
905
  * import { Cache, Effect } from "effect"
906
  * import { TestClock } from "effect/testing"
 
923
  * })
924
  * ```
925
  *
926
+ * **Example** (Enforcing capacity when setting values)
927
+ *
928
  * ```ts
929
  * import { Cache, Effect } from "effect"
930
  *
 
948
  * })
949
  * ```
950
  *
951
+ * @category combinators
952
  * @since 4.0.0
 
953
  */
954
  export declare const set: {
955
  /**
956
  * Sets the value associated with the specified key in the cache. This will
957
  * overwrite any existing value for that key, skipping the lookup function.
958
  *
959
+ * **Example** (Setting values directly)
960
+ *
961
  * ```ts
962
  * import { Cache, Effect } from "effect"
963
  *
 
974
  * })
975
  * ```
976
  *
977
+ * **Example** (Overwriting cached values)
978
+ *
979
  * ```ts
980
  * import { Cache, Effect } from "effect"
981
  *
 
997
  * })
998
  * ```
999
  *
1000
+ * **Example** (Applying TTL to set values)
1001
+ *
1002
  * ```ts
1003
  * import { Cache, Effect } from "effect"
1004
  * import { TestClock } from "effect/testing"
 
1021
  * })
1022
  * ```
1023
  *
1024
+ * **Example** (Enforcing capacity when setting values)
1025
+ *
1026
  * ```ts
1027
  * import { Cache, Effect } from "effect"
1028
  *
 
1046
  * })
1047
  * ```
1048
  *
1049
+ * @category combinators
1050
  * @since 4.0.0
 
1051
  */
1052
  <Key, A>(key: Key, value: A): <E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<void>;
1053
  /**
1054
  * Sets the value associated with the specified key in the cache. This will
1055
  * overwrite any existing value for that key, skipping the lookup function.
1056
  *
1057
+ * **Example** (Setting values directly)
1058
+ *
1059
  * ```ts
1060
  * import { Cache, Effect } from "effect"
1061
  *
 
1072
  * })
1073
  * ```
1074
  *
1075
+ * **Example** (Overwriting cached values)
1076
+ *
1077
  * ```ts
1078
  * import { Cache, Effect } from "effect"
1079
  *
 
1095
  * })
1096
  * ```
1097
  *
1098
+ * **Example** (Applying TTL to set values)
1099
+ *
1100
  * ```ts
1101
  * import { Cache, Effect } from "effect"
1102
  * import { TestClock } from "effect/testing"
 
1119
  * })
1120
  * ```
1121
  *
1122
+ * **Example** (Enforcing capacity when setting values)
1123
+ *
1124
  * ```ts
1125
  * import { Cache, Effect } from "effect"
1126
  *
 
1144
  * })
1145
  * ```
1146
  *
1147
+ * @category combinators
1148
  * @since 4.0.0
 
1149
  */
1150
  <Key, A, E, R>(self: Cache<Key, A, E, R>, key: Key, value: A): Effect.Effect<void>;
1151
  };
1152
  /**
1153
+ * Checks whether the cache contains an entry for the specified key.
1154
+ *
1155
+ * **Details**
1156
+ *
1157
+ * This checks for an existing non-expired entry without invoking the cache
1158
+ * lookup function. Expired entries are treated as absent.
1159
+ *
1160
+ * **Example** (Checking for cached keys)
1161
  *
 
1162
  * ```ts
1163
  * import { Cache, Effect } from "effect"
1164
  *
 
1177
  * })
1178
  * ```
1179
  *
1180
+ * **Example** (Checking TTL expiration)
1181
+ *
1182
  * ```ts
1183
  * import { Cache, Effect } from "effect"
1184
  * import { TestClock } from "effect/testing"
 
1205
  * })
1206
  * ```
1207
  *
1208
+ * **Example** (Checking multiple keys)
1209
+ *
1210
  * ```ts
1211
  * import { Cache, Effect } from "effect"
1212
  *
 
1235
  * })
1236
  * ```
1237
  *
1238
+ * @category combinators
1239
  * @since 4.0.0
 
1240
  */
1241
  export declare const has: {
1242
  /**
1243
+ * Checks whether the cache contains an entry for the specified key.
1244
+ *
1245
+ * **Details**
1246
+ *
1247
+ * This checks for an existing non-expired entry without invoking the cache
1248
+ * lookup function. Expired entries are treated as absent.
1249
+ *
1250
+ * **Example** (Checking for cached keys)
1251
  *
 
1252
  * ```ts
1253
  * import { Cache, Effect } from "effect"
1254
  *
 
1267
  * })
1268
  * ```
1269
  *
1270
+ * **Example** (Checking TTL expiration)
1271
+ *
1272
  * ```ts
1273
  * import { Cache, Effect } from "effect"
1274
  * import { TestClock } from "effect/testing"
 
1295
  * })
1296
  * ```
1297
  *
1298
+ * **Example** (Checking multiple keys)
1299
+ *
1300
  * ```ts
1301
  * import { Cache, Effect } from "effect"
1302
  *
 
1325
  * })
1326
  * ```
1327
  *
1328
+ * @category combinators
1329
  * @since 4.0.0
 
1330
  */
1331
  <Key, A>(key: Key): <E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<boolean>;
1332
  /**
1333
+ * Checks whether the cache contains an entry for the specified key.
1334
+ *
1335
+ * **Details**
1336
+ *
1337
+ * This checks for an existing non-expired entry without invoking the cache
1338
+ * lookup function. Expired entries are treated as absent.
1339
+ *
1340
+ * **Example** (Checking for cached keys)
1341
  *
 
1342
  * ```ts
1343
  * import { Cache, Effect } from "effect"
1344
  *
 
1357
  * })
1358
  * ```
1359
  *
1360
+ * **Example** (Checking TTL expiration)
1361
+ *
1362
  * ```ts
1363
  * import { Cache, Effect } from "effect"
1364
  * import { TestClock } from "effect/testing"
 
1385
  * })
1386
  * ```
1387
  *
1388
+ * **Example** (Checking multiple keys)
1389
+ *
1390
  * ```ts
1391
  * import { Cache, Effect } from "effect"
1392
  *
 
1415
  * })
1416
  * ```
1417
  *
1418
+ * @category combinators
1419
  * @since 4.0.0
 
1420
  */
1421
  <Key, A, E, R>(self: Cache<Key, A, E, R>, key: Key): Effect.Effect<boolean>;
1422
  };
1423
  /**
1424
  * Invalidates the entry associated with the specified key in the cache.
1425
  *
1426
+ * **Example** (Invalidating cached entries)
1427
+ *
1428
  * ```ts
1429
  * import { Cache, Effect } from "effect"
1430
  *
 
1462
  * })
1463
  * ```
1464
  *
1465
+ * @category combinators
1466
  * @since 4.0.0
 
1467
  */
1468
  export declare const invalidate: {
1469
  /**
1470
  * Invalidates the entry associated with the specified key in the cache.
1471
  *
1472
+ * **Example** (Invalidating cached entries)
1473
+ *
1474
  * ```ts
1475
  * import { Cache, Effect } from "effect"
1476
  *
 
1508
  * })
1509
  * ```
1510
  *
1511
+ * @category combinators
1512
  * @since 4.0.0
 
1513
  */
1514
  <Key, A>(key: Key): <E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<void>;
1515
  /**
1516
  * Invalidates the entry associated with the specified key in the cache.
1517
  *
1518
+ * **Example** (Invalidating cached entries)
1519
+ *
1520
  * ```ts
1521
  * import { Cache, Effect } from "effect"
1522
  *
 
1554
  * })
1555
  * ```
1556
  *
1557
+ * @category combinators
1558
  * @since 4.0.0
 
1559
  */
1560
  <Key, A, E, R>(self: Cache<Key, A, E, R>, key: Key): Effect.Effect<void>;
1561
  };
1562
  /**
1563
+ * Invalidates the entry associated with the specified key in the cache when the
1564
+ * predicate returns true for the cached value.
1565
+ *
1566
+ * **Example** (Invalidating entries conditionally)
1567
  *
 
1568
  * ```ts
1569
  * import { Cache, Effect } from "effect"
1570
  *
 
1621
  * })
1622
  * ```
1623
  *
1624
+ * @category combinators
1625
  * @since 4.0.0
 
1626
  */
1627
  export declare const invalidateWhen: {
1628
  /**
1629
+ * Invalidates the entry associated with the specified key in the cache when the
1630
+ * predicate returns true for the cached value.
1631
+ *
1632
+ * **Example** (Invalidating entries conditionally)
1633
  *
 
1634
  * ```ts
1635
  * import { Cache, Effect } from "effect"
1636
  *
 
1687
  * })
1688
  * ```
1689
  *
1690
+ * @category combinators
1691
  * @since 4.0.0
 
1692
  */
1693
  <Key, A>(key: Key, f: Predicate<A>): <E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<boolean>;
1694
  /**
1695
+ * Invalidates the entry associated with the specified key in the cache when the
1696
+ * predicate returns true for the cached value.
1697
+ *
1698
+ * **Example** (Invalidating entries conditionally)
1699
  *
 
1700
  * ```ts
1701
  * import { Cache, Effect } from "effect"
1702
  *
 
1753
  * })
1754
  * ```
1755
  *
1756
+ * @category combinators
1757
  * @since 4.0.0
 
1758
  */
1759
  <Key, A, E, R>(self: Cache<Key, A, E, R>, key: Key, f: Predicate<A>): Effect.Effect<boolean>;
1760
  };
1761
  /**
1762
  * Forces a refresh of the value associated with the specified key in the cache.
1763
  *
1764
+ * **Details**
1765
+ *
1766
  * It will always invoke the lookup function to construct a new value,
1767
  * overwriting any existing value for that key.
1768
  *
1769
+ * **Example** (Refreshing cached values)
1770
+ *
1771
  * ```ts
1772
  * import { Cache, Effect } from "effect"
1773
  *
 
1797
  * })
1798
  * ```
1799
  *
1800
+ * **Example** (Resetting TTL on refresh)
1801
+ *
1802
  * ```ts
1803
  * import { Cache, Effect } from "effect"
1804
  * import { TestClock } from "effect/testing"
 
1826
  * })
1827
  * ```
1828
  *
1829
+ * **Example** (Refreshing missing keys)
1830
+ *
1831
  * ```ts
1832
  * import { Cache, Effect } from "effect"
1833
  *
 
1847
  * })
1848
  * ```
1849
  *
1850
+ * @category combinators
1851
  * @since 4.0.0
 
1852
  */
1853
  export declare const refresh: {
1854
  /**
1855
  * Forces a refresh of the value associated with the specified key in the cache.
1856
  *
1857
+ * **Details**
1858
+ *
1859
  * It will always invoke the lookup function to construct a new value,
1860
  * overwriting any existing value for that key.
1861
  *
1862
+ * **Example** (Refreshing cached values)
1863
+ *
1864
  * ```ts
1865
  * import { Cache, Effect } from "effect"
1866
  *
 
1890
  * })
1891
  * ```
1892
  *
1893
+ * **Example** (Resetting TTL on refresh)
1894
+ *
1895
  * ```ts
1896
  * import { Cache, Effect } from "effect"
1897
  * import { TestClock } from "effect/testing"
 
1919
  * })
1920
  * ```
1921
  *
1922
+ * **Example** (Refreshing missing keys)
1923
+ *
1924
  * ```ts
1925
  * import { Cache, Effect } from "effect"
1926
  *
 
1940
  * })
1941
  * ```
1942
  *
1943
+ * @category combinators
1944
  * @since 4.0.0
 
1945
  */
1946
  <Key, A>(key: Key): <E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<A, E, R>;
1947
  /**
1948
  * Forces a refresh of the value associated with the specified key in the cache.
1949
  *
1950
+ * **Details**
1951
+ *
1952
  * It will always invoke the lookup function to construct a new value,
1953
  * overwriting any existing value for that key.
1954
  *
1955
+ * **Example** (Refreshing cached values)
1956
+ *
1957
  * ```ts
1958
  * import { Cache, Effect } from "effect"
1959
  *
 
1983
  * })
1984
  * ```
1985
  *
1986
+ * **Example** (Resetting TTL on refresh)
1987
+ *
1988
  * ```ts
1989
  * import { Cache, Effect } from "effect"
1990
  * import { TestClock } from "effect/testing"
 
2012
  * })
2013
  * ```
2014
  *
2015
+ * **Example** (Refreshing missing keys)
2016
+ *
2017
  * ```ts
2018
  * import { Cache, Effect } from "effect"
2019
  *
 
2033
  * })
2034
  * ```
2035
  *
2036
+ * @category combinators
2037
  * @since 4.0.0
 
2038
  */
2039
  <Key, A, E, R>(self: Cache<Key, A, E, R>, key: Key): Effect.Effect<A, E, R>;
2040
  };
2041
  /**
2042
  * Invalidates all entries in the cache.
2043
  *
2044
+ * **Example** (Invalidating all entries)
2045
+ *
2046
  * ```ts
2047
  * import { Cache, Effect } from "effect"
2048
  *
 
2072
  * })
2073
  * ```
2074
  *
2075
+ * @category combinators
2076
  * @since 4.0.0
 
2077
  */
2078
  export declare const invalidateAll: <Key, A, E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<void>;
2079
  /**
2080
  * Retrieves the approximate number of entries in the cache.
2081
  *
2082
+ * **Details**
2083
+ *
2084
  * Note that expired entries are counted until they are accessed and removed.
2085
  * The size reflects the current number of entries stored, not the number
2086
  * of valid entries.
2087
  *
2088
+ * **Example** (Reading cache size)
2089
+ *
2090
  * ```ts
2091
  * import { Cache, Effect } from "effect"
2092
  *
 
2113
  * })
2114
  * ```
2115
  *
2116
+ * @category combinators
2117
  * @since 4.0.0
 
2118
  */
2119
  export declare const size: <Key, A, E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<number>;
2120
  /**
2121
  * Retrieves all active keys from the cache, automatically filtering out expired entries.
2122
  *
2123
+ * **Example** (Reading active keys)
2124
+ *
2125
  * ```ts
2126
  * import { Cache, Effect } from "effect"
2127
  *
 
2140
  * // Retrieve all active keys
2141
  * const keys = yield* Cache.keys(cache)
2142
  *
2143
+ * console.log(Array.from(keys).sort()) // ["cache", "hello", "world"]
2144
  * })
2145
  * ```
2146
  *
2147
+ * @category combinators
2148
  * @since 4.0.0
 
2149
  */
2150
  export declare const keys: <Key, A, E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<Iterable<Key>>;
2151
  /**
2152
  * Retrieves all successfully cached values from the cache, excluding failed
2153
  * lookups and expired entries.
2154
  *
2155
+ * **Example** (Reading all cached values)
2156
+ *
2157
  * ```ts
2158
  * import { Cache, Effect } from "effect"
2159
  *
 
2176
  * })
2177
  * ```
2178
  *
2179
+ * @category combinators
2180
  * @since 4.0.0
 
2181
  */
2182
  export declare const values: <Key, A, E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<Iterable<A>>;
2183
  /**
 
2185
  * only returns entries with successfully resolved values, filtering out any
2186
  * failed lookups or expired entries.
2187
  *
2188
+ * **Gotchas**
2189
+ *
2190
+ * Expired entries are removed from the cache while `entries` filters them out.
2191
+ *
2192
+ * @see {@link keys} for retrieving only cached keys
2193
+ * @see {@link values} for retrieving only cached values
2194
+ *
2195
+ * @category combinators
2196
  * @since 4.0.0
 
2197
  */
2198
  export declare const entries: <Key, A, E, R>(self: Cache<Key, A, E, R>) => Effect.Effect<Iterable<[Key, A]>>;
2199
  export {};
.opencode/node_modules/effect/dist/Cache.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Cache.d.ts","sourceRoot":"","sources":["../src/Cache.ts"],"names":[],"mappings":"AAIA,O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EAAE,CAAC,EAAE,CAAC,CAAC,KAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAC3B,CAAA;AAE/D;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,OAAO,GAAI,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAa9F,CAAA"}
.opencode/node_modules/effect/dist/Cache.js CHANGED
@@ -1,4 +1,11 @@
1
  /**
 
 
 
 
 
 
 
2
  * @since 4.0.0
3
  */
4
  import * as Context from "./Context.js";
@@ -16,10 +23,18 @@ const TypeId = "~effect/Cache";
16
  /**
17
  * Creates a cache with dynamic time-to-live based on the result and key.
18
  *
 
 
 
 
 
 
 
19
  * The timeToLive function receives both the exit result and the key, allowing
20
  * for flexible TTL policies based on success/failure state and key characteristics.
21
  *
22
- * @example
 
23
  * ```ts
24
  * import { Cache, Effect, Exit } from "effect"
25
  *
@@ -43,8 +58,9 @@ const TypeId = "~effect/Cache";
43
  * })
44
  * ```
45
  *
46
- * @since 4.0.0
47
- * @category Constructors
 
48
  */
49
  export const makeWith = (lookup, options) => effect.contextWith(context => {
50
  const self = Object.create(Proto);
@@ -57,10 +73,13 @@ export const makeWith = (lookup, options) => effect.contextWith(context => {
57
  /**
58
  * Creates a cache with a fixed time-to-live for all entries.
59
  *
 
 
60
  * This is the basic cache constructor where all entries share the same TTL.
61
  * The lookup function will be called when a key is not found or has expired.
62
  *
63
- * @example
 
64
  * ```ts
65
  * import { Cache, Effect } from "effect"
66
  *
@@ -77,12 +96,17 @@ export const makeWith = (lookup, options) => effect.contextWith(context => {
77
  * })
78
  * ```
79
  *
80
- * @example
 
81
  * ```ts
82
  * import { Cache, Effect } from "effect"
83
  *
84
- * // Cache with TTL and async lookup
85
- * const fetchUserCache = Effect.gen(function*() {
 
 
 
 
86
  * const cache = yield* Cache.make<
87
  * number,
88
  * { name: string; email: string },
@@ -90,22 +114,25 @@ export const makeWith = (lookup, options) => effect.contextWith(context => {
90
  * >({
91
  * capacity: 500,
92
  * lookup: (userId) =>
93
- * Effect.tryPromise({
94
- * try: () => fetch(`/api/users/${userId}`).then((r) => r.json()),
95
- * catch: () => "Failed to fetch user"
 
 
96
  * }),
97
  * timeToLive: "15 minutes"
98
  * })
99
  *
100
- * // First call fetches from API, second call returns cached result
101
  * const user1 = yield* Cache.get(cache, 123)
102
- * const user2 = yield* Cache.get(cache, 123) // From cache
103
- * return { user1, user2 }
 
 
104
  * })
105
  * ```
106
  *
107
- * @since 4.0.0
108
- * @category Constructors
109
  */
110
  export const make = options => makeWith(options.lookup, {
111
  ...options,
@@ -124,12 +151,17 @@ const Proto = {
124
  };
125
  const defaultTimeToLive = (_, _key) => Duration.infinity;
126
  /**
127
- * Retrieves the value associated with the specified key from the cache.
 
 
 
 
 
 
 
128
  *
129
- * If the key is not present or has expired, it will invoke the lookup function
130
- * to construct the value, store it in the cache, and return it.
131
  *
132
- * @example
133
  * ```ts
134
  * import { Cache, Effect } from "effect"
135
  *
@@ -151,7 +183,8 @@ const defaultTimeToLive = (_, _key) => Duration.infinity;
151
  * })
152
  * ```
153
  *
154
- * @example
 
155
  * ```ts
156
  * import { Cache, Effect } from "effect"
157
  *
@@ -175,7 +208,8 @@ const defaultTimeToLive = (_, _key) => Duration.infinity;
175
  * })
176
  * ```
177
  *
178
- * @example
 
179
  * ```ts
180
  * import { Cache, Effect } from "effect"
181
  *
@@ -203,8 +237,8 @@ const defaultTimeToLive = (_, _key) => Duration.infinity;
203
  * })
204
  * ```
205
  *
 
206
  * @since 4.0.0
207
- * @category Combinators
208
  */
209
  export const get = /*#__PURE__*/dual(2, (self, key) => core.withFiber(fiber => {
210
  const oentry = MutableHashMap.get(self.map, key);
@@ -251,14 +285,17 @@ const checkCapacity = self => {
251
  }
252
  };
253
  /**
254
- * Retrieves the value associated with the specified key from the cache,
255
- * returning an `Option` that is `Some` if the key exists and has not expired,
256
- * or `None` if the key does not exist or has expired.
257
  *
258
- * Unlike `get`, this function will not invoke the lookup function if the key
259
- * is missing or expired.
 
 
 
 
260
  *
261
- * @example
262
  * ```ts
263
  * import { Cache, Effect } from "effect"
264
  *
@@ -283,7 +320,8 @@ const checkCapacity = self => {
283
  * })
284
  * ```
285
  *
286
- * @example
 
287
  * ```ts
288
  * import { Cache, Effect } from "effect"
289
  * import { TestClock } from "effect/testing"
@@ -312,7 +350,8 @@ const checkCapacity = self => {
312
  * })
313
  * ```
314
  *
315
- * @example
 
316
  * ```ts
317
  * import { Cache, Deferred, Effect, Fiber } from "effect"
318
  *
@@ -335,11 +374,14 @@ const checkCapacity = self => {
335
  *
336
  * const result = yield* Fiber.join(optionFiber)
337
  * console.log(result) // Option.some(42)
 
 
 
338
  * })
339
  * ```
340
  *
 
341
  * @since 4.0.0
342
- * @category Combinators
343
  */
344
  export const getOption = /*#__PURE__*/dual(2, (self, key) => core.withFiber(fiber => {
345
  const entry = getImpl(self, key, fiber);
@@ -362,8 +404,17 @@ const getImpl = (self, key, fiber, isRead = true) => {
362
  * Retrieves the value associated with the specified key from the cache, only if
363
  * it contains a resolved successful value.
364
  *
 
 
 
 
 
 
 
 
 
 
365
  * @since 4.0.0
366
- * @category Combinators
367
  */
368
  export const getSuccess = /*#__PURE__*/dual(2, (self, key) => core.withFiber(fiber => {
369
  const exit = getImpl(self, key, fiber)?.deferred.effect;
@@ -376,7 +427,8 @@ export const getSuccess = /*#__PURE__*/dual(2, (self, key) => core.withFiber(fib
376
  * Sets the value associated with the specified key in the cache. This will
377
  * overwrite any existing value for that key, skipping the lookup function.
378
  *
379
- * @example
 
380
  * ```ts
381
  * import { Cache, Effect } from "effect"
382
  *
@@ -393,7 +445,8 @@ export const getSuccess = /*#__PURE__*/dual(2, (self, key) => core.withFiber(fib
393
  * })
394
  * ```
395
  *
396
- * @example
 
397
  * ```ts
398
  * import { Cache, Effect } from "effect"
399
  *
@@ -415,7 +468,8 @@ export const getSuccess = /*#__PURE__*/dual(2, (self, key) => core.withFiber(fib
415
  * })
416
  * ```
417
  *
418
- * @example
 
419
  * ```ts
420
  * import { Cache, Effect } from "effect"
421
  * import { TestClock } from "effect/testing"
@@ -438,7 +492,8 @@ export const getSuccess = /*#__PURE__*/dual(2, (self, key) => core.withFiber(fib
438
  * })
439
  * ```
440
  *
441
- * @example
 
442
  * ```ts
443
  * import { Cache, Effect } from "effect"
444
  *
@@ -462,8 +517,8 @@ export const getSuccess = /*#__PURE__*/dual(2, (self, key) => core.withFiber(fib
462
  * })
463
  * ```
464
  *
 
465
  * @since 4.0.0
466
- * @category Combinators
467
  */
468
  export const set = /*#__PURE__*/dual(3, (self, key, value) => core.withFiber(fiber => {
469
  const exit = core.exitSucceed(value);
@@ -482,9 +537,15 @@ export const set = /*#__PURE__*/dual(3, (self, key, value) => core.withFiber(fib
482
  return effect.void;
483
  }));
484
  /**
485
- * Checks if the cache contains an entry for the specified key.
 
 
 
 
 
 
 
486
  *
487
- * @example
488
  * ```ts
489
  * import { Cache, Effect } from "effect"
490
  *
@@ -503,7 +564,8 @@ export const set = /*#__PURE__*/dual(3, (self, key, value) => core.withFiber(fib
503
  * })
504
  * ```
505
  *
506
- * @example
 
507
  * ```ts
508
  * import { Cache, Effect } from "effect"
509
  * import { TestClock } from "effect/testing"
@@ -530,7 +592,8 @@ export const set = /*#__PURE__*/dual(3, (self, key, value) => core.withFiber(fib
530
  * })
531
  * ```
532
  *
533
- * @example
 
534
  * ```ts
535
  * import { Cache, Effect } from "effect"
536
  *
@@ -559,8 +622,8 @@ export const set = /*#__PURE__*/dual(3, (self, key, value) => core.withFiber(fib
559
  * })
560
  * ```
561
  *
 
562
  * @since 4.0.0
563
- * @category Combinators
564
  */
565
  export const has = /*#__PURE__*/dual(2, (self, key) => core.withFiber(fiber => {
566
  const oentry = getImpl(self, key, fiber, false);
@@ -569,7 +632,8 @@ export const has = /*#__PURE__*/dual(2, (self, key) => core.withFiber(fiber => {
569
  /**
570
  * Invalidates the entry associated with the specified key in the cache.
571
  *
572
- * @example
 
573
  * ```ts
574
  * import { Cache, Effect } from "effect"
575
  *
@@ -607,17 +671,18 @@ export const has = /*#__PURE__*/dual(2, (self, key) => core.withFiber(fiber => {
607
  * })
608
  * ```
609
  *
 
610
  * @since 4.0.0
611
- * @category Combinators
612
  */
613
  export const invalidate = /*#__PURE__*/dual(2, (self, key) => effect.sync(() => {
614
  MutableHashMap.remove(self.map, key);
615
  }));
616
  /**
617
- * Conditionally invalidates the entry associated with the specified key in the cache
618
- * if the predicate returns true for the cached value.
 
 
619
  *
620
- * @example
621
  * ```ts
622
  * import { Cache, Effect } from "effect"
623
  *
@@ -674,8 +739,8 @@ export const invalidate = /*#__PURE__*/dual(2, (self, key) => effect.sync(() =>
674
  * })
675
  * ```
676
  *
 
677
  * @since 4.0.0
678
- * @category Combinators
679
  */
680
  export const invalidateWhen = /*#__PURE__*/dual(3, (self, key, f) => core.withFiber(fiber => {
681
  const oentry = getImpl(self, key, fiber, false);
@@ -693,10 +758,13 @@ export const invalidateWhen = /*#__PURE__*/dual(3, (self, key, f) => core.withFi
693
  /**
694
  * Forces a refresh of the value associated with the specified key in the cache.
695
  *
 
 
696
  * It will always invoke the lookup function to construct a new value,
697
  * overwriting any existing value for that key.
698
  *
699
- * @example
 
700
  * ```ts
701
  * import { Cache, Effect } from "effect"
702
  *
@@ -726,7 +794,8 @@ export const invalidateWhen = /*#__PURE__*/dual(3, (self, key, f) => core.withFi
726
  * })
727
  * ```
728
  *
729
- * @example
 
730
  * ```ts
731
  * import { Cache, Effect } from "effect"
732
  * import { TestClock } from "effect/testing"
@@ -754,7 +823,8 @@ export const invalidateWhen = /*#__PURE__*/dual(3, (self, key, f) => core.withFi
754
  * })
755
  * ```
756
  *
757
- * @example
 
758
  * ```ts
759
  * import { Cache, Effect } from "effect"
760
  *
@@ -774,8 +844,8 @@ export const invalidateWhen = /*#__PURE__*/dual(3, (self, key, f) => core.withFi
774
  * })
775
  * ```
776
  *
 
777
  * @since 4.0.0
778
- * @category Combinators
779
  */
780
  export const refresh = /*#__PURE__*/dual(2, (self, key) => core.withFiber(fiber => {
781
  const deferred = Deferred.makeUnsafe();
@@ -805,7 +875,8 @@ export const refresh = /*#__PURE__*/dual(2, (self, key) => core.withFiber(fiber
805
  /**
806
  * Invalidates all entries in the cache.
807
  *
808
- * @example
 
809
  * ```ts
810
  * import { Cache, Effect } from "effect"
811
  *
@@ -835,8 +906,8 @@ export const refresh = /*#__PURE__*/dual(2, (self, key) => core.withFiber(fiber
835
  * })
836
  * ```
837
  *
 
838
  * @since 4.0.0
839
- * @category Combinators
840
  */
841
  export const invalidateAll = self => effect.sync(() => {
842
  MutableHashMap.clear(self.map);
@@ -844,11 +915,14 @@ export const invalidateAll = self => effect.sync(() => {
844
  /**
845
  * Retrieves the approximate number of entries in the cache.
846
  *
 
 
847
  * Note that expired entries are counted until they are accessed and removed.
848
  * The size reflects the current number of entries stored, not the number
849
  * of valid entries.
850
  *
851
- * @example
 
852
  * ```ts
853
  * import { Cache, Effect } from "effect"
854
  *
@@ -875,14 +949,15 @@ export const invalidateAll = self => effect.sync(() => {
875
  * })
876
  * ```
877
  *
 
878
  * @since 4.0.0
879
- * @category Combinators
880
  */
881
  export const size = self => effect.sync(() => MutableHashMap.size(self.map));
882
  /**
883
  * Retrieves all active keys from the cache, automatically filtering out expired entries.
884
  *
885
- * @example
 
886
  * ```ts
887
  * import { Cache, Effect } from "effect"
888
  *
@@ -901,12 +976,12 @@ export const size = self => effect.sync(() => MutableHashMap.size(self.map));
901
  * // Retrieve all active keys
902
  * const keys = yield* Cache.keys(cache)
903
  *
904
- * console.log(Array.from(keys)) // ["hello", "world", "cache"]
905
  * })
906
  * ```
907
  *
 
908
  * @since 4.0.0
909
- * @category Combinators
910
  */
911
  export const keys = self => core.withFiber(fiber => {
912
  const now = fiber.getRef(effect.ClockRef).currentTimeMillisUnsafe();
@@ -922,7 +997,8 @@ export const keys = self => core.withFiber(fiber => {
922
  * Retrieves all successfully cached values from the cache, excluding failed
923
  * lookups and expired entries.
924
  *
925
- * @example
 
926
  * ```ts
927
  * import { Cache, Effect } from "effect"
928
  *
@@ -945,8 +1021,8 @@ export const keys = self => core.withFiber(fiber => {
945
  * })
946
  * ```
947
  *
 
948
  * @since 4.0.0
949
- * @category Combinators
950
  */
951
  export const values = self => effect.map(entries(self), Iterable.map(([, value]) => value));
952
  /**
@@ -954,8 +1030,15 @@ export const values = self => effect.map(entries(self), Iterable.map(([, value])
954
  * only returns entries with successfully resolved values, filtering out any
955
  * failed lookups or expired entries.
956
  *
 
 
 
 
 
 
 
 
957
  * @since 4.0.0
958
- * @category Combinators
959
  */
960
  export const entries = self => core.withFiber(fiber => {
961
  const now = fiber.getRef(effect.ClockRef).currentTimeMillisUnsafe();
 
1
  /**
2
+ * Caches values loaded by an Effect lookup function.
3
+ *
4
+ * A cache stores successful and failed lookup results, shares an in-progress
5
+ * lookup when multiple callers request the same missing key, and limits entries
6
+ * by capacity and optional time-to-live rules. This module includes helpers for
7
+ * reading, setting, refreshing, invalidating, and inspecting cache contents.
8
+ *
9
  * @since 4.0.0
10
  */
11
  import * as Context from "./Context.js";
 
23
  /**
24
  * Creates a cache with dynamic time-to-live based on the result and key.
25
  *
26
+ * **When to use**
27
+ *
28
+ * Use when you need different cache entry lifetimes based on the lookup result
29
+ * or key characteristics.
30
+ *
31
+ * **Details**
32
+ *
33
  * The timeToLive function receives both the exit result and the key, allowing
34
  * for flexible TTL policies based on success/failure state and key characteristics.
35
  *
36
+ * **Example** (Using dynamic time to live)
37
+ *
38
  * ```ts
39
  * import { Cache, Effect, Exit } from "effect"
40
  *
 
58
  * })
59
  * ```
60
  *
61
+ * @see {@link make} for a simpler cache constructor with a fixed time-to-live for all entries
62
+ * @category constructors
63
+ * @since 2.0.0
64
  */
65
  export const makeWith = (lookup, options) => effect.contextWith(context => {
66
  const self = Object.create(Proto);
 
73
  /**
74
  * Creates a cache with a fixed time-to-live for all entries.
75
  *
76
+ * **Details**
77
+ *
78
  * This is the basic cache constructor where all entries share the same TTL.
79
  * The lookup function will be called when a key is not found or has expired.
80
  *
81
+ * **Example** (Creating a basic cache)
82
+ *
83
  * ```ts
84
  * import { Cache, Effect } from "effect"
85
  *
 
96
  * })
97
  * ```
98
  *
99
+ * **Example** (Creating a cache with TTL)
100
+ *
101
  * ```ts
102
  * import { Cache, Effect } from "effect"
103
  *
104
+ * const program = Effect.gen(function*() {
105
+ * const users = new Map([
106
+ * [123, { name: "Ada", email: "ada@example.com" }],
107
+ * [456, { name: "Grace", email: "grace@example.com" }]
108
+ * ])
109
+ *
110
  * const cache = yield* Cache.make<
111
  * number,
112
  * { name: string; email: string },
 
114
  * >({
115
  * capacity: 500,
116
  * lookup: (userId) =>
117
+ * Effect.suspend(() => {
118
+ * const user = users.get(userId)
119
+ * return user === undefined
120
+ * ? Effect.fail(`User ${userId} not found`)
121
+ * : Effect.succeed(user)
122
  * }),
123
  * timeToLive: "15 minutes"
124
  * })
125
  *
 
126
  * const user1 = yield* Cache.get(cache, 123)
127
+ * console.log(user1) // { name: "Ada", email: "ada@example.com" }
128
+ *
129
+ * const user2 = yield* Cache.get(cache, 123)
130
+ * console.log(user2) // { name: "Ada", email: "ada@example.com" }
131
  * })
132
  * ```
133
  *
134
+ * @category constructors
135
+ * @since 2.0.0
136
  */
137
  export const make = options => makeWith(options.lookup, {
138
  ...options,
 
151
  };
152
  const defaultTimeToLive = (_, _key) => Duration.infinity;
153
  /**
154
+ * Retrieves the value for a key, invoking the lookup function on a cache miss
155
+ * or expired entry.
156
+ *
157
+ * **Details**
158
+ *
159
+ * Concurrent `get` calls for the same missing key share the same pending
160
+ * lookup. The cache stores the lookup `Exit`, so failed lookups are cached and
161
+ * will fail again until the entry expires, is invalidated, or is refreshed.
162
  *
163
+ * **Example** (Getting cached values)
 
164
  *
 
165
  * ```ts
166
  * import { Cache, Effect } from "effect"
167
  *
 
183
  * })
184
  * ```
185
  *
186
+ * **Example** (Handling lookup failures)
187
+ *
188
  * ```ts
189
  * import { Cache, Effect } from "effect"
190
  *
 
208
  * })
209
  * ```
210
  *
211
+ * **Example** (Sharing concurrent lookups)
212
+ *
213
  * ```ts
214
  * import { Cache, Effect } from "effect"
215
  *
 
237
  * })
238
  * ```
239
  *
240
+ * @category combinators
241
  * @since 4.0.0
 
242
  */
243
  export const get = /*#__PURE__*/dual(2, (self, key) => core.withFiber(fiber => {
244
  const oentry = MutableHashMap.get(self.map, key);
 
285
  }
286
  };
287
  /**
288
+ * Reads an existing cache entry without invoking the lookup function.
289
+ *
290
+ * **Details**
291
  *
292
+ * Returns `Option.none()` when the key is missing or expired, and `Option.some`
293
+ * when a cached lookup has succeeded. If the entry is still pending, waits for
294
+ * it to complete. If the cached or pending lookup fails, this effect fails with
295
+ * the same error.
296
+ *
297
+ * **Example** (Reading cached values without lookup)
298
  *
 
299
  * ```ts
300
  * import { Cache, Effect } from "effect"
301
  *
 
320
  * })
321
  * ```
322
  *
323
+ * **Example** (Skipping expired entries)
324
+ *
325
  * ```ts
326
  * import { Cache, Effect } from "effect"
327
  * import { TestClock } from "effect/testing"
 
350
  * })
351
  * ```
352
  *
353
+ * **Example** (Waiting for pending lookups)
354
+ *
355
  * ```ts
356
  * import { Cache, Deferred, Effect, Fiber } from "effect"
357
  *
 
374
  *
375
  * const result = yield* Fiber.join(optionFiber)
376
  * console.log(result) // Option.some(42)
377
+ *
378
+ * const value = yield* Fiber.join(getFiber)
379
+ * console.log(value) // 42
380
  * })
381
  * ```
382
  *
383
+ * @category combinators
384
  * @since 4.0.0
 
385
  */
386
  export const getOption = /*#__PURE__*/dual(2, (self, key) => core.withFiber(fiber => {
387
  const entry = getImpl(self, key, fiber);
 
404
  * Retrieves the value associated with the specified key from the cache, only if
405
  * it contains a resolved successful value.
406
  *
407
+ * **Details**
408
+ *
409
+ * This checks only an existing non-expired entry. It returns `Option.some` when
410
+ * the entry has already resolved successfully, and `Option.none` for missing,
411
+ * expired, failed, or still-pending entries.
412
+ *
413
+ * @see {@link get} for triggering or awaiting the cache lookup
414
+ * @see {@link getOption} for reading an existing entry as an optional effect
415
+ *
416
+ * @category combinators
417
  * @since 4.0.0
 
418
  */
419
  export const getSuccess = /*#__PURE__*/dual(2, (self, key) => core.withFiber(fiber => {
420
  const exit = getImpl(self, key, fiber)?.deferred.effect;
 
427
  * Sets the value associated with the specified key in the cache. This will
428
  * overwrite any existing value for that key, skipping the lookup function.
429
  *
430
+ * **Example** (Setting values directly)
431
+ *
432
  * ```ts
433
  * import { Cache, Effect } from "effect"
434
  *
 
445
  * })
446
  * ```
447
  *
448
+ * **Example** (Overwriting cached values)
449
+ *
450
  * ```ts
451
  * import { Cache, Effect } from "effect"
452
  *
 
468
  * })
469
  * ```
470
  *
471
+ * **Example** (Applying TTL to set values)
472
+ *
473
  * ```ts
474
  * import { Cache, Effect } from "effect"
475
  * import { TestClock } from "effect/testing"
 
492
  * })
493
  * ```
494
  *
495
+ * **Example** (Enforcing capacity when setting values)
496
+ *
497
  * ```ts
498
  * import { Cache, Effect } from "effect"
499
  *
 
517
  * })
518
  * ```
519
  *
520
+ * @category combinators
521
  * @since 4.0.0
 
522
  */
523
  export const set = /*#__PURE__*/dual(3, (self, key, value) => core.withFiber(fiber => {
524
  const exit = core.exitSucceed(value);
 
537
  return effect.void;
538
  }));
539
  /**
540
+ * Checks whether the cache contains an entry for the specified key.
541
+ *
542
+ * **Details**
543
+ *
544
+ * This checks for an existing non-expired entry without invoking the cache
545
+ * lookup function. Expired entries are treated as absent.
546
+ *
547
+ * **Example** (Checking for cached keys)
548
  *
 
549
  * ```ts
550
  * import { Cache, Effect } from "effect"
551
  *
 
564
  * })
565
  * ```
566
  *
567
+ * **Example** (Checking TTL expiration)
568
+ *
569
  * ```ts
570
  * import { Cache, Effect } from "effect"
571
  * import { TestClock } from "effect/testing"
 
592
  * })
593
  * ```
594
  *
595
+ * **Example** (Checking multiple keys)
596
+ *
597
  * ```ts
598
  * import { Cache, Effect } from "effect"
599
  *
 
622
  * })
623
  * ```
624
  *
625
+ * @category combinators
626
  * @since 4.0.0
 
627
  */
628
  export const has = /*#__PURE__*/dual(2, (self, key) => core.withFiber(fiber => {
629
  const oentry = getImpl(self, key, fiber, false);
 
632
  /**
633
  * Invalidates the entry associated with the specified key in the cache.
634
  *
635
+ * **Example** (Invalidating cached entries)
636
+ *
637
  * ```ts
638
  * import { Cache, Effect } from "effect"
639
  *
 
671
  * })
672
  * ```
673
  *
674
+ * @category combinators
675
  * @since 4.0.0
 
676
  */
677
  export const invalidate = /*#__PURE__*/dual(2, (self, key) => effect.sync(() => {
678
  MutableHashMap.remove(self.map, key);
679
  }));
680
  /**
681
+ * Invalidates the entry associated with the specified key in the cache when the
682
+ * predicate returns true for the cached value.
683
+ *
684
+ * **Example** (Invalidating entries conditionally)
685
  *
 
686
  * ```ts
687
  * import { Cache, Effect } from "effect"
688
  *
 
739
  * })
740
  * ```
741
  *
742
+ * @category combinators
743
  * @since 4.0.0
 
744
  */
745
  export const invalidateWhen = /*#__PURE__*/dual(3, (self, key, f) => core.withFiber(fiber => {
746
  const oentry = getImpl(self, key, fiber, false);
 
758
  /**
759
  * Forces a refresh of the value associated with the specified key in the cache.
760
  *
761
+ * **Details**
762
+ *
763
  * It will always invoke the lookup function to construct a new value,
764
  * overwriting any existing value for that key.
765
  *
766
+ * **Example** (Refreshing cached values)
767
+ *
768
  * ```ts
769
  * import { Cache, Effect } from "effect"
770
  *
 
794
  * })
795
  * ```
796
  *
797
+ * **Example** (Resetting TTL on refresh)
798
+ *
799
  * ```ts
800
  * import { Cache, Effect } from "effect"
801
  * import { TestClock } from "effect/testing"
 
823
  * })
824
  * ```
825
  *
826
+ * **Example** (Refreshing missing keys)
827
+ *
828
  * ```ts
829
  * import { Cache, Effect } from "effect"
830
  *
 
844
  * })
845
  * ```
846
  *
847
+ * @category combinators
848
  * @since 4.0.0
 
849
  */
850
  export const refresh = /*#__PURE__*/dual(2, (self, key) => core.withFiber(fiber => {
851
  const deferred = Deferred.makeUnsafe();
 
875
  /**
876
  * Invalidates all entries in the cache.
877
  *
878
+ * **Example** (Invalidating all entries)
879
+ *
880
  * ```ts
881
  * import { Cache, Effect } from "effect"
882
  *
 
906
  * })
907
  * ```
908
  *
909
+ * @category combinators
910
  * @since 4.0.0
 
911
  */
912
  export const invalidateAll = self => effect.sync(() => {
913
  MutableHashMap.clear(self.map);
 
915
  /**
916
  * Retrieves the approximate number of entries in the cache.
917
  *
918
+ * **Details**
919
+ *
920
  * Note that expired entries are counted until they are accessed and removed.
921
  * The size reflects the current number of entries stored, not the number
922
  * of valid entries.
923
  *
924
+ * **Example** (Reading cache size)
925
+ *
926
  * ```ts
927
  * import { Cache, Effect } from "effect"
928
  *
 
949
  * })
950
  * ```
951
  *
952
+ * @category combinators
953
  * @since 4.0.0
 
954
  */
955
  export const size = self => effect.sync(() => MutableHashMap.size(self.map));
956
  /**
957
  * Retrieves all active keys from the cache, automatically filtering out expired entries.
958
  *
959
+ * **Example** (Reading active keys)
960
+ *
961
  * ```ts
962
  * import { Cache, Effect } from "effect"
963
  *
 
976
  * // Retrieve all active keys
977
  * const keys = yield* Cache.keys(cache)
978
  *
979
+ * console.log(Array.from(keys).sort()) // ["cache", "hello", "world"]
980
  * })
981
  * ```
982
  *
983
+ * @category combinators
984
  * @since 4.0.0
 
985
  */
986
  export const keys = self => core.withFiber(fiber => {
987
  const now = fiber.getRef(effect.ClockRef).currentTimeMillisUnsafe();
 
997
  * Retrieves all successfully cached values from the cache, excluding failed
998
  * lookups and expired entries.
999
  *
1000
+ * **Example** (Reading all cached values)
1001
+ *
1002
  * ```ts
1003
  * import { Cache, Effect } from "effect"
1004
  *
 
1021
  * })
1022
  * ```
1023
  *
1024
+ * @category combinators
1025
  * @since 4.0.0
 
1026
  */
1027
  export const values = self => effect.map(entries(self), Iterable.map(([, value]) => value));
1028
  /**
 
1030
  * only returns entries with successfully resolved values, filtering out any
1031
  * failed lookups or expired entries.
1032
  *
1033
+ * **Gotchas**
1034
+ *
1035
+ * Expired entries are removed from the cache while `entries` filters them out.
1036
+ *
1037
+ * @see {@link keys} for retrieving only cached keys
1038
+ * @see {@link values} for retrieving only cached values
1039
+ *
1040
+ * @category combinators
1041
  * @since 4.0.0
 
1042
  */
1043
  export const entries = self => core.withFiber(fiber => {
1044
  const now = fiber.getRef(effect.ClockRef).currentTimeMillisUnsafe();
.opencode/node_modules/effect/dist/Cache.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Cache.js","names":["Context","Deferred","Duration","dual","core","PipeInspectableProto","effect","Iterable","MutableHashMap","Option","Result","TypeId","makeWith","lookup","options","contextWith","context","self","Object","create","Proto","key","updateContext","input","merge","map","make","capacity","timeToLive","exit","fromInputUnsafe","defaultTimeToLive","succeed","toJSON","_id","_","_key","infinity","get","withFiber","fiber","oentry","isSome","hasExpired","value","remove","set","await","deferred","makeUnsafe","entry","expiresAt","undefined","Number","isFinite","checkCapacity","onExit","doneUnsafe","ttl","getRef","ClockRef","currentTimeMillisUnsafe","toMillis","isZero","void","diff","size","getOption","getImpl","asSome","succeedNone","isRead","isNone","getSuccess","exitIsSuccess","succeedSome","exitSucceed","has","invalidate","sync","invalidateWhen","f","pipe","catchCause","refresh","existing","invalidateAll","clear","keys","now","filterMap","failVoid","values","entries","isExit","exitIsFailure"],"sources":["../src/Cache.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,QAAQ,MAAM,eAAe;AAIzC,SAASC,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,IAAI,MAAM,oBAAoB;AAC1C,SAASC,oBAAoB,QAAQ,oBAAoB;AACzD,OAAO,KAAKC,MAAM,MAAM,sBAAsB;AAC9C,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,OAAO,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I;EACvB,MAAMiD,GAAG,GAAGjD,KAAK,CAACmB,MAAM,CAACrD,MAAM,CAACsD,QAAQ,CAAC,CAACC,uBAAuB,EAAE;EACnE,OAAOvD,MAAM,CAAC0B,OAAO,CAACzB,QAAQ,CAACmF,SAAS,CAACzE,IAAI,CAACQ,GAAG,EAAE,CAAC,CAACJ,GAAG,EAAE6B,KAAK,CAAC,KAAI;IAClE,IAAIA,KAAK,CAACC,SAAS,KAAKC,SAAS,IAAIF,KAAK,CAACC,SAAS,GAAGsC,GAAG,EAAE;MAC1D,MAAM5D,IAAI,GAAGqB,KAAK,CAACF,QAAQ,CAAC1C,MAAM;MAClC,OAAO,CAACF,IAAI,CAAC0F,MAAM,CAACjE,IAAI,CAAC,IAAIvB,MAAM,CAACyF,aAAa,CAAClE,IAAI,CAAC,GACnDnB,MAAM,CAACiF,QAAQ,GACfjF,MAAM,CAACsB,OAAO,CAAC,CAACX,GAAG,EAAEQ,IAAI,CAACe,KAAU,CAAC,CAAC;IAC5C;IACApC,cAAc,CAACqC,MAAM,CAAC5B,IAAI,CAACQ,GAAG,EAAEJ,GAAG,CAAC;IACpC,OAAOX,MAAM,CAACiF,QAAQ;EACxB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC","ignoreList":[]}
 
1
+ {"version":3,"file":"Cache.js","names":["Context","Deferred","Duration","dual","core","PipeInspectableProto","effect","Iterable","MutableHashMap","Option","Result","TypeId","makeWith","lookup","options","contextWith","context","self","Object","create","Proto","key","updateContext","input","merge","map","make","capacity","timeToLive","exit","fromInputUnsafe","defaultTimeToLive","succeed","toJSON","_id","_","_key","infinity","get","withFiber","fiber","oentry","isSome","hasExpired","value","remove","set","await","deferred","makeUnsafe","entry","expiresAt","undefined","Number","isFinite","checkCapacity","onExit","doneUnsafe","ttl","getRef","ClockRef","currentTimeMillisUnsafe","toMillis","isZero","void","diff","size","getOption","getImpl","asSome","succeedNone","isRead","isNone","getSuccess","exitIsSuccess","succeedSome","exitSucceed","has","invalidate","sync","invalidateWhen","f","pipe","catchCause","refresh","existing","invalidateAll","clear","keys","now","filterMap","failVoid","values","entries","isExit","exitIsFailure"],"sources":["../src/Cache.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;AAUA,OAAO,KAAKA,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,QAAQ,MAAM,eAAe;AAIzC,SAASC,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,IAAI,MAAM,oBAAoB;AAC1C,SAASC,oBAAoB,QAAQ,oBAAoB;AACzD,OAAO,KAAKC,MAAM,MAAM,sBAAsB;AAC9C,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,cAAc,MAAM,qBAAqB;AACrD,OAAO,KAAKC,MAAM,MAAM,aAAa;AAGrC,OAAO,KAAKC,MAAM,MAAM,aAAa;AAErC,MAAMC,MAAM,GAAG,eAAe;AA2G9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,OAAO,MAAMC,QAAQ,GAAGA,CAMtBC,MAA4C,EAAEC,OAI/C,KAKCR,MAAM,CAACS,WAAW,CAAEC,OAA6B,IAAI;EACnD,MAAMC,IAAI,GAAGC,MAAM,CAACC,MAAM,CAACC,KAAK,CAAC;EACjCH,IAAI,CAACJ,MAAM,GAAIQ,GAAQ,IACrBf,MAAM,CAACgB,aAAa,CAClBT,MAAM,CAACQ,GAAG,CAAC,EACVE,KAAK,IAAKvB,OAAO,CAACwB,KAAK,CAACR,OAAO,EAAEO,KAAK,CAAC,CACzC;EACHN,IAAI,CAACQ,GAAG,GAAGjB,cAAc,CAACkB,IAAI,EAAE;EAChCT,IAAI,CAACU,QAAQ,GAAGb,OAAO,CAACa,QAAQ;EAChCV,IAAI,CAACW,UAAU,GAAGd,OAAO,CAACc,UAAU,GAChC,CAACC,IAAqB,EAAER,GAAQ,KAAKnB,QAAQ,CAAC4B,eAAe,CAAChB,O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GAAG,CAAC;IACpC,OAAOX,MAAM,CAACiF,QAAQ;EACxB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC","ignoreList":[]}
.opencode/node_modules/effect/dist/Cause.d.ts CHANGED
@@ -1,79 +1,11 @@
1
  /**
2
- * Structured representation of how an Effect can fail.
3
- *
4
- * A `Cause<E>` holds a flat array of `Reason` values, where each reason is one of:
5
- *
6
- * - **Fail** — a typed, expected error `E` (created by `Effect.fail`)
7
- * - **Die** — an untyped defect (`unknown`) from `Effect.die` or uncaught throws
8
- * - **Interrupt** — a fiber interruption, optionally carrying the interrupting fiber's ID
9
- *
10
- * ## Mental model
11
- *
12
- * - A `Cause` is always flat: concurrent and sequential failures are stored together
13
- * in `cause.reasons` (a `ReadonlyArray<Reason<E>>`).
14
- * - Each `Reason` carries an `annotations` map with tracing metadata (stack frames, spans).
15
- * - An empty `reasons` array means the computation succeeded or the cause was empty
16
- * ({@link empty}).
17
- * - `Cause` implements `Equal`, so two causes with identical reasons compare as equal.
18
- *
19
- * ## Common tasks
20
- *
21
- * | Intent | API |
22
- * |--------|-----|
23
- * | Create a cause | {@link fail}, {@link die}, {@link interrupt}, {@link fromReasons} |
24
- * | Test for reason types | {@link hasFails}, {@link hasDies}, {@link hasInterrupts} |
25
- * | Extract the first error/defect | {@link findError}, {@link findDefect}, {@link findFail}, {@link findDie} |
26
- * | Iterate over reasons manually | `cause.reasons.filter(Cause.isFailReason)` |
27
- * | Combine two causes | {@link combine} |
28
- * | Transform errors | {@link map} |
29
- * | Collapse to a single thrown value | {@link squash} |
30
- * | Render for logging | {@link pretty}, {@link prettyErrors} |
31
- * | Attach/read tracing metadata | {@link annotate}, {@link annotations}, {@link reasonAnnotations} |
32
- *
33
- * ## Gotchas
34
- *
35
- * - `findError`/`findDefect` return `Filter.fail` (not `Option.none`) when no match is
36
- * found. Use {@link findErrorOption} if you need an `Option`.
37
- * - `squash` picks the first `Fail` error, then the first `Die` defect, then falls back
38
- * to a generic "interrupted" / "empty" error. It is lossy — use `prettyErrors` or
39
- * iterate `reasons` directly when you need all failures.
40
- * - The module also exports several built-in error classes (`NoSuchElementError`,
41
- * `TimeoutError`, `IllegalArgumentError`, `ExceededCapacityError`, `UnknownError`)
42
- * and the `Done` completion signal. These all implement `YieldableError` and can be
43
- * yielded directly inside `Effect.gen`.
44
- *
45
- * **Example** (inspecting a concurrent failure)
46
  *
47
- * ```ts
48
- * import { Cause, Effect } from "effect"
49
- *
50
- * const program = Effect.gen(function*() {
51
- * const cause = yield* Effect.sandbox(
52
- * Effect.all([
53
- * Effect.fail("err1"),
54
- * Effect.die("defect"),
55
- * Effect.fail("err2")
56
- * ], { concurrency: "unbounded" })
57
- * ).pipe(Effect.flip)
58
- *
59
- * const errors = cause.reasons
60
- * .filter(Cause.isFailReason)
61
- * .map((r) => r.error)
62
- *
63
- * const defects = cause.reasons
64
- * .filter(Cause.isDieReason)
65
- * .map((r) => r.defect)
66
- *
67
- * console.log(errors) // ["err1", "err2"] (order may vary)
68
- * console.log(defects) // ["defect"]
69
- * })
70
- *
71
- * Effect.runPromise(program)
72
- * ```
73
- *
74
- * @see {@link Cause} — the core interface
75
- * @see {@link Reason} — the union of failure kinds
76
- * @see {@link pretty} — human-readable rendering
77
  *
78
  * @since 2.0.0
79
  */
@@ -90,20 +22,27 @@ import type * as Types from "./Types.ts";
90
  /**
91
  * Unique brand for `Cause` values, used for runtime type checks via {@link isCause}.
92
  *
93
- * @since 2.0.0
94
- * @category symbols
95
  */
96
  export declare const TypeId: "~effect/Cause";
97
  /**
98
  * Unique brand for `Reason` values, used for runtime type checks via {@link isReason}.
99
  *
100
- * @since 2.0.0
101
- * @category symbols
102
  */
103
  export declare const ReasonTypeId: "~effect/Cause/Reason";
104
  /**
105
  * A structured representation of how an Effect failed.
106
  *
 
 
 
 
 
 
 
107
  * Access the individual failure entries through the `reasons` array, then
108
  * narrow each entry with {@link isFailReason}, {@link isDieReason}, or
109
  * {@link isInterruptReason}.
@@ -127,17 +66,15 @@ export declare const ReasonTypeId: "~effect/Cause/Reason";
127
  * console.log(Cause.isFailReason(cause.reasons[0])) // true
128
  * ```
129
  *
130
- * @see {@link Reason} — the union type stored in `reasons`
131
- *
132
- * @since 2.0.0
133
  * @category models
 
134
  */
135
  export interface Cause<out E> extends Pipeable, Inspectable, Equal {
136
  readonly [TypeId]: typeof TypeId;
137
  readonly reasons: ReadonlyArray<Reason<E>>;
138
  }
139
  /**
140
- * Tests if an arbitrary value is a {@link Cause}.
141
  *
142
  * **Example** (runtime type check)
143
  *
@@ -153,7 +90,7 @@ export interface Cause<out E> extends Pipeable, Inspectable, Equal {
153
  */
154
  export declare const isCause: (self: unknown) => self is Cause<unknown>;
155
  /**
156
- * Tests if an arbitrary value is a {@link Reason} (`Fail`, `Die`, or `Interrupt`).
157
  *
158
  * **Example** (runtime type check)
159
  *
@@ -166,11 +103,13 @@ export declare const isCause: (self: unknown) => self is Cause<unknown>;
166
  * ```
167
  *
168
  * @category guards
169
- * @since 2.0.0
170
  */
171
  export declare const isReason: (self: unknown) => self is Reason<unknown>;
172
  /**
173
- * A single entry inside a {@link Cause}'s `reasons` array.
 
 
174
  *
175
  * Narrow to a concrete type with {@link isFailReason}, {@link isDieReason},
176
  * or {@link isInterruptReason}.
@@ -193,18 +132,17 @@ export declare const isReason: (self: unknown) => self is Reason<unknown>;
193
  * }
194
  * ```
195
  *
196
- * @see {@link Fail} — typed error reason
197
- * @see {@link Die} — untyped defect reason
198
- * @see {@link Interrupt} — interruption reason
199
- *
200
- * @since 4.0.0
201
  * @category models
 
202
  */
203
  export type Reason<E> = Fail<E> | Die | Interrupt;
204
  /**
205
- * Narrows a {@link Reason} to {@link Fail}.
 
 
206
  *
207
- * Useful as a predicate for `Array.filter` when iterating over `cause.reasons`.
 
208
  *
209
  * **Example** (filtering fail reasons)
210
  *
@@ -224,9 +162,12 @@ export type Reason<E> = Fail<E> | Die | Interrupt;
224
  */
225
  export declare const isFailReason: <E>(self: Reason<E>) => self is Fail<E>;
226
  /**
227
- * Narrows a {@link Reason} to {@link Die}.
228
  *
229
- * Useful as a predicate for `Array.filter` when iterating over `cause.reasons`.
 
 
 
230
  *
231
  * **Example** (filtering die reasons)
232
  *
@@ -246,9 +187,12 @@ export declare const isFailReason: <E>(self: Reason<E>) => self is Fail<E>;
246
  */
247
  export declare const isDieReason: <E>(self: Reason<E>) => self is Die;
248
  /**
249
- * Narrows a {@link Reason} to {@link Interrupt}.
 
 
250
  *
251
- * Useful as a predicate for `Array.filter` when iterating over `cause.reasons`.
 
252
  *
253
  * **Example** (filtering interrupt reasons)
254
  *
@@ -268,10 +212,9 @@ export declare const isDieReason: <E>(self: Reason<E>) => self is Die;
268
  */
269
  export declare const isInterruptReason: <E>(self: Reason<E>) => self is Interrupt;
270
  /**
271
- * Companion namespace for the {@link Cause} interface.
272
  *
273
  * @since 2.0.0
274
- * @category models
275
  */
276
  export declare namespace Cause {
277
  /**
@@ -286,21 +229,22 @@ export declare namespace Cause {
286
  * type E = Cause.Cause.Error<Cause.Cause<string>>
287
  * ```
288
  *
289
- * @since 4.0.0
290
  * @category models
 
291
  */
292
  type Error<T> = T extends Cause<infer E> ? E : never;
293
  /**
294
- * Base interface shared by all reason types ({@link Fail}, {@link Die},
295
- * {@link Interrupt}).
 
296
  *
297
  * Every reason carries:
298
  * - `_tag` — discriminant string (`"Fail"`, `"Die"`, or `"Interrupt"`)
299
  * - `annotations` — tracing metadata attached by the runtime
300
  * - `annotate()` — returns a copy with additional annotations
301
  *
302
- * @since 4.0.0
303
  * @category models
 
304
  */
305
  interface ReasonProto<Tag extends string> extends Inspectable, Equal {
306
  readonly [ReasonTypeId]: typeof ReasonTypeId;
@@ -312,10 +256,9 @@ export declare namespace Cause {
312
  }
313
  }
314
  /**
315
- * Companion namespace for the {@link Reason} type.
316
  *
317
- * @since 2.0.0
318
- * @category models
319
  */
320
  export declare namespace Reason {
321
  /**
@@ -330,16 +273,23 @@ export declare namespace Reason {
330
  * type E = Cause.Reason.Error<Cause.Reason<string>>
331
  * ```
332
  *
333
- * @since 4.0.0
334
  * @category models
 
335
  */
336
  type Error<T> = T extends Reason<infer E> ? E : never;
337
  }
338
  /**
339
  * An untyped defect — typically a programming error or an uncaught exception.
340
  *
 
 
 
 
 
 
 
341
  * The `defect` property is `unknown` because defects are not part of the
342
- * typed error channel. Use {@link isDieReason} to narrow a {@link Reason}
343
  * to this type.
344
  *
345
  * **Example** (accessing the defect)
@@ -347,18 +297,18 @@ export declare namespace Reason {
347
  * ```ts
348
  * import { Cause } from "effect"
349
  *
350
- * const cause = Cause.die(new Error("Unexpected"))
351
  * const reason = cause.reasons[0]
352
  * if (Cause.isDieReason(reason)) {
353
- * console.log(reason.defect) // Error: Unexpected
354
  * }
355
  * ```
356
  *
357
- * @see {@link die} — create a `Cause` containing a single `Die`
358
- * @see {@link isDieReason} — type guard
359
  *
360
- * @since 2.0.0
361
  * @category models
 
362
  */
363
  export interface Die extends Cause.ReasonProto<"Die"> {
364
  readonly defect: unknown;
@@ -366,8 +316,15 @@ export interface Die extends Cause.ReasonProto<"Die"> {
366
  /**
367
  * A typed, expected error produced by `Effect.fail`.
368
  *
 
 
 
 
 
 
 
369
  * The `error` property carries the typed value `E`. Use {@link isFailReason}
370
- * to narrow a {@link Reason} to this type.
371
  *
372
  * **Example** (accessing the error)
373
  *
@@ -381,11 +338,11 @@ export interface Die extends Cause.ReasonProto<"Die"> {
381
  * }
382
  * ```
383
  *
384
- * @see {@link fail} — create a `Cause` containing a single `Fail`
385
- * @see {@link isFailReason} — type guard
386
  *
387
- * @since 2.0.0
388
  * @category models
 
389
  */
390
  export interface Fail<out E> extends Cause.ReasonProto<"Fail"> {
391
  readonly error: E;
@@ -394,7 +351,9 @@ export interface Fail<out E> extends Cause.ReasonProto<"Fail"> {
394
  * A fiber interruption signal, optionally carrying the ID of the fiber that
395
  * initiated the interruption.
396
  *
397
- * Use {@link isInterruptReason} to narrow a {@link Reason} to this type.
 
 
398
  *
399
  * **Example** (accessing the fiber ID)
400
  *
@@ -408,24 +367,30 @@ export interface Fail<out E> extends Cause.ReasonProto<"Fail"> {
408
  * }
409
  * ```
410
  *
411
- * @see {@link interrupt} — create a `Cause` containing a single `Interrupt`
412
- * @see {@link isInterruptReason} — type guard
413
- *
414
- * @since 2.0.0
415
  * @category models
 
416
  */
417
  export interface Interrupt extends Cause.ReasonProto<"Interrupt"> {
418
  readonly fiberId: number | undefined;
419
  }
420
  /**
421
- * Creates a {@link Cause} from an array of {@link Reason} values.
422
  *
423
- * Use this when you already have individual reasons (e.g. from filtering or
 
 
424
  * transforming another cause's `reasons` array) and need to wrap them back
425
  * into a `Cause`.
426
  *
427
- * - Returns a new `Cause`; does not mutate the input array.
428
- * - An empty array produces a cause equivalent to {@link empty}.
 
 
 
 
 
 
 
429
  *
430
  * **Example** (building a cause from reasons)
431
  *
@@ -443,25 +408,47 @@ export interface Interrupt extends Cause.ReasonProto<"Interrupt"> {
443
  * @see {@link combine} — merge two existing causes
444
  *
445
  * @category constructors
446
- * @since 2.0.0
447
  */
448
  export declare const fromReasons: <E>(reasons: ReadonlyArray<Reason<E>>) => Cause<E>;
449
  /**
450
- * A {@link Cause} with an empty `reasons` array.
 
 
 
 
 
 
 
451
  *
452
  * Represents the absence of failure. Combining any cause with `empty` via
453
  * {@link combine} returns the original cause unchanged.
454
  *
455
- * @see {@link combine}
 
 
 
 
 
 
 
 
 
 
 
456
  *
457
  * @category constructors
458
  * @since 2.0.0
459
  */
460
  export declare const empty: Cause<never>;
461
  /**
462
- * Creates a {@link Cause} containing a single {@link Fail} reason with the
463
  * given typed error.
464
  *
 
 
 
 
465
  * **Example** (creating a fail cause)
466
  *
467
  * ```ts
@@ -480,15 +467,19 @@ export declare const empty: Cause<never>;
480
  */
481
  export declare const fail: <E>(error: E) => Cause<E>;
482
  /**
483
- * Creates a {@link Cause} containing a single {@link Die} reason with the
484
  * given defect.
485
  *
 
 
 
 
486
  * **Example** (creating a die cause)
487
  *
488
  * ```ts
489
  * import { Cause } from "effect"
490
  *
491
- * const cause = Cause.die(new Error("Unexpected"))
492
  * console.log(cause.reasons.length) // 1
493
  * console.log(Cause.isDieReason(cause.reasons[0])) // true
494
  * ```
@@ -501,7 +492,7 @@ export declare const fail: <E>(error: E) => Cause<E>;
501
  */
502
  export declare const die: (defect: unknown) => Cause<never>;
503
  /**
504
- * Creates a {@link Cause} containing a single {@link Interrupt} reason,
505
  * optionally carrying the interrupting fiber's ID.
506
  *
507
  * **Example** (creating an interrupt cause)
@@ -522,10 +513,12 @@ export declare const die: (defect: unknown) => Cause<never>;
522
  */
523
  export declare const interrupt: (fiberId?: number | undefined) => Cause<never>;
524
  /**
525
- * Creates a standalone {@link Fail} reason (not wrapped in a {@link Cause}).
 
 
526
  *
527
- * Use this when you need to construct individual reasons for
528
- * {@link fromReasons} or for direct comparison.
529
  *
530
  * **Example** (creating a Fail reason)
531
  *
@@ -545,15 +538,21 @@ export declare const interrupt: (fiberId?: number | undefined) => Cause<never>;
545
  */
546
  export declare const makeFailReason: <E>(error: E) => Fail<E>;
547
  /**
548
- * Creates a standalone {@link Die} reason (not wrapped in a {@link Cause}).
 
 
 
 
 
549
  *
550
  * **Example** (creating a Die reason)
551
  *
552
  * ```ts
553
  * import { Cause } from "effect"
554
  *
555
- * const reason = Cause.makeDieReason(new Error("bug"))
556
  * console.log(reason._tag) // "Die"
 
557
  * ```
558
  *
559
  * @see {@link makeFailReason} — create a `Fail` reason
@@ -564,9 +563,14 @@ export declare const makeFailReason: <E>(error: E) => Fail<E>;
564
  */
565
  export declare const makeDieReason: (defect: unknown) => Die;
566
  /**
567
- * Creates a standalone {@link Interrupt} reason (not wrapped in a {@link Cause}),
568
  * optionally carrying the interrupting fiber's ID.
569
  *
 
 
 
 
 
570
  * **Example** (creating an Interrupt reason)
571
  *
572
  * ```ts
@@ -585,11 +589,12 @@ export declare const makeDieReason: (defect: unknown) => Die;
585
  */
586
  export declare const makeInterruptReason: (fiberId?: number | undefined) => Interrupt;
587
  /**
588
- * Returns `true` if every reason in the cause is an {@link Interrupt} (and
589
  * there is at least one reason).
590
  *
591
- * Useful for deciding whether a failure was entirely due to interruption and
592
- * can be silently discarded.
 
593
  *
594
  * **Example** (checking interrupt-only causes)
595
  *
@@ -604,15 +609,24 @@ export declare const makeInterruptReason: (fiberId?: number | undefined) => Inte
604
  * @see {@link hasInterrupts} — `true` if the cause contains *any* interrupts
605
  *
606
  * @category predicates
607
- * @since 2.0.0
608
  */
609
  export declare const hasInterruptsOnly: <E>(self: Cause<E>) => boolean;
610
  /**
611
- * Transforms the typed error values inside a {@link Cause} using the
612
- * provided function. Only {@link Fail} reasons are affected; {@link Die}
613
- * and {@link Interrupt} reasons pass through unchanged.
 
 
 
 
 
614
  *
615
- * Returns a new `Cause`; does not mutate the original.
 
 
 
 
616
  *
617
  * **Example** (mapping errors to uppercase)
618
  *
@@ -628,15 +642,24 @@ export declare const hasInterruptsOnly: <E>(self: Cause<E>) => boolean;
628
  * ```
629
  *
630
  * @category mapping
631
- * @since 4.0.0
632
  */
633
  export declare const map: {
634
  /**
635
- * Transforms the typed error values inside a {@link Cause} using the
636
- * provided function. Only {@link Fail} reasons are affected; {@link Die}
637
- * and {@link Interrupt} reasons pass through unchanged.
 
 
638
  *
639
- * Returns a new `Cause`; does not mutate the original.
 
 
 
 
 
 
 
640
  *
641
  * **Example** (mapping errors to uppercase)
642
  *
@@ -652,15 +675,24 @@ export declare const map: {
652
  * ```
653
  *
654
  * @category mapping
655
- * @since 4.0.0
656
  */
657
  <E, E2>(f: (error: Types.NoInfer<E>) => E2): (self: Cause<E>) => Cause<E2>;
658
  /**
659
- * Transforms the typed error values inside a {@link Cause} using the
660
- * provided function. Only {@link Fail} reasons are affected; {@link Die}
661
- * and {@link Interrupt} reasons pass through unchanged.
 
 
 
 
 
662
  *
663
- * Returns a new `Cause`; does not mutate the original.
 
 
 
 
664
  *
665
  * **Example** (mapping errors to uppercase)
666
  *
@@ -676,7 +708,7 @@ export declare const map: {
676
  * ```
677
  *
678
  * @category mapping
679
- * @since 4.0.0
680
  */
681
  <E, E2>(self: Cause<E>, f: (error: Types.NoInfer<E>) => E2): Cause<E2>;
682
  };
@@ -684,7 +716,13 @@ export declare const map: {
684
  * Merges two causes into a single cause whose `reasons` array is the union
685
  * of both inputs (de-duplicated by value equality).
686
  *
687
- * - Combining with {@link empty} returns the other cause unchanged.
 
 
 
 
 
 
688
  * - If the result is structurally equal to `self`, `self` is returned
689
  * (referential shortcut).
690
  *
@@ -700,6 +738,7 @@ export declare const map: {
700
  * ```
701
  *
702
  * @see {@link fromReasons} — build a cause from an array of reasons
 
703
  *
704
  * @category combining
705
  * @since 4.0.0
@@ -709,7 +748,13 @@ export declare const combine: {
709
  * Merges two causes into a single cause whose `reasons` array is the union
710
  * of both inputs (de-duplicated by value equality).
711
  *
712
- * - Combining with {@link empty} returns the other cause unchanged.
 
 
 
 
 
 
713
  * - If the result is structurally equal to `self`, `self` is returned
714
  * (referential shortcut).
715
  *
@@ -725,6 +770,7 @@ export declare const combine: {
725
  * ```
726
  *
727
  * @see {@link fromReasons} — build a cause from an array of reasons
 
728
  *
729
  * @category combining
730
  * @since 4.0.0
@@ -734,7 +780,13 @@ export declare const combine: {
734
  * Merges two causes into a single cause whose `reasons` array is the union
735
  * of both inputs (de-duplicated by value equality).
736
  *
737
- * - Combining with {@link empty} returns the other cause unchanged.
 
 
 
 
 
 
738
  * - If the result is structurally equal to `self`, `self` is returned
739
  * (referential shortcut).
740
  *
@@ -750,6 +802,7 @@ export declare const combine: {
750
  * ```
751
  *
752
  * @see {@link fromReasons} — build a cause from an array of reasons
 
753
  *
754
  * @category combining
755
  * @since 4.0.0
@@ -757,17 +810,28 @@ export declare const combine: {
757
  <E, E2>(self: Cause<E>, that: Cause<E2>): Cause<E | E2>;
758
  };
759
  /**
760
- * Collapses a {@link Cause} into a single `unknown` value, picking the "most
761
  * important" failure in this order:
762
  *
763
- * 1. First {@link Fail} error (the `E` value)
764
- * 2. First {@link Die} defect
 
 
 
 
 
 
 
765
  * 3. A generic `Error("All fibers interrupted without error")` for interrupt-only causes
766
- * 4. A generic `Error("Empty cause")` for {@link empty}
767
  *
768
  * This is the function used by `Effect.runPromise` and `Effect.runSync` to
769
- * decide what to throw. It is lossy — use {@link prettyErrors} or iterate
770
- * `cause.reasons` when you need all failures.
 
 
 
 
771
  *
772
  * **Example** (squashing a cause)
773
  *
@@ -786,7 +850,12 @@ export declare const combine: {
786
  */
787
  export declare const squash: <E>(self: Cause<E>) => unknown;
788
  /**
789
- * Returns `true` if the cause contains at least one {@link Fail} reason.
 
 
 
 
 
790
  *
791
  * **Example** (checking for typed errors)
792
  *
@@ -801,15 +870,19 @@ export declare const squash: <E>(self: Cause<E>) => unknown;
801
  * @see {@link hasInterrupts} — check for interruptions
802
  *
803
  * @category predicates
804
- * @since 2.0.0
805
  */
806
  export declare const hasFails: <E>(self: Cause<E>) => boolean;
807
  /**
808
- * Returns the first {@link Fail} reason from a cause, including its
809
- * annotations. Returns `Filter.fail` with the remaining cause when no
810
- * `Fail` is found.
 
 
 
811
  *
812
- * Use {@link findError} if you only need the unwrapped error value `E`.
 
813
  *
814
  * **Example** (extracting the first Fail reason)
815
  *
@@ -825,16 +898,20 @@ export declare const hasFails: <E>(self: Cause<E>) => boolean;
825
  * @see {@link findError} — extract the unwrapped `E` value
826
  * @see {@link findDie} — extract the first `Die` reason
827
  *
828
- * @category filters
829
  * @since 4.0.0
830
  */
831
  export declare const findFail: <E>(self: Cause<E>) => Result.Result<Fail<E>, Cause<never>>;
832
  /**
833
- * Returns the first typed error value `E` from a cause.
834
- * Returns `Filter.fail` with the remaining cause when no `Fail` is found.
 
 
835
  *
836
- * Use {@link findFail} if you need the full {@link Fail} reason (including
837
- * annotations). Use {@link findErrorOption} if you prefer an `Option`.
 
 
838
  *
839
  * **Example** (extracting the first error value)
840
  *
@@ -850,16 +927,18 @@ export declare const findFail: <E>(self: Cause<E>) => Result.Result<Fail<E>, Cau
850
  * @see {@link findFail} — extract the full `Fail` reason
851
  * @see {@link findErrorOption} — `Option`-based variant
852
  *
853
- * @category filters
854
  * @since 4.0.0
855
  */
856
  export declare const findError: <E>(self: Cause<E>) => Result.Result<E, Cause<never>>;
857
  /**
858
  * Returns the first typed error value `E` from a cause wrapped in
859
- * `Option.some`, or `Option.none` if no {@link Fail} reason exists.
 
 
860
  *
861
- * This is a convenience wrapper around {@link findError} for code that
862
- * already works with `Option` instead of `Filter`.
863
  *
864
  * **Example** (extracting an error as Option)
865
  *
@@ -873,14 +952,19 @@ export declare const findError: <E>(self: Cause<E>) => Result.Result<E, Cause<ne
873
  * console.log(Option.isNone(none)) // true
874
  * ```
875
  *
876
- * @see {@link findError} — `Filter`-based variant
877
  *
878
- * @category filters
879
  * @since 4.0.0
880
  */
881
  export declare const findErrorOption: <E>(input: Cause<E>) => Option<E>;
882
  /**
883
- * Returns `true` if the cause contains at least one {@link Die} reason.
 
 
 
 
 
884
  *
885
  * **Example** (checking for defects)
886
  *
@@ -895,15 +979,18 @@ export declare const findErrorOption: <E>(input: Cause<E>) => Option<E>;
895
  * @see {@link hasInterrupts} — check for interruptions
896
  *
897
  * @category predicates
898
- * @since 2.0.0
899
  */
900
  export declare const hasDies: <E>(self: Cause<E>) => boolean;
901
  /**
902
- * Returns the first {@link Die} reason from a cause, including its
903
- * annotations. Returns `Filter.fail` with the original cause when no
904
- * `Die` is found.
905
  *
906
- * Use {@link findDefect} if you only need the unwrapped defect value.
 
 
 
907
  *
908
  * **Example** (extracting the first Die reason)
909
  *
@@ -919,17 +1006,19 @@ export declare const hasDies: <E>(self: Cause<E>) => boolean;
919
  * @see {@link findDefect} — extract the unwrapped defect value
920
  * @see {@link findFail} — extract the first `Fail` reason
921
  *
922
- * @category filters
923
  * @since 4.0.0
924
  */
925
  export declare const findDie: <E>(self: Cause<E>) => Result.Result<Die, Cause<E>>;
926
  /**
927
- * Returns the first defect value (`unknown`) from a cause.
928
- * Returns `Filter.fail` with the original cause when no {@link Die} reason
929
- * is found.
 
 
930
  *
931
- * Use {@link findDie} if you need the full `Die` reason (including
932
- * annotations).
933
  *
934
  * **Example** (extracting the first defect)
935
  *
@@ -945,12 +1034,12 @@ export declare const findDie: <E>(self: Cause<E>) => Result.Result<Die, Cause<E>
945
  * @see {@link findDie} — extract the full `Die` reason
946
  * @see {@link findError} — extract the first typed error
947
  *
948
- * @category filters
949
  * @since 4.0.0
950
  */
951
  export declare const findDefect: <E>(self: Cause<E>) => Result.Result<unknown, Cause<E>>;
952
  /**
953
- * Returns `true` if the cause contains at least one {@link Interrupt} reason.
954
  *
955
  * **Example** (checking for interruptions)
956
  *
@@ -966,13 +1055,18 @@ export declare const findDefect: <E>(self: Cause<E>) => Result.Result<unknown, C
966
  * @see {@link hasDies} — check for defects
967
  *
968
  * @category predicates
969
- * @since 2.0.0
970
  */
971
  export declare const hasInterrupts: <E>(self: Cause<E>) => boolean;
972
  /**
973
- * Returns the first {@link Interrupt} reason from a cause, including its
974
- * annotations. Returns `Filter.fail` with the original cause when no
975
- * `Interrupt` is found.
 
 
 
 
 
976
  *
977
  * **Example** (extracting the first interrupt)
978
  *
@@ -987,16 +1081,19 @@ export declare const hasInterrupts: <E>(self: Cause<E>) => boolean;
987
  *
988
  * @see {@link interruptors} — collect all interrupting fiber IDs as a `Set`
989
  *
990
- * @category filters
991
  * @since 4.0.0
992
  */
993
  export declare const findInterrupt: <E>(self: Cause<E>) => Result.Result<Interrupt, Cause<E>>;
994
  /**
995
- * Collects the fiber IDs of all {@link Interrupt} reasons in the cause into
996
- * a `ReadonlySet`. Returns an empty set when the cause has no interrupts.
 
 
 
997
  *
998
- * This always succeeds (no `Filter.fail`). Use {@link filterInterruptors}
999
- * for the `Filter`-based variant.
1000
  *
1001
  * **Example** (collecting interruptors)
1002
  *
@@ -1007,45 +1104,61 @@ export declare const findInterrupt: <E>(self: Cause<E>) => Result.Result<Interru
1007
  * Cause.interrupt(1),
1008
  * Cause.interrupt(2)
1009
  * )
1010
- * console.log(Cause.interruptors(cause)) // Set { 1, 2 }
 
1011
  * ```
1012
  *
1013
- * @see {@link filterInterruptors} — `Filter`-based variant
1014
  *
1015
  * @category accessors
1016
- * @since 4.0.0
1017
  */
1018
  export declare const interruptors: <E>(self: Cause<E>) => ReadonlySet<number>;
1019
  /**
1020
- * Extracts the set of interrupting fiber IDs from a cause.
1021
- * Returns `Filter.fail` with the original cause when no {@link Interrupt}
1022
- * reason is found.
 
 
1023
  *
1024
- * Use {@link interruptors} if you always want a `Set` (possibly empty)
1025
- * without `Filter` wrapping.
1026
  *
1027
- * **Example** (extracting interruptors with Filter)
 
 
 
 
 
 
1028
  *
1029
  * ```ts
1030
  * import { Cause, Result } from "effect"
1031
  *
1032
  * const result = Cause.filterInterruptors(Cause.interrupt(1))
1033
  * if (!Result.isFailure(result)) {
1034
- * console.log(result.success) // Set { 1 }
1035
  * }
1036
  * ```
1037
  *
1038
  * @see {@link interruptors} — always-succeeding variant
1039
  *
1040
- * @category filters
1041
  * @since 4.0.0
1042
  */
1043
  export declare const filterInterruptors: <E>(self: Cause<E>) => Result.Result<Set<number>, Cause<E>>;
1044
  /**
1045
- * Converts a {@link Cause} into an `Array<Error>` suitable for logging or
1046
  * rethrowing.
1047
  *
1048
- * Each {@link Fail} and {@link Die} reason is converted into a standard
 
 
 
 
 
 
 
1049
  * `Error`:
1050
  *
1051
  * - **Objects / Error instances** — `message`, `name`, `stack`, and `cause`
@@ -1055,10 +1168,12 @@ export declare const filterInterruptors: <E>(self: Cause<E>) => Result.Result<Se
1055
  * - **Other primitives** (`null`, `undefined`, numbers, …) — wrapped in an
1056
  * `Error` with message `"Unknown error: <value>"`.
1057
  *
1058
- * {@link Interrupt} reasons are collected separately. If the cause contains
1059
  * **only** interrupts (no `Fail` or `Die`), a single `InterruptError` is
1060
  * returned whose `cause` lists the interrupting fiber IDs.
1061
  *
 
 
1062
  * **Example** (converting a cause to errors)
1063
  *
1064
  * ```ts
@@ -1072,13 +1187,19 @@ export declare const filterInterruptors: <E>(self: Cause<E>) => Result.Result<Se
1072
  * @see {@link pretty} — renders the cause as a single string
1073
  * @see {@link squash} — lossy collapse to a single thrown value
1074
  *
1075
- * @since 4.0.0
1076
  * @category rendering
 
1077
  */
1078
  export declare const prettyErrors: <E>(self: Cause<E>) => Array<Error>;
1079
  /**
1080
- * Renders a {@link Cause} as a human-readable string for logging or
1081
- * debugging.
 
 
 
 
 
 
1082
  *
1083
  * Delegates to {@link prettyErrors} to convert each reason to an `Error`,
1084
  * then joins their stack traces with newlines. Nested `Error.cause` chains
@@ -1095,32 +1216,36 @@ export declare const prettyErrors: <E>(self: Cause<E>) => Array<Error>;
1095
  *
1096
  * Span annotations are appended to the relevant stack frames when available.
1097
  *
 
 
 
 
 
1098
  * **Example** (rendering a cause)
1099
  *
1100
  * ```ts
1101
  * import { Cause } from "effect"
1102
  *
1103
- * const cause = Cause.fail("something went wrong")
1104
- * console.log(Cause.pretty(cause))
1105
- * // Error: something went wrong
1106
- * // at ...
1107
  * ```
1108
  *
1109
  * @see {@link prettyErrors} — get the individual `Error` instances
1110
  *
1111
- * @since 4.0.0
1112
  * @category rendering
 
1113
  */
1114
  export declare const pretty: <E>(cause: Cause<E>) => string;
1115
  /**
1116
  * Base interface for error classes that can be yielded directly inside
1117
- * `Effect.gen` (via `Symbol.iterator`) or converted to a failing Effect
1118
- * via `.asEffect()`.
 
 
1119
  *
1120
- * All built-in error classes in this module ({@link NoSuchElementError},
1121
- * {@link TimeoutError}, {@link IllegalArgumentError},
1122
- * {@link ExceededCapacityError}, {@link UnknownError}) extend this
1123
- * interface.
1124
  *
1125
  * **Example** (yielding an error in Effect.gen)
1126
  *
@@ -1134,15 +1259,15 @@ export declare const pretty: <E>(cause: Cause<E>) => string;
1134
  * })
1135
  * ```
1136
  *
1137
- * @since 2.0.0
1138
  * @category errors
 
1139
  */
1140
- export interface YieldableError extends Error, Pipeable {
1141
- [Symbol.iterator](): Effect.EffectIterator<this>;
1142
- asEffect(): Effect.Effect<never, this, never>;
1143
  }
1144
  /**
1145
- * Tests if an arbitrary value is a {@link NoSuchElementError}.
1146
  *
1147
  * **Example** (runtime type check)
1148
  *
@@ -1158,19 +1283,31 @@ export interface YieldableError extends Error, Pipeable {
1158
  */
1159
  export declare const isNoSuchElementError: (u: unknown) => u is NoSuchElementError;
1160
  /**
1161
- * Unique brand for {@link NoSuchElementError}.
1162
  *
 
1163
  * @since 4.0.0
1164
- * @category symbols
1165
  */
1166
  export declare const NoSuchElementErrorTypeId: "~effect/Cause/NoSuchElementError";
1167
  /**
1168
- * An error indicating that a requested element does not exist.
1169
  *
1170
- * Thrown by APIs like `Array.head`, `Option.getOrThrow`, `Map.get`, etc.
1171
- * when no element matches. Implements {@link YieldableError} so it can be
 
 
 
 
 
 
1172
  * yielded directly in `Effect.gen`.
1173
  *
 
 
 
 
 
 
1174
  * **Example** (creating and checking)
1175
  *
1176
  * ```ts
@@ -1181,18 +1318,20 @@ export declare const NoSuchElementErrorTypeId: "~effect/Cause/NoSuchElementError
1181
  * console.log(error.message) // "Element not found"
1182
  * ```
1183
  *
1184
- * @see {@link isNoSuchElementError} — type guard
1185
- * @see {@link NoSuchElementError:var | NoSuchElementError constructor}
1186
- *
1187
- * @since 4.0.0
1188
  * @category errors
 
1189
  */
1190
  export interface NoSuchElementError extends YieldableError {
1191
  readonly [NoSuchElementErrorTypeId]: typeof NoSuchElementErrorTypeId;
1192
  readonly _tag: "NoSuchElementError";
1193
  }
1194
  /**
1195
- * Constructs a {@link NoSuchElementError} with an optional message.
 
 
 
 
 
1196
  *
1197
  * **Example** (creating a NoSuchElementError)
1198
  *
@@ -1203,12 +1342,14 @@ export interface NoSuchElementError extends YieldableError {
1203
  * console.log(error.message) // "Element not found"
1204
  * ```
1205
  *
 
 
1206
  * @category constructors
1207
  * @since 4.0.0
1208
  */
1209
  export declare const NoSuchElementError: new (message?: string) => NoSuchElementError;
1210
  /**
1211
- * Tests if an arbitrary value is a {@link Done} signal.
1212
  *
1213
  * **Example** (runtime type check)
1214
  *
@@ -1224,15 +1365,22 @@ export declare const NoSuchElementError: new (message?: string) => NoSuchElement
1224
  */
1225
  export declare const isDone: (u: unknown) => u is Done<any>;
1226
  /**
1227
- * Unique brand for {@link Done} values.
1228
  *
 
1229
  * @since 4.0.0
1230
- * @category symbols
1231
  */
1232
  export declare const DoneTypeId: "~effect/Cause/Done";
1233
  /**
1234
  * A graceful completion signal for queues and streams.
1235
  *
 
 
 
 
 
 
 
1236
  * `Done` indicates that a producer has finished normally — no more elements
1237
  * will arrive. It is distinct from an error or interruption; it represents
1238
  * successful completion. The optional `value` field can carry a final
@@ -1253,11 +1401,8 @@ export declare const DoneTypeId: "~effect/Cause/Done";
1253
  * })
1254
  * ```
1255
  *
1256
- * @see {@link isDone} — type guard
1257
- * @see {@link done} — create a failing Effect with `Done`
1258
- *
1259
- * @since 4.0.0
1260
  * @category errors
 
1261
  */
1262
  export interface Done<A = void> {
1263
  readonly [DoneTypeId]: typeof DoneTypeId;
@@ -1265,28 +1410,33 @@ export interface Done<A = void> {
1265
  readonly value: A;
1266
  }
1267
  /**
1268
- * Companion namespace for the {@link Done} interface.
1269
  *
1270
  * @since 4.0.0
1271
- * @category errors
1272
  */
1273
  export declare namespace Done {
1274
  /**
1275
  * Extracts the value type `A` from a `Done<A>` that may be nested in an
1276
  * error union.
1277
  *
 
1278
  * @since 4.0.0
1279
  */
1280
  type Extract<E> = E extends Done<infer L> ? L : never;
1281
  /**
1282
  * Filters a type union to only keep `Done` members.
1283
  *
 
1284
  * @since 4.0.0
1285
  */
1286
  type Only<E> = E extends Done<infer L> ? Done<L> : never;
1287
  }
1288
  /**
1289
- * Creates a {@link Done} signal with an optional value.
 
 
 
 
1290
  *
1291
  * @see {@link done} — create a failing `Effect` with `Done`
1292
  *
@@ -1295,24 +1445,40 @@ export declare namespace Done {
1295
  */
1296
  export declare const Done: <A = void>(value?: A) => Done<A>;
1297
  /**
1298
- * Creates an Effect that fails with a {@link Done} error. Shorthand for
1299
  * `Effect.fail(Cause.Done(value))`.
1300
  *
1301
- * @see {@link Done:var | Done} — create the signal value without an Effect
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1302
  *
1303
  * @category constructors
1304
  * @since 4.0.0
1305
  */
1306
  export declare const done: <A = void>(value?: A) => Effect.Effect<never, Done<A>>;
1307
  /**
1308
- * Unique brand for {@link TimeoutError}.
1309
  *
 
1310
  * @since 4.0.0
1311
- * @category symbols
1312
  */
1313
  export declare const TimeoutErrorTypeId: "~effect/Cause/TimeoutError";
1314
  /**
1315
- * Tests if an arbitrary value is a {@link TimeoutError}.
1316
  *
1317
  * **Example** (runtime type check)
1318
  *
@@ -1330,8 +1496,10 @@ export declare const isTimeoutError: (u: unknown) => u is TimeoutError;
1330
  /**
1331
  * An error indicating that an operation exceeded its time limit.
1332
  *
 
 
1333
  * Produced by `Effect.timeout` and related APIs. Implements
1334
- * {@link YieldableError}.
1335
  *
1336
  * **Example** (creating and checking)
1337
  *
@@ -1343,17 +1511,15 @@ export declare const isTimeoutError: (u: unknown) => u is TimeoutError;
1343
  * console.log(error.message) // "Operation timed out"
1344
  * ```
1345
  *
1346
- * @see {@link isTimeoutError} — type guard
1347
- *
1348
- * @since 4.0.0
1349
  * @category errors
 
1350
  */
1351
  export interface TimeoutError extends YieldableError {
1352
  readonly [TimeoutErrorTypeId]: typeof TimeoutErrorTypeId;
1353
  readonly _tag: "TimeoutError";
1354
  }
1355
  /**
1356
- * Constructs a {@link TimeoutError} with an optional message.
1357
  *
1358
  * **Example** (creating a TimeoutError)
1359
  *
@@ -1369,14 +1535,14 @@ export interface TimeoutError extends YieldableError {
1369
  */
1370
  export declare const TimeoutError: new (message?: string) => TimeoutError;
1371
  /**
1372
- * Unique brand for {@link IllegalArgumentError}.
1373
  *
 
1374
  * @since 4.0.0
1375
- * @category symbols
1376
  */
1377
  export declare const IllegalArgumentErrorTypeId: "~effect/Cause/IllegalArgumentError";
1378
  /**
1379
- * Tests if an arbitrary value is an {@link IllegalArgumentError}.
1380
  *
1381
  * **Example** (runtime type check)
1382
  *
@@ -1395,7 +1561,9 @@ export declare const isIllegalArgumentError: (u: unknown) => u is IllegalArgumen
1395
  * An error indicating that a function received an argument that violates
1396
  * its contract (e.g. negative where positive was expected).
1397
  *
1398
- * Implements {@link YieldableError}.
 
 
1399
  *
1400
  * **Example** (creating and checking)
1401
  *
@@ -1407,17 +1575,15 @@ export declare const isIllegalArgumentError: (u: unknown) => u is IllegalArgumen
1407
  * console.log(error.message) // "Expected positive number"
1408
  * ```
1409
  *
1410
- * @see {@link isIllegalArgumentError} — type guard
1411
- *
1412
- * @since 4.0.0
1413
  * @category errors
 
1414
  */
1415
  export interface IllegalArgumentError extends YieldableError {
1416
  readonly [IllegalArgumentErrorTypeId]: typeof IllegalArgumentErrorTypeId;
1417
  readonly _tag: "IllegalArgumentError";
1418
  }
1419
  /**
1420
- * Constructs an {@link IllegalArgumentError} with an optional message.
1421
  *
1422
  * **Example** (creating an IllegalArgumentError)
1423
  *
@@ -1433,7 +1599,7 @@ export interface IllegalArgumentError extends YieldableError {
1433
  */
1434
  export declare const IllegalArgumentError: new (message?: string) => IllegalArgumentError;
1435
  /**
1436
- * Tests if an arbitrary value is an {@link ExceededCapacityError}.
1437
  *
1438
  * **Example** (runtime type check)
1439
  *
@@ -1449,17 +1615,24 @@ export declare const IllegalArgumentError: new (message?: string) => IllegalArgu
1449
  */
1450
  export declare const isExceededCapacityError: (u: unknown) => u is ExceededCapacityError;
1451
  /**
1452
- * Unique brand for {@link ExceededCapacityError}.
1453
  *
 
1454
  * @since 4.0.0
1455
- * @category symbols
1456
  */
1457
  export declare const ExceededCapacityErrorTypeId: "~effect/Cause/ExceededCapacityError";
1458
  /**
1459
  * An error indicating that a bounded resource (queue, pool, semaphore, etc.)
1460
  * has exceeded its capacity.
1461
  *
1462
- * Implements {@link YieldableError}.
 
 
 
 
 
 
 
1463
  *
1464
  * **Example** (creating and checking)
1465
  *
@@ -1471,17 +1644,19 @@ export declare const ExceededCapacityErrorTypeId: "~effect/Cause/ExceededCapacit
1471
  * console.log(error.message) // "Queue full"
1472
  * ```
1473
  *
1474
- * @see {@link isExceededCapacityError} — type guard
1475
- *
1476
- * @since 4.0.0
1477
  * @category errors
 
1478
  */
1479
  export interface ExceededCapacityError extends YieldableError {
1480
  readonly [ExceededCapacityErrorTypeId]: typeof ExceededCapacityErrorTypeId;
1481
  readonly _tag: "ExceededCapacityError";
1482
  }
1483
  /**
1484
- * Constructs an {@link ExceededCapacityError} with an optional message.
 
 
 
 
1485
  *
1486
  * **Example** (creating an ExceededCapacityError)
1487
  *
@@ -1492,18 +1667,36 @@ export interface ExceededCapacityError extends YieldableError {
1492
  * console.log(error.message) // "Queue full"
1493
  * ```
1494
  *
 
 
1495
  * @category constructors
1496
  * @since 4.0.0
1497
  */
1498
  export declare const ExceededCapacityError: new (message?: string) => ExceededCapacityError;
1499
  /**
1500
- * Unique brand for {@link AsyncFiberError}.
 
1501
  *
 
1502
  * @since 4.0.0
1503
- * @category symbols
1504
  */
1505
  export declare const AsyncFiberErrorTypeId: "~effect/Cause/AsyncFiberError";
1506
  /**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1507
  * @category guards
1508
  * @since 4.0.0
1509
  */
@@ -1511,8 +1704,31 @@ export declare const isAsyncFiberError: (u: unknown) => u is AsyncFiberError;
1511
  /**
1512
  * An error that occurs when trying to run an async fiber with Effect.runSync.
1513
  *
1514
- * @since 4.0.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1515
  * @category errors
 
1516
  */
1517
  export interface AsyncFiberError extends YieldableError {
1518
  readonly [AsyncFiberErrorTypeId]: typeof AsyncFiberErrorTypeId;
@@ -1520,21 +1736,41 @@ export interface AsyncFiberError extends YieldableError {
1520
  readonly fiber: Fiber<unknown, unknown>;
1521
  }
1522
  /**
1523
- * An error that occurs when trying to run an async fiber with Effect.runSync.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1524
  *
1525
  * @category constructors
1526
  * @since 4.0.0
1527
  */
1528
  export declare const AsyncFiberError: new (fiber: Fiber<unknown, unknown>) => AsyncFiberError;
1529
  /**
1530
- * Unique brand for {@link UnknownError}.
1531
  *
 
1532
  * @since 4.0.0
1533
- * @category symbols
1534
  */
1535
  export declare const UnknownErrorTypeId: "~effect/Cause/UnknownError";
1536
  /**
1537
- * Tests if an arbitrary value is an {@link UnknownError}.
1538
  *
1539
  * **Example** (runtime type check)
1540
  *
@@ -1552,9 +1788,11 @@ export declare const isUnknownError: (u: unknown) => u is UnknownError;
1552
  /**
1553
  * A wrapper for errors whose type is not statically known.
1554
  *
1555
- * Produced by the runtime when an effect throws a non-`Error` value.
1556
- * The original thrown value is stored in the `cause` property (inherited
1557
- * from `Error`). Implements {@link YieldableError}.
 
 
1558
  *
1559
  * **Example** (creating and checking)
1560
  *
@@ -1566,17 +1804,15 @@ export declare const isUnknownError: (u: unknown) => u is UnknownError;
1566
  * console.log(error.message) // "Something unknown"
1567
  * ```
1568
  *
1569
- * @see {@link isUnknownError} — type guard
1570
- *
1571
- * @since 4.0.0
1572
  * @category errors
 
1573
  */
1574
  export interface UnknownError extends YieldableError {
1575
  readonly [UnknownErrorTypeId]: typeof UnknownErrorTypeId;
1576
  readonly _tag: "UnknownError";
1577
  }
1578
  /**
1579
- * Constructs an {@link UnknownError}. The first argument is the original
1580
  * cause (stored in `Error.cause`); the second is an optional human-readable
1581
  * message.
1582
  *
@@ -1594,13 +1830,19 @@ export interface UnknownError extends YieldableError {
1594
  */
1595
  export declare const UnknownError: new (cause: unknown, message?: string) => UnknownError;
1596
  /**
1597
- * Attaches metadata to every reason in a {@link Cause}.
 
 
 
 
 
 
1598
  *
1599
  * Annotations are stored as a `Context` on each reason and can be
1600
  * retrieved later via {@link reasonAnnotations} or {@link annotations}.
1601
  * The runtime uses this to attach stack traces and spans.
1602
  *
1603
- * - Returns a new `Cause`; does not mutate the input.
1604
  * - By default, existing keys are preserved. Pass `{ overwrite: true }` to
1605
  * replace them.
1606
  *
@@ -1609,25 +1851,35 @@ export declare const UnknownError: new (cause: unknown, message?: string) => Unk
1609
  * ```ts
1610
  * import { Cause, Context } from "effect"
1611
  *
 
 
1612
  * const cause = Cause.fail("error")
1613
- * const annotated = Cause.annotate(cause, Context.empty())
 
 
1614
  * ```
1615
  *
1616
- * @see {@link annotations} — read merged annotations from a cause
1617
- * @see {@link reasonAnnotations} — read annotations from a single reason
1618
  *
1619
  * @category annotations
1620
  * @since 4.0.0
1621
  */
1622
  export declare const annotate: {
1623
  /**
1624
- * Attaches metadata to every reason in a {@link Cause}.
 
 
 
 
 
 
1625
  *
1626
  * Annotations are stored as a `Context` on each reason and can be
1627
  * retrieved later via {@link reasonAnnotations} or {@link annotations}.
1628
  * The runtime uses this to attach stack traces and spans.
1629
  *
1630
- * - Returns a new `Cause`; does not mutate the input.
1631
  * - By default, existing keys are preserved. Pass `{ overwrite: true }` to
1632
  * replace them.
1633
  *
@@ -1636,12 +1888,16 @@ export declare const annotate: {
1636
  * ```ts
1637
  * import { Cause, Context } from "effect"
1638
  *
 
 
1639
  * const cause = Cause.fail("error")
1640
- * const annotated = Cause.annotate(cause, Context.empty())
 
 
1641
  * ```
1642
  *
1643
- * @see {@link annotations} — read merged annotations from a cause
1644
- * @see {@link reasonAnnotations} — read annotations from a single reason
1645
  *
1646
  * @category annotations
1647
  * @since 4.0.0
@@ -1650,13 +1906,19 @@ export declare const annotate: {
1650
  readonly overwrite?: boolean | undefined;
1651
  }): <E>(self: Cause<E>) => Cause<E>;
1652
  /**
1653
- * Attaches metadata to every reason in a {@link Cause}.
 
 
 
 
 
 
1654
  *
1655
  * Annotations are stored as a `Context` on each reason and can be
1656
  * retrieved later via {@link reasonAnnotations} or {@link annotations}.
1657
  * The runtime uses this to attach stack traces and spans.
1658
  *
1659
- * - Returns a new `Cause`; does not mutate the input.
1660
  * - By default, existing keys are preserved. Pass `{ overwrite: true }` to
1661
  * replace them.
1662
  *
@@ -1665,12 +1927,16 @@ export declare const annotate: {
1665
  * ```ts
1666
  * import { Cause, Context } from "effect"
1667
  *
 
 
1668
  * const cause = Cause.fail("error")
1669
- * const annotated = Cause.annotate(cause, Context.empty())
 
 
1670
  * ```
1671
  *
1672
- * @see {@link annotations} — read merged annotations from a cause
1673
- * @see {@link reasonAnnotations} — read annotations from a single reason
1674
  *
1675
  * @category annotations
1676
  * @since 4.0.0
@@ -1680,25 +1946,60 @@ export declare const annotate: {
1680
  }): Cause<E>;
1681
  };
1682
  /**
1683
- * Reads the annotations from a single {@link Reason} as a `Context`.
 
 
1684
  *
1685
- * Use this when you need tracing metadata (e.g. {@link StackTrace}) from
1686
  * a specific reason rather than the whole cause.
1687
  *
 
 
 
 
 
 
 
 
 
 
 
 
 
1688
  * @see {@link annotations} — merged annotations from all reasons in a cause
1689
- * @see {@link annotate} — attach annotations
1690
  *
1691
  * @category annotations
1692
  * @since 4.0.0
1693
  */
1694
  export declare const reasonAnnotations: <E>(self: Reason<E>) => Context.Context<never>;
1695
  /**
1696
- * Reads the merged annotations from all reasons in a {@link Cause}.
 
 
 
 
 
 
1697
  *
1698
- * Annotations from later reasons overwrite earlier ones when keys collide.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1699
  *
1700
  * @see {@link reasonAnnotations} — annotations from a single reason
1701
- * @see {@link annotate} — attach annotations
1702
  *
1703
  * @category annotations
1704
  * @since 4.0.0
@@ -1706,12 +2007,23 @@ export declare const reasonAnnotations: <E>(self: Reason<E>) => Context.Context<
1706
  export declare const annotations: <E>(self: Cause<E>) => Context.Context<never>;
1707
  declare const StackTrace_base: Context.ServiceClass<StackTrace, "effect/Cause/StackTrace", StackFrame>;
1708
  /**
1709
- * `Context` key for the stack frame captured at the point of failure.
 
 
 
 
 
 
 
1710
  *
1711
  * The runtime annotates every reason with this when a stack frame is
1712
  * available. Retrieve it via
1713
  * `Context.get(Cause.reasonAnnotations(reason), Cause.StackTrace)`.
1714
  *
 
 
 
 
1715
  * @category annotations
1716
  * @since 4.0.0
1717
  */
@@ -1719,10 +2031,21 @@ export declare class StackTrace extends StackTrace_base {
1719
  }
1720
  declare const InterruptorStackTrace_base: Context.ServiceClass<InterruptorStackTrace, "effect/Cause/InterruptorStackTrace", StackFrame>;
1721
  /**
1722
- * `Context` key for the stack frame captured at the point of
1723
  * interruption.
1724
  *
1725
- * Similar to {@link StackTrace} but specific to {@link Interrupt} reasons.
 
 
 
 
 
 
 
 
 
 
 
1726
  *
1727
  * @category annotations
1728
  * @since 4.0.0
 
1
  /**
2
+ * Records the full reason an `Effect` failed.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  *
4
+ * A `Cause<E>` can contain typed failures, unexpected defects, interruptions,
5
+ * and annotations. Keeping those details together lets code inspect or format
6
+ * failures without first collapsing them to a single error value. This module
7
+ * includes the `Cause` and `Reason` data types, helpers for building and
8
+ * checking causes, and small error types used by several Effect APIs.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  *
10
  * @since 2.0.0
11
  */
 
22
  /**
23
  * Unique brand for `Cause` values, used for runtime type checks via {@link isCause}.
24
  *
25
+ * @category type IDs
26
+ * @since 4.0.0
27
  */
28
  export declare const TypeId: "~effect/Cause";
29
  /**
30
  * Unique brand for `Reason` values, used for runtime type checks via {@link isReason}.
31
  *
32
+ * @category type IDs
33
+ * @since 4.0.0
34
  */
35
  export declare const ReasonTypeId: "~effect/Cause/Reason";
36
  /**
37
  * A structured representation of how an Effect failed.
38
  *
39
+ * **When to use**
40
+ *
41
+ * Use to preserve the full structured failure information for an effect instead
42
+ * of collapsing it to a single error value.
43
+ *
44
+ * **Details**
45
+ *
46
  * Access the individual failure entries through the `reasons` array, then
47
  * narrow each entry with {@link isFailReason}, {@link isDieReason}, or
48
  * {@link isInterruptReason}.
 
66
  * console.log(Cause.isFailReason(cause.reasons[0])) // true
67
  * ```
68
  *
 
 
 
69
  * @category models
70
+ * @since 2.0.0
71
  */
72
  export interface Cause<out E> extends Pipeable, Inspectable, Equal {
73
  readonly [TypeId]: typeof TypeId;
74
  readonly reasons: ReadonlyArray<Reason<E>>;
75
  }
76
  /**
77
+ * Checks whether an arbitrary value is a `Cause`.
78
  *
79
  * **Example** (runtime type check)
80
  *
 
90
  */
91
  export declare const isCause: (self: unknown) => self is Cause<unknown>;
92
  /**
93
+ * Checks whether an arbitrary value is a `Reason` (`Fail`, `Die`, or `Interrupt`).
94
  *
95
  * **Example** (runtime type check)
96
  *
 
103
  * ```
104
  *
105
  * @category guards
106
+ * @since 4.0.0
107
  */
108
  export declare const isReason: (self: unknown) => self is Reason<unknown>;
109
  /**
110
+ * A single entry inside a `Cause`'s `reasons` array.
111
+ *
112
+ * **Details**
113
  *
114
  * Narrow to a concrete type with {@link isFailReason}, {@link isDieReason},
115
  * or {@link isInterruptReason}.
 
132
  * }
133
  * ```
134
  *
 
 
 
 
 
135
  * @category models
136
+ * @since 4.0.0
137
  */
138
  export type Reason<E> = Fail<E> | Die | Interrupt;
139
  /**
140
+ * Narrows a `Reason` to `Fail`.
141
+ *
142
+ * **When to use**
143
  *
144
+ * Use as a predicate for `Array.filter` to pick out typed `Fail` reasons when
145
+ * iterating over `cause.reasons`.
146
  *
147
  * **Example** (filtering fail reasons)
148
  *
 
162
  */
163
  export declare const isFailReason: <E>(self: Reason<E>) => self is Fail<E>;
164
  /**
165
+ * Narrows a `Reason` to `Die`.
166
  *
167
+ * **When to use**
168
+ *
169
+ * Use as a predicate for `Array.filter` to pick out `Die` (defect) reasons when
170
+ * iterating over `cause.reasons`.
171
  *
172
  * **Example** (filtering die reasons)
173
  *
 
187
  */
188
  export declare const isDieReason: <E>(self: Reason<E>) => self is Die;
189
  /**
190
+ * Narrows a `Reason` to `Interrupt`.
191
+ *
192
+ * **When to use**
193
  *
194
+ * Use as a predicate for `Array.filter` to pick out `Interrupt` reasons when
195
+ * iterating over `cause.reasons`.
196
  *
197
  * **Example** (filtering interrupt reasons)
198
  *
 
212
  */
213
  export declare const isInterruptReason: <E>(self: Reason<E>) => self is Interrupt;
214
  /**
215
+ * Companion namespace for the `Cause` interface.
216
  *
217
  * @since 2.0.0
 
218
  */
219
  export declare namespace Cause {
220
  /**
 
229
  * type E = Cause.Cause.Error<Cause.Cause<string>>
230
  * ```
231
  *
 
232
  * @category models
233
+ * @since 4.0.0
234
  */
235
  type Error<T> = T extends Cause<infer E> ? E : never;
236
  /**
237
+ * Base interface shared by all reason types (`Fail`, `Die`, `Interrupt`).
238
+ *
239
+ * **Details**
240
  *
241
  * Every reason carries:
242
  * - `_tag` — discriminant string (`"Fail"`, `"Die"`, or `"Interrupt"`)
243
  * - `annotations` — tracing metadata attached by the runtime
244
  * - `annotate()` — returns a copy with additional annotations
245
  *
 
246
  * @category models
247
+ * @since 4.0.0
248
  */
249
  interface ReasonProto<Tag extends string> extends Inspectable, Equal {
250
  readonly [ReasonTypeId]: typeof ReasonTypeId;
 
256
  }
257
  }
258
  /**
259
+ * Companion namespace for the `Reason` type.
260
  *
261
+ * @since 4.0.0
 
262
  */
263
  export declare namespace Reason {
264
  /**
 
273
  * type E = Cause.Reason.Error<Cause.Reason<string>>
274
  * ```
275
  *
 
276
  * @category models
277
+ * @since 4.0.0
278
  */
279
  type Error<T> = T extends Reason<infer E> ? E : never;
280
  }
281
  /**
282
  * An untyped defect — typically a programming error or an uncaught exception.
283
  *
284
+ * **When to use**
285
+ *
286
+ * Use when inspecting `Cause` reasons that represent defects instead of typed
287
+ * failures or interruptions.
288
+ *
289
+ * **Details**
290
+ *
291
  * The `defect` property is `unknown` because defects are not part of the
292
+ * typed error channel. Use {@link isDieReason} to narrow a `Reason`
293
  * to this type.
294
  *
295
  * **Example** (accessing the defect)
 
297
  * ```ts
298
  * import { Cause } from "effect"
299
  *
300
+ * const cause = Cause.die("Unexpected")
301
  * const reason = cause.reasons[0]
302
  * if (Cause.isDieReason(reason)) {
303
+ * console.log(reason.defect) // "Unexpected"
304
  * }
305
  * ```
306
  *
307
+ * @see {@link die} for constructing a cause with a single `Die` reason
308
+ * @see {@link isDieReason} for narrowing a `Reason` to `Die`
309
  *
 
310
  * @category models
311
+ * @since 2.0.0
312
  */
313
  export interface Die extends Cause.ReasonProto<"Die"> {
314
  readonly defect: unknown;
 
316
  /**
317
  * A typed, expected error produced by `Effect.fail`.
318
  *
319
+ * **When to use**
320
+ *
321
+ * Use when inspecting `Cause` reasons that represent expected failures from the
322
+ * typed error channel.
323
+ *
324
+ * **Details**
325
+ *
326
  * The `error` property carries the typed value `E`. Use {@link isFailReason}
327
+ * to narrow a `Reason` to this type.
328
  *
329
  * **Example** (accessing the error)
330
  *
 
338
  * }
339
  * ```
340
  *
341
+ * @see {@link fail} for constructing a cause with a single `Fail` reason
342
+ * @see {@link isFailReason} for narrowing a `Reason` to `Fail`
343
  *
 
344
  * @category models
345
+ * @since 2.0.0
346
  */
347
  export interface Fail<out E> extends Cause.ReasonProto<"Fail"> {
348
  readonly error: E;
 
351
  * A fiber interruption signal, optionally carrying the ID of the fiber that
352
  * initiated the interruption.
353
  *
354
+ * **Details**
355
+ *
356
+ * Use {@link isInterruptReason} to narrow a `Reason` to this type.
357
  *
358
  * **Example** (accessing the fiber ID)
359
  *
 
367
  * }
368
  * ```
369
  *
 
 
 
 
370
  * @category models
371
+ * @since 2.0.0
372
  */
373
  export interface Interrupt extends Cause.ReasonProto<"Interrupt"> {
374
  readonly fiberId: number | undefined;
375
  }
376
  /**
377
+ * Creates a `Cause` from an array of `Reason` values.
378
  *
379
+ * **When to use**
380
+ *
381
+ * Use when you already have individual reasons (e.g. from filtering or
382
  * transforming another cause's `reasons` array) and need to wrap them back
383
  * into a `Cause`.
384
  *
385
+ * **Details**
386
+ *
387
+ * - Returns a new `Cause`.
388
+ * - An empty array produces a cause equivalent to `empty`.
389
+ *
390
+ * **Gotchas**
391
+ *
392
+ * The `reasons` array is stored as provided. Treat the array as immutable
393
+ * after passing it to this function.
394
  *
395
  * **Example** (building a cause from reasons)
396
  *
 
408
  * @see {@link combine} — merge two existing causes
409
  *
410
  * @category constructors
411
+ * @since 4.0.0
412
  */
413
  export declare const fromReasons: <E>(reasons: ReadonlyArray<Reason<E>>) => Cause<E>;
414
  /**
415
+ * Represents a `Cause` with an empty `reasons` array.
416
+ *
417
+ * **When to use**
418
+ *
419
+ * Use to represent the absence of failure when constructing or combining
420
+ * causes.
421
+ *
422
+ * **Details**
423
  *
424
  * Represents the absence of failure. Combining any cause with `empty` via
425
  * {@link combine} returns the original cause unchanged.
426
  *
427
+ * **Example** (combining with the empty cause)
428
+ *
429
+ * ```ts
430
+ * import { Cause } from "effect"
431
+ *
432
+ * const cause = Cause.combine(Cause.empty, Cause.fail("boom"))
433
+ *
434
+ * console.log(cause.reasons.length) // 1
435
+ * console.log(Cause.hasFails(cause)) // true
436
+ * ```
437
+ *
438
+ * @see {@link combine} for merging causes where `empty` acts as the identity
439
  *
440
  * @category constructors
441
  * @since 2.0.0
442
  */
443
  export declare const empty: Cause<never>;
444
  /**
445
+ * Creates a `Cause` containing a single `Fail` reason with the
446
  * given typed error.
447
  *
448
+ * **When to use**
449
+ *
450
+ * Use to construct a cause from an expected typed error.
451
+ *
452
  * **Example** (creating a fail cause)
453
  *
454
  * ```ts
 
467
  */
468
  export declare const fail: <E>(error: E) => Cause<E>;
469
  /**
470
+ * Creates a `Cause` containing a single `Die` reason with the
471
  * given defect.
472
  *
473
+ * **When to use**
474
+ *
475
+ * Use to construct a cause from an untyped defect or unexpected thrown value.
476
+ *
477
  * **Example** (creating a die cause)
478
  *
479
  * ```ts
480
  * import { Cause } from "effect"
481
  *
482
+ * const cause = Cause.die("Unexpected")
483
  * console.log(cause.reasons.length) // 1
484
  * console.log(Cause.isDieReason(cause.reasons[0])) // true
485
  * ```
 
492
  */
493
  export declare const die: (defect: unknown) => Cause<never>;
494
  /**
495
+ * Creates a `Cause` containing a single `Interrupt` reason,
496
  * optionally carrying the interrupting fiber's ID.
497
  *
498
  * **Example** (creating an interrupt cause)
 
513
  */
514
  export declare const interrupt: (fiberId?: number | undefined) => Cause<never>;
515
  /**
516
+ * Creates a standalone `Fail` reason (not wrapped in a `Cause`).
517
+ *
518
+ * **When to use**
519
  *
520
+ * Use when constructing a standalone typed failure reason for
521
+ * {@link fromReasons} or direct comparison.
522
  *
523
  * **Example** (creating a Fail reason)
524
  *
 
538
  */
539
  export declare const makeFailReason: <E>(error: E) => Fail<E>;
540
  /**
541
+ * Creates a standalone `Die` reason (not wrapped in a `Cause`).
542
+ *
543
+ * **When to use**
544
+ *
545
+ * Use when constructing a standalone defect reason for {@link fromReasons} or
546
+ * direct comparison.
547
  *
548
  * **Example** (creating a Die reason)
549
  *
550
  * ```ts
551
  * import { Cause } from "effect"
552
  *
553
+ * const reason = Cause.makeDieReason("bug")
554
  * console.log(reason._tag) // "Die"
555
+ * console.log(reason.defect) // "bug"
556
  * ```
557
  *
558
  * @see {@link makeFailReason} — create a `Fail` reason
 
563
  */
564
  export declare const makeDieReason: (defect: unknown) => Die;
565
  /**
566
+ * Creates a standalone `Interrupt` reason (not wrapped in a `Cause`),
567
  * optionally carrying the interrupting fiber's ID.
568
  *
569
+ * **When to use**
570
+ *
571
+ * Use when constructing a standalone interrupt reason for {@link fromReasons}
572
+ * or direct comparison.
573
+ *
574
  * **Example** (creating an Interrupt reason)
575
  *
576
  * ```ts
 
589
  */
590
  export declare const makeInterruptReason: (fiberId?: number | undefined) => Interrupt;
591
  /**
592
+ * Returns `true` if every reason in the cause is an `Interrupt` (and
593
  * there is at least one reason).
594
  *
595
+ * **When to use**
596
+ *
597
+ * Use when you need to detect failures caused only by interruption.
598
  *
599
  * **Example** (checking interrupt-only causes)
600
  *
 
609
  * @see {@link hasInterrupts} — `true` if the cause contains *any* interrupts
610
  *
611
  * @category predicates
612
+ * @since 4.0.0
613
  */
614
  export declare const hasInterruptsOnly: <E>(self: Cause<E>) => boolean;
615
  /**
616
+ * Transforms the typed error values inside a `Cause` using the
617
+ * provided function. Only `Fail` reasons are affected; `Die` and `Interrupt`
618
+ * reasons pass through unchanged.
619
+ *
620
+ * **When to use**
621
+ *
622
+ * Use to transform expected typed failures while preserving defects and
623
+ * interruptions unchanged.
624
  *
625
+ * **Details**
626
+ *
627
+ * If at least one `Fail` reason exists, this returns a new `Cause`
628
+ * containing the mapped failures. If the cause has no `Fail` reasons, the
629
+ * original cause is returned unchanged.
630
  *
631
  * **Example** (mapping errors to uppercase)
632
  *
 
642
  * ```
643
  *
644
  * @category mapping
645
+ * @since 2.0.0
646
  */
647
  export declare const map: {
648
  /**
649
+ * Transforms the typed error values inside a `Cause` using the
650
+ * provided function. Only `Fail` reasons are affected; `Die` and `Interrupt`
651
+ * reasons pass through unchanged.
652
+ *
653
+ * **When to use**
654
  *
655
+ * Use to transform expected typed failures while preserving defects and
656
+ * interruptions unchanged.
657
+ *
658
+ * **Details**
659
+ *
660
+ * If at least one `Fail` reason exists, this returns a new `Cause`
661
+ * containing the mapped failures. If the cause has no `Fail` reasons, the
662
+ * original cause is returned unchanged.
663
  *
664
  * **Example** (mapping errors to uppercase)
665
  *
 
675
  * ```
676
  *
677
  * @category mapping
678
+ * @since 2.0.0
679
  */
680
  <E, E2>(f: (error: Types.NoInfer<E>) => E2): (self: Cause<E>) => Cause<E2>;
681
  /**
682
+ * Transforms the typed error values inside a `Cause` using the
683
+ * provided function. Only `Fail` reasons are affected; `Die` and `Interrupt`
684
+ * reasons pass through unchanged.
685
+ *
686
+ * **When to use**
687
+ *
688
+ * Use to transform expected typed failures while preserving defects and
689
+ * interruptions unchanged.
690
  *
691
+ * **Details**
692
+ *
693
+ * If at least one `Fail` reason exists, this returns a new `Cause`
694
+ * containing the mapped failures. If the cause has no `Fail` reasons, the
695
+ * original cause is returned unchanged.
696
  *
697
  * **Example** (mapping errors to uppercase)
698
  *
 
708
  * ```
709
  *
710
  * @category mapping
711
+ * @since 2.0.0
712
  */
713
  <E, E2>(self: Cause<E>, f: (error: Types.NoInfer<E>) => E2): Cause<E2>;
714
  };
 
716
  * Merges two causes into a single cause whose `reasons` array is the union
717
  * of both inputs (de-duplicated by value equality).
718
  *
719
+ * **When to use**
720
+ *
721
+ * Use to merge independent causes into one structured failure value.
722
+ *
723
+ * **Details**
724
+ *
725
+ * - Combining with `empty` returns the other cause unchanged.
726
  * - If the result is structurally equal to `self`, `self` is returned
727
  * (referential shortcut).
728
  *
 
738
  * ```
739
  *
740
  * @see {@link fromReasons} — build a cause from an array of reasons
741
+ * @see {@link empty} for the identity cause used when combining
742
  *
743
  * @category combining
744
  * @since 4.0.0
 
748
  * Merges two causes into a single cause whose `reasons` array is the union
749
  * of both inputs (de-duplicated by value equality).
750
  *
751
+ * **When to use**
752
+ *
753
+ * Use to merge independent causes into one structured failure value.
754
+ *
755
+ * **Details**
756
+ *
757
+ * - Combining with `empty` returns the other cause unchanged.
758
  * - If the result is structurally equal to `self`, `self` is returned
759
  * (referential shortcut).
760
  *
 
770
  * ```
771
  *
772
  * @see {@link fromReasons} — build a cause from an array of reasons
773
+ * @see {@link empty} for the identity cause used when combining
774
  *
775
  * @category combining
776
  * @since 4.0.0
 
780
  * Merges two causes into a single cause whose `reasons` array is the union
781
  * of both inputs (de-duplicated by value equality).
782
  *
783
+ * **When to use**
784
+ *
785
+ * Use to merge independent causes into one structured failure value.
786
+ *
787
+ * **Details**
788
+ *
789
+ * - Combining with `empty` returns the other cause unchanged.
790
  * - If the result is structurally equal to `self`, `self` is returned
791
  * (referential shortcut).
792
  *
 
802
  * ```
803
  *
804
  * @see {@link fromReasons} — build a cause from an array of reasons
805
+ * @see {@link empty} for the identity cause used when combining
806
  *
807
  * @category combining
808
  * @since 4.0.0
 
810
  <E, E2>(self: Cause<E>, that: Cause<E2>): Cause<E | E2>;
811
  };
812
  /**
813
+ * Collapses a `Cause` into a single `unknown` value, picking the "most
814
  * important" failure in this order:
815
  *
816
+ * **When to use**
817
+ *
818
+ * Use to collapse a structured cause to the single value that synchronous and
819
+ * promise runners would throw.
820
+ *
821
+ * **Details**
822
+ *
823
+ * 1. First `Fail` error (the `E` value)
824
+ * 2. First `Die` defect
825
  * 3. A generic `Error("All fibers interrupted without error")` for interrupt-only causes
826
+ * 4. A generic `Error("Empty cause")` for `empty`
827
  *
828
  * This is the function used by `Effect.runPromise` and `Effect.runSync` to
829
+ * decide what to throw.
830
+ *
831
+ * **Gotchas**
832
+ *
833
+ * This function is lossy. Use {@link prettyErrors} or iterate `cause.reasons`
834
+ * when you need all failures.
835
  *
836
  * **Example** (squashing a cause)
837
  *
 
850
  */
851
  export declare const squash: <E>(self: Cause<E>) => unknown;
852
  /**
853
+ * Returns `true` if the cause contains at least one `Fail` reason.
854
+ *
855
+ * **When to use**
856
+ *
857
+ * Use to check whether a cause includes typed failures before extracting,
858
+ * mapping, or rendering them.
859
  *
860
  * **Example** (checking for typed errors)
861
  *
 
870
  * @see {@link hasInterrupts} — check for interruptions
871
  *
872
  * @category predicates
873
+ * @since 4.0.0
874
  */
875
  export declare const hasFails: <E>(self: Cause<E>) => boolean;
876
  /**
877
+ * Returns a `Result` whose success value is the first `Fail` reason in
878
+ * the cause, including its annotations. If the cause has no `Fail` reason, the
879
+ * failure value is the original cause narrowed to `Cause<never>`, because it
880
+ * contains no typed error reasons.
881
+ *
882
+ * **When to use**
883
  *
884
+ * Use when you need the full `Fail` reason from a `Cause`, including
885
+ * annotations.
886
  *
887
  * **Example** (extracting the first Fail reason)
888
  *
 
898
  * @see {@link findError} — extract the unwrapped `E` value
899
  * @see {@link findDie} — extract the first `Die` reason
900
  *
901
+ * @category filtering
902
  * @since 4.0.0
903
  */
904
  export declare const findFail: <E>(self: Cause<E>) => Result.Result<Fail<E>, Cause<never>>;
905
  /**
906
+ * Returns a `Result` whose success value is the first typed error value `E`
907
+ * from a `Fail` reason in the cause. If the cause has no `Fail` reason,
908
+ * the failure value is the original cause narrowed to `Cause<never>`, because
909
+ * it contains no typed error reasons.
910
  *
911
+ * **When to use**
912
+ *
913
+ * Use when you need the first typed error value from a `Cause` as a `Result`
914
+ * that preserves the original cause when no match is found.
915
  *
916
  * **Example** (extracting the first error value)
917
  *
 
927
  * @see {@link findFail} — extract the full `Fail` reason
928
  * @see {@link findErrorOption} — `Option`-based variant
929
  *
930
+ * @category filtering
931
  * @since 4.0.0
932
  */
933
  export declare const findError: <E>(self: Cause<E>) => Result.Result<E, Cause<never>>;
934
  /**
935
  * Returns the first typed error value `E` from a cause wrapped in
936
+ * `Option.some`, or `Option.none` if no `Fail` reason exists.
937
+ *
938
+ * **When to use**
939
  *
940
+ * Use when you need the first typed error value from a `Cause` as an `Option`,
941
+ * discarding the original cause.
942
  *
943
  * **Example** (extracting an error as Option)
944
  *
 
952
  * console.log(Option.isNone(none)) // true
953
  * ```
954
  *
955
+ * @see {@link findError} — `Result`-based variant
956
  *
957
+ * @category filtering
958
  * @since 4.0.0
959
  */
960
  export declare const findErrorOption: <E>(input: Cause<E>) => Option<E>;
961
  /**
962
+ * Returns `true` if the cause contains at least one `Die` reason.
963
+ *
964
+ * **When to use**
965
+ *
966
+ * Use to check whether a cause includes defects before extracting or rendering
967
+ * them.
968
  *
969
  * **Example** (checking for defects)
970
  *
 
979
  * @see {@link hasInterrupts} — check for interruptions
980
  *
981
  * @category predicates
982
+ * @since 4.0.0
983
  */
984
  export declare const hasDies: <E>(self: Cause<E>) => boolean;
985
  /**
986
+ * Returns a `Result` whose success value is the first `Die` reason in
987
+ * the cause, including its annotations. If the cause has no `Die` reason, the
988
+ * failure value is the original cause.
989
  *
990
+ * **When to use**
991
+ *
992
+ * Use when you need the full `Die` reason from a `Cause`, including
993
+ * annotations.
994
  *
995
  * **Example** (extracting the first Die reason)
996
  *
 
1006
  * @see {@link findDefect} — extract the unwrapped defect value
1007
  * @see {@link findFail} — extract the first `Fail` reason
1008
  *
1009
+ * @category filtering
1010
  * @since 4.0.0
1011
  */
1012
  export declare const findDie: <E>(self: Cause<E>) => Result.Result<Die, Cause<E>>;
1013
  /**
1014
+ * Returns a `Result` whose success value is the first defect value from a
1015
+ * `Die` reason in the cause. If the cause has no `Die` reason, the
1016
+ * failure value is the original cause.
1017
+ *
1018
+ * **When to use**
1019
  *
1020
+ * Use when you need the first defect value from a `Cause` as a `Result`,
1021
+ * without the full `Die` reason.
1022
  *
1023
  * **Example** (extracting the first defect)
1024
  *
 
1034
  * @see {@link findDie} — extract the full `Die` reason
1035
  * @see {@link findError} — extract the first typed error
1036
  *
1037
+ * @category filtering
1038
  * @since 4.0.0
1039
  */
1040
  export declare const findDefect: <E>(self: Cause<E>) => Result.Result<unknown, Cause<E>>;
1041
  /**
1042
+ * Returns `true` if the cause contains at least one `Interrupt` reason.
1043
  *
1044
  * **Example** (checking for interruptions)
1045
  *
 
1055
  * @see {@link hasDies} — check for defects
1056
  *
1057
  * @category predicates
1058
+ * @since 4.0.0
1059
  */
1060
  export declare const hasInterrupts: <E>(self: Cause<E>) => boolean;
1061
  /**
1062
+ * Returns a `Result` whose success value is the first `Interrupt` reason
1063
+ * in the cause, including its annotations. If the cause has no `Interrupt`
1064
+ * reason, the failure value is the original cause.
1065
+ *
1066
+ * **When to use**
1067
+ *
1068
+ * Use when you need the first `Interrupt` reason from a `Cause`, including the
1069
+ * fiber ID and annotations.
1070
  *
1071
  * **Example** (extracting the first interrupt)
1072
  *
 
1081
  *
1082
  * @see {@link interruptors} — collect all interrupting fiber IDs as a `Set`
1083
  *
1084
+ * @category filtering
1085
  * @since 4.0.0
1086
  */
1087
  export declare const findInterrupt: <E>(self: Cause<E>) => Result.Result<Interrupt, Cause<E>>;
1088
  /**
1089
+ * Collects the defined fiber IDs from all `Interrupt` reasons in the
1090
+ * cause into a `ReadonlySet`. Interrupt reasons without a `fiberId` are
1091
+ * ignored. Returns an empty set when the cause has no interrupting fiber IDs.
1092
+ *
1093
+ * **When to use**
1094
  *
1095
+ * Use when you need interrupting fiber IDs as a set, with absence represented
1096
+ * as an empty set.
1097
  *
1098
  * **Example** (collecting interruptors)
1099
  *
 
1104
  * Cause.interrupt(1),
1105
  * Cause.interrupt(2)
1106
  * )
1107
+ *
1108
+ * console.log(Cause.interruptors(cause)) // Set(2) { 1, 2 }
1109
  * ```
1110
  *
1111
+ * @see {@link filterInterruptors} — `Result`-based variant
1112
  *
1113
  * @category accessors
1114
+ * @since 2.0.0
1115
  */
1116
  export declare const interruptors: <E>(self: Cause<E>) => ReadonlySet<number>;
1117
  /**
1118
+ * Returns a `Result` whose success value is the set of defined fiber IDs from
1119
+ * the cause's `Interrupt` reasons. If the cause has no `Interrupt`
1120
+ * reason, the failure value is the original cause.
1121
+ *
1122
+ * **When to use**
1123
  *
1124
+ * Use when you need absence of interrupt reasons to fail with the original
1125
+ * cause.
1126
  *
1127
+ * **Gotchas**
1128
+ *
1129
+ * Interrupt reasons without a `fiberId` still count as interrupts, so the
1130
+ * function succeeds with an empty `Set` when every interrupt reason has an
1131
+ * undefined fiber ID.
1132
+ *
1133
+ * **Example** (extracting interruptors with Result)
1134
  *
1135
  * ```ts
1136
  * import { Cause, Result } from "effect"
1137
  *
1138
  * const result = Cause.filterInterruptors(Cause.interrupt(1))
1139
  * if (!Result.isFailure(result)) {
1140
+ * console.log(result.success) // Set(1) { 1 }
1141
  * }
1142
  * ```
1143
  *
1144
  * @see {@link interruptors} — always-succeeding variant
1145
  *
1146
+ * @category filtering
1147
  * @since 4.0.0
1148
  */
1149
  export declare const filterInterruptors: <E>(self: Cause<E>) => Result.Result<Set<number>, Cause<E>>;
1150
  /**
1151
+ * Converts a `Cause` into an `Array<Error>` suitable for logging or
1152
  * rethrowing.
1153
  *
1154
+ * **When to use**
1155
+ *
1156
+ * Use to convert every renderable failure in a cause into individual `Error`
1157
+ * values before logging or rethrowing.
1158
+ *
1159
+ * **Details**
1160
+ *
1161
+ * Each `Fail` and `Die` reason is converted into a standard
1162
  * `Error`:
1163
  *
1164
  * - **Objects / Error instances** — `message`, `name`, `stack`, and `cause`
 
1168
  * - **Other primitives** (`null`, `undefined`, numbers, …) — wrapped in an
1169
  * `Error` with message `"Unknown error: <value>"`.
1170
  *
1171
+ * `Interrupt` reasons are collected separately. If the cause contains
1172
  * **only** interrupts (no `Fail` or `Die`), a single `InterruptError` is
1173
  * returned whose `cause` lists the interrupting fiber IDs.
1174
  *
1175
+ * An empty cause returns an empty array.
1176
+ *
1177
  * **Example** (converting a cause to errors)
1178
  *
1179
  * ```ts
 
1187
  * @see {@link pretty} — renders the cause as a single string
1188
  * @see {@link squash} — lossy collapse to a single thrown value
1189
  *
 
1190
  * @category rendering
1191
+ * @since 3.2.0
1192
  */
1193
  export declare const prettyErrors: <E>(self: Cause<E>) => Array<Error>;
1194
  /**
1195
+ * Formats a `Cause` as a human-readable string for logging or debugging.
1196
+ *
1197
+ * **When to use**
1198
+ *
1199
+ * Use to render a whole cause as one human-readable string for logs or
1200
+ * diagnostics.
1201
+ *
1202
+ * **Details**
1203
  *
1204
  * Delegates to {@link prettyErrors} to convert each reason to an `Error`,
1205
  * then joins their stack traces with newlines. Nested `Error.cause` chains
 
1216
  *
1217
  * Span annotations are appended to the relevant stack frames when available.
1218
  *
1219
+ * **Gotchas**
1220
+ *
1221
+ * Rendering an empty cause produces an empty string because there are no
1222
+ * errors to render.
1223
+ *
1224
  * **Example** (rendering a cause)
1225
  *
1226
  * ```ts
1227
  * import { Cause } from "effect"
1228
  *
1229
+ * const rendered = Cause.pretty(Cause.fail("something went wrong"))
1230
+ * console.log(rendered.includes("something went wrong")) // true
 
 
1231
  * ```
1232
  *
1233
  * @see {@link prettyErrors} — get the individual `Error` instances
1234
  *
 
1235
  * @category rendering
1236
+ * @since 2.0.0
1237
  */
1238
  export declare const pretty: <E>(cause: Cause<E>) => string;
1239
  /**
1240
  * Base interface for error classes that can be yielded directly inside
1241
+ * `Effect.gen`. Yielding one of these errors fails the generator with that
1242
+ * error as the typed failure value.
1243
+ *
1244
+ * **Details**
1245
  *
1246
+ * All built-in error classes in this module (`NoSuchElementError`,
1247
+ * `TimeoutError`, `IllegalArgumentError`, `ExceededCapacityError`,
1248
+ * `AsyncFiberError`, and `UnknownError`) implement this interface.
 
1249
  *
1250
  * **Example** (yielding an error in Effect.gen)
1251
  *
 
1259
  * })
1260
  * ```
1261
  *
 
1262
  * @category errors
1263
+ * @since 2.0.0
1264
  */
1265
+ export interface YieldableError extends Error, Pipeable, Inspectable {
1266
+ readonly [Effect.TypeId]: Effect.Variance<never, this, never>;
1267
+ [Symbol.iterator](): Effect.EffectIterator<Effect.Effect<never, this, never>>;
1268
  }
1269
  /**
1270
+ * Checks whether an arbitrary value is a `NoSuchElementError`.
1271
  *
1272
  * **Example** (runtime type check)
1273
  *
 
1283
  */
1284
  export declare const isNoSuchElementError: (u: unknown) => u is NoSuchElementError;
1285
  /**
1286
+ * Unique brand for `NoSuchElementError`.
1287
  *
1288
+ * @category type IDs
1289
  * @since 4.0.0
 
1290
  */
1291
  export declare const NoSuchElementErrorTypeId: "~effect/Cause/NoSuchElementError";
1292
  /**
1293
+ * An error indicating that an expected value was absent.
1294
  *
1295
+ * **When to use**
1296
+ *
1297
+ * Use to model APIs that intentionally turn absence into an error.
1298
+ *
1299
+ * **Details**
1300
+ *
1301
+ * Used by APIs that convert absence into an exception or effect failure, such
1302
+ * as `Option.getOrThrow`. Implements `YieldableError` so it can be
1303
  * yielded directly in `Effect.gen`.
1304
  *
1305
+ * **Gotchas**
1306
+ *
1307
+ * Prefer APIs that return `Option` or a typed failure when absence is an
1308
+ * expected case. This error is mainly for APIs that intentionally turn absence
1309
+ * into a thrown value or failed effect.
1310
+ *
1311
  * **Example** (creating and checking)
1312
  *
1313
  * ```ts
 
1318
  * console.log(error.message) // "Element not found"
1319
  * ```
1320
  *
 
 
 
 
1321
  * @category errors
1322
+ * @since 4.0.0
1323
  */
1324
  export interface NoSuchElementError extends YieldableError {
1325
  readonly [NoSuchElementErrorTypeId]: typeof NoSuchElementErrorTypeId;
1326
  readonly _tag: "NoSuchElementError";
1327
  }
1328
  /**
1329
+ * Constructs a `NoSuchElementError` with an optional message.
1330
+ *
1331
+ * **When to use**
1332
+ *
1333
+ * Use to create the error value for APIs that intentionally fail when an
1334
+ * expected element is absent.
1335
  *
1336
  * **Example** (creating a NoSuchElementError)
1337
  *
 
1342
  * console.log(error.message) // "Element not found"
1343
  * ```
1344
  *
1345
+ * @see {@link isNoSuchElementError} for checking unknown values
1346
+ *
1347
  * @category constructors
1348
  * @since 4.0.0
1349
  */
1350
  export declare const NoSuchElementError: new (message?: string) => NoSuchElementError;
1351
  /**
1352
+ * Checks whether an arbitrary value is a `Done` signal.
1353
  *
1354
  * **Example** (runtime type check)
1355
  *
 
1365
  */
1366
  export declare const isDone: (u: unknown) => u is Done<any>;
1367
  /**
1368
+ * Unique brand for `Done` values.
1369
  *
1370
+ * @category type IDs
1371
  * @since 4.0.0
 
1372
  */
1373
  export declare const DoneTypeId: "~effect/Cause/Done";
1374
  /**
1375
  * A graceful completion signal for queues and streams.
1376
  *
1377
+ * **When to use**
1378
+ *
1379
+ * Use to model normal producer completion through a stream or queue error
1380
+ * channel.
1381
+ *
1382
+ * **Details**
1383
+ *
1384
  * `Done` indicates that a producer has finished normally — no more elements
1385
  * will arrive. It is distinct from an error or interruption; it represents
1386
  * successful completion. The optional `value` field can carry a final
 
1401
  * })
1402
  * ```
1403
  *
 
 
 
 
1404
  * @category errors
1405
+ * @since 4.0.0
1406
  */
1407
  export interface Done<A = void> {
1408
  readonly [DoneTypeId]: typeof DoneTypeId;
 
1410
  readonly value: A;
1411
  }
1412
  /**
1413
+ * Companion namespace for the `Done` interface.
1414
  *
1415
  * @since 4.0.0
 
1416
  */
1417
  export declare namespace Done {
1418
  /**
1419
  * Extracts the value type `A` from a `Done<A>` that may be nested in an
1420
  * error union.
1421
  *
1422
+ * @category utility types
1423
  * @since 4.0.0
1424
  */
1425
  type Extract<E> = E extends Done<infer L> ? L : never;
1426
  /**
1427
  * Filters a type union to only keep `Done` members.
1428
  *
1429
+ * @category filtering
1430
  * @since 4.0.0
1431
  */
1432
  type Only<E> = E extends Done<infer L> ? Done<L> : never;
1433
  }
1434
  /**
1435
+ * Creates a `Done` signal with an optional value.
1436
+ *
1437
+ * **When to use**
1438
+ *
1439
+ * Use when you need to construct a low-level pull completion signal directly.
1440
  *
1441
  * @see {@link done} — create a failing `Effect` with `Done`
1442
  *
 
1445
  */
1446
  export declare const Done: <A = void>(value?: A) => Done<A>;
1447
  /**
1448
+ * Creates an Effect that fails with a `Done` error. Shorthand for
1449
  * `Effect.fail(Cause.Done(value))`.
1450
  *
1451
+ * **When to use**
1452
+ *
1453
+ * Use when you model stream or queue completion through the error channel.
1454
+ *
1455
+ * **Example** (failing with Done)
1456
+ *
1457
+ * ```ts
1458
+ * import { Cause, Effect } from "effect"
1459
+ *
1460
+ * const program = Cause.done("finished")
1461
+ *
1462
+ * Effect.runPromiseExit(program).then((exit) => {
1463
+ * console.log(exit._tag) // "Failure"
1464
+ * })
1465
+ * ```
1466
+ *
1467
+ * @see {@link Done} — create the signal value without an Effect
1468
  *
1469
  * @category constructors
1470
  * @since 4.0.0
1471
  */
1472
  export declare const done: <A = void>(value?: A) => Effect.Effect<never, Done<A>>;
1473
  /**
1474
+ * Unique brand for `TimeoutError`.
1475
  *
1476
+ * @category type IDs
1477
  * @since 4.0.0
 
1478
  */
1479
  export declare const TimeoutErrorTypeId: "~effect/Cause/TimeoutError";
1480
  /**
1481
+ * Checks whether an arbitrary value is a `TimeoutError`.
1482
  *
1483
  * **Example** (runtime type check)
1484
  *
 
1496
  /**
1497
  * An error indicating that an operation exceeded its time limit.
1498
  *
1499
+ * **Details**
1500
+ *
1501
  * Produced by `Effect.timeout` and related APIs. Implements
1502
+ * `YieldableError`.
1503
  *
1504
  * **Example** (creating and checking)
1505
  *
 
1511
  * console.log(error.message) // "Operation timed out"
1512
  * ```
1513
  *
 
 
 
1514
  * @category errors
1515
+ * @since 4.0.0
1516
  */
1517
  export interface TimeoutError extends YieldableError {
1518
  readonly [TimeoutErrorTypeId]: typeof TimeoutErrorTypeId;
1519
  readonly _tag: "TimeoutError";
1520
  }
1521
  /**
1522
+ * Constructs a `TimeoutError` with an optional message.
1523
  *
1524
  * **Example** (creating a TimeoutError)
1525
  *
 
1535
  */
1536
  export declare const TimeoutError: new (message?: string) => TimeoutError;
1537
  /**
1538
+ * Unique brand for `IllegalArgumentError`.
1539
  *
1540
+ * @category type IDs
1541
  * @since 4.0.0
 
1542
  */
1543
  export declare const IllegalArgumentErrorTypeId: "~effect/Cause/IllegalArgumentError";
1544
  /**
1545
+ * Checks whether an arbitrary value is an `IllegalArgumentError`.
1546
  *
1547
  * **Example** (runtime type check)
1548
  *
 
1561
  * An error indicating that a function received an argument that violates
1562
  * its contract (e.g. negative where positive was expected).
1563
  *
1564
+ * **Details**
1565
+ *
1566
+ * Implements `YieldableError`.
1567
  *
1568
  * **Example** (creating and checking)
1569
  *
 
1575
  * console.log(error.message) // "Expected positive number"
1576
  * ```
1577
  *
 
 
 
1578
  * @category errors
1579
+ * @since 4.0.0
1580
  */
1581
  export interface IllegalArgumentError extends YieldableError {
1582
  readonly [IllegalArgumentErrorTypeId]: typeof IllegalArgumentErrorTypeId;
1583
  readonly _tag: "IllegalArgumentError";
1584
  }
1585
  /**
1586
+ * Constructs an `IllegalArgumentError` with an optional message.
1587
  *
1588
  * **Example** (creating an IllegalArgumentError)
1589
  *
 
1599
  */
1600
  export declare const IllegalArgumentError: new (message?: string) => IllegalArgumentError;
1601
  /**
1602
+ * Checks whether an arbitrary value is an `ExceededCapacityError`.
1603
  *
1604
  * **Example** (runtime type check)
1605
  *
 
1615
  */
1616
  export declare const isExceededCapacityError: (u: unknown) => u is ExceededCapacityError;
1617
  /**
1618
+ * Unique brand for `ExceededCapacityError`.
1619
  *
1620
+ * @category type IDs
1621
  * @since 4.0.0
 
1622
  */
1623
  export declare const ExceededCapacityErrorTypeId: "~effect/Cause/ExceededCapacityError";
1624
  /**
1625
  * An error indicating that a bounded resource (queue, pool, semaphore, etc.)
1626
  * has exceeded its capacity.
1627
  *
1628
+ * **When to use**
1629
+ *
1630
+ * Use to model bounded-resource failures where an operation cannot proceed
1631
+ * because capacity has been exhausted.
1632
+ *
1633
+ * **Details**
1634
+ *
1635
+ * Implements `YieldableError`.
1636
  *
1637
  * **Example** (creating and checking)
1638
  *
 
1644
  * console.log(error.message) // "Queue full"
1645
  * ```
1646
  *
 
 
 
1647
  * @category errors
1648
+ * @since 4.0.0
1649
  */
1650
  export interface ExceededCapacityError extends YieldableError {
1651
  readonly [ExceededCapacityErrorTypeId]: typeof ExceededCapacityErrorTypeId;
1652
  readonly _tag: "ExceededCapacityError";
1653
  }
1654
  /**
1655
+ * Constructs an `ExceededCapacityError` with an optional message.
1656
+ *
1657
+ * **When to use**
1658
+ *
1659
+ * Use to create the error value for bounded-resource capacity failures.
1660
  *
1661
  * **Example** (creating an ExceededCapacityError)
1662
  *
 
1667
  * console.log(error.message) // "Queue full"
1668
  * ```
1669
  *
1670
+ * @see {@link isExceededCapacityError} for checking unknown values
1671
+ *
1672
  * @category constructors
1673
  * @since 4.0.0
1674
  */
1675
  export declare const ExceededCapacityError: new (message?: string) => ExceededCapacityError;
1676
  /**
1677
+ * Unique brand present on `AsyncFiberError` values and used by
1678
+ * `isAsyncFiberError` for runtime checks.
1679
  *
1680
+ * @category type IDs
1681
  * @since 4.0.0
 
1682
  */
1683
  export declare const AsyncFiberErrorTypeId: "~effect/Cause/AsyncFiberError";
1684
  /**
1685
+ * Checks whether an arbitrary value is an `AsyncFiberError`.
1686
+ *
1687
+ * **Example** (runtime type check)
1688
+ *
1689
+ * ```ts
1690
+ * import { Cause } from "effect"
1691
+ * import type { Fiber } from "effect"
1692
+ *
1693
+ * declare const fiber: Fiber.Fiber<unknown, unknown>
1694
+ *
1695
+ * const error = new Cause.AsyncFiberError(fiber)
1696
+ * console.log(Cause.isAsyncFiberError(error)) // true
1697
+ * console.log(Cause.isAsyncFiberError("nope")) // false
1698
+ * ```
1699
+ *
1700
  * @category guards
1701
  * @since 4.0.0
1702
  */
 
1704
  /**
1705
  * An error that occurs when trying to run an async fiber with Effect.runSync.
1706
  *
1707
+ * **When to use**
1708
+ *
1709
+ * Use to inspect failures produced when synchronous runners encounter an effect
1710
+ * that cannot complete synchronously.
1711
+ *
1712
+ * **Details**
1713
+ *
1714
+ * The `fiber` property stores the fiber that could not be synchronously
1715
+ * resolved. This error implements `YieldableError`.
1716
+ *
1717
+ * **Example** (accessing the fiber)
1718
+ *
1719
+ * ```ts
1720
+ * import { Cause } from "effect"
1721
+ * import type { Fiber } from "effect"
1722
+ *
1723
+ * declare const fiber: Fiber.Fiber<unknown, unknown>
1724
+ *
1725
+ * const error = new Cause.AsyncFiberError(fiber)
1726
+ * console.log(error._tag) // "AsyncFiberError"
1727
+ * console.log(error.fiber === fiber) // true
1728
+ * ```
1729
+ *
1730
  * @category errors
1731
+ * @since 4.0.0
1732
  */
1733
  export interface AsyncFiberError extends YieldableError {
1734
  readonly [AsyncFiberErrorTypeId]: typeof AsyncFiberErrorTypeId;
 
1736
  readonly fiber: Fiber<unknown, unknown>;
1737
  }
1738
  /**
1739
+ * Constructs an `AsyncFiberError` for a fiber that could not be resolved
1740
+ * synchronously.
1741
+ *
1742
+ * **When to use**
1743
+ *
1744
+ * Use to create the error value for a fiber that could not be completed by a
1745
+ * synchronous runner.
1746
+ *
1747
+ * **Example** (creating an AsyncFiberError)
1748
+ *
1749
+ * ```ts
1750
+ * import { Cause } from "effect"
1751
+ * import type { Fiber } from "effect"
1752
+ *
1753
+ * declare const fiber: Fiber.Fiber<unknown, unknown>
1754
+ *
1755
+ * const error = new Cause.AsyncFiberError(fiber)
1756
+ * console.log(error.message) // "An asynchronous Effect was executed with Effect.runSync"
1757
+ * ```
1758
+ *
1759
+ * @see {@link isAsyncFiberError} for checking unknown values
1760
  *
1761
  * @category constructors
1762
  * @since 4.0.0
1763
  */
1764
  export declare const AsyncFiberError: new (fiber: Fiber<unknown, unknown>) => AsyncFiberError;
1765
  /**
1766
+ * Unique brand for `UnknownError`.
1767
  *
1768
+ * @category type IDs
1769
  * @since 4.0.0
 
1770
  */
1771
  export declare const UnknownErrorTypeId: "~effect/Cause/UnknownError";
1772
  /**
1773
+ * Checks whether an arbitrary value is an `UnknownError`.
1774
  *
1775
  * **Example** (runtime type check)
1776
  *
 
1788
  /**
1789
  * A wrapper for errors whose type is not statically known.
1790
  *
1791
+ * **Details**
1792
+ *
1793
+ * Used when a thrown or rejected value is not represented by a more specific
1794
+ * typed error. The original value is stored in the `cause` property inherited
1795
+ * from `Error`. Implements `YieldableError`.
1796
  *
1797
  * **Example** (creating and checking)
1798
  *
 
1804
  * console.log(error.message) // "Something unknown"
1805
  * ```
1806
  *
 
 
 
1807
  * @category errors
1808
+ * @since 4.0.0
1809
  */
1810
  export interface UnknownError extends YieldableError {
1811
  readonly [UnknownErrorTypeId]: typeof UnknownErrorTypeId;
1812
  readonly _tag: "UnknownError";
1813
  }
1814
  /**
1815
+ * Constructs an `UnknownError`. The first argument is the original
1816
  * cause (stored in `Error.cause`); the second is an optional human-readable
1817
  * message.
1818
  *
 
1830
  */
1831
  export declare const UnknownError: new (cause: unknown, message?: string) => UnknownError;
1832
  /**
1833
+ * Attaches metadata to every reason in a `Cause`.
1834
+ *
1835
+ * **When to use**
1836
+ *
1837
+ * Use to attach diagnostic metadata to every reason in a cause.
1838
+ *
1839
+ * **Details**
1840
  *
1841
  * Annotations are stored as a `Context` on each reason and can be
1842
  * retrieved later via {@link reasonAnnotations} or {@link annotations}.
1843
  * The runtime uses this to attach stack traces and spans.
1844
  *
1845
+ * - Returns a new `Cause`.
1846
  * - By default, existing keys are preserved. Pass `{ overwrite: true }` to
1847
  * replace them.
1848
  *
 
1851
  * ```ts
1852
  * import { Cause, Context } from "effect"
1853
  *
1854
+ * class RequestId extends Context.Service<RequestId, string>()("RequestId") {}
1855
+ *
1856
  * const cause = Cause.fail("error")
1857
+ * const annotated = Cause.annotate(cause, Context.make(RequestId, "req-1"))
1858
+ *
1859
+ * console.log(Context.getOrUndefined(Cause.annotations(annotated), RequestId)) // "req-1"
1860
  * ```
1861
  *
1862
+ * @see {@link annotations} for reading merged annotations from a cause
1863
+ * @see {@link reasonAnnotations} for reading annotations from a single reason
1864
  *
1865
  * @category annotations
1866
  * @since 4.0.0
1867
  */
1868
  export declare const annotate: {
1869
  /**
1870
+ * Attaches metadata to every reason in a `Cause`.
1871
+ *
1872
+ * **When to use**
1873
+ *
1874
+ * Use to attach diagnostic metadata to every reason in a cause.
1875
+ *
1876
+ * **Details**
1877
  *
1878
  * Annotations are stored as a `Context` on each reason and can be
1879
  * retrieved later via {@link reasonAnnotations} or {@link annotations}.
1880
  * The runtime uses this to attach stack traces and spans.
1881
  *
1882
+ * - Returns a new `Cause`.
1883
  * - By default, existing keys are preserved. Pass `{ overwrite: true }` to
1884
  * replace them.
1885
  *
 
1888
  * ```ts
1889
  * import { Cause, Context } from "effect"
1890
  *
1891
+ * class RequestId extends Context.Service<RequestId, string>()("RequestId") {}
1892
+ *
1893
  * const cause = Cause.fail("error")
1894
+ * const annotated = Cause.annotate(cause, Context.make(RequestId, "req-1"))
1895
+ *
1896
+ * console.log(Context.getOrUndefined(Cause.annotations(annotated), RequestId)) // "req-1"
1897
  * ```
1898
  *
1899
+ * @see {@link annotations} for reading merged annotations from a cause
1900
+ * @see {@link reasonAnnotations} for reading annotations from a single reason
1901
  *
1902
  * @category annotations
1903
  * @since 4.0.0
 
1906
  readonly overwrite?: boolean | undefined;
1907
  }): <E>(self: Cause<E>) => Cause<E>;
1908
  /**
1909
+ * Attaches metadata to every reason in a `Cause`.
1910
+ *
1911
+ * **When to use**
1912
+ *
1913
+ * Use to attach diagnostic metadata to every reason in a cause.
1914
+ *
1915
+ * **Details**
1916
  *
1917
  * Annotations are stored as a `Context` on each reason and can be
1918
  * retrieved later via {@link reasonAnnotations} or {@link annotations}.
1919
  * The runtime uses this to attach stack traces and spans.
1920
  *
1921
+ * - Returns a new `Cause`.
1922
  * - By default, existing keys are preserved. Pass `{ overwrite: true }` to
1923
  * replace them.
1924
  *
 
1927
  * ```ts
1928
  * import { Cause, Context } from "effect"
1929
  *
1930
+ * class RequestId extends Context.Service<RequestId, string>()("RequestId") {}
1931
+ *
1932
  * const cause = Cause.fail("error")
1933
+ * const annotated = Cause.annotate(cause, Context.make(RequestId, "req-1"))
1934
+ *
1935
+ * console.log(Context.getOrUndefined(Cause.annotations(annotated), RequestId)) // "req-1"
1936
  * ```
1937
  *
1938
+ * @see {@link annotations} for reading merged annotations from a cause
1939
+ * @see {@link reasonAnnotations} for reading annotations from a single reason
1940
  *
1941
  * @category annotations
1942
  * @since 4.0.0
 
1946
  }): Cause<E>;
1947
  };
1948
  /**
1949
+ * Reads the annotations from a single `Reason` as a `Context`.
1950
+ *
1951
+ * **When to use**
1952
  *
1953
+ * Use when you need tracing metadata (e.g. `StackTrace`) from
1954
  * a specific reason rather than the whole cause.
1955
  *
1956
+ * **Example** (reading reason annotations)
1957
+ *
1958
+ * ```ts
1959
+ * import { Cause, Context } from "effect"
1960
+ *
1961
+ * class RequestId extends Context.Service<RequestId, string>()("RequestId") {}
1962
+ *
1963
+ * const reason = Cause.makeFailReason("error")
1964
+ * const annotated = reason.annotate(Context.make(RequestId, "req-1"))
1965
+ *
1966
+ * console.log(Context.getOrUndefined(Cause.reasonAnnotations(annotated), RequestId)) // "req-1"
1967
+ * ```
1968
+ *
1969
  * @see {@link annotations} — merged annotations from all reasons in a cause
 
1970
  *
1971
  * @category annotations
1972
  * @since 4.0.0
1973
  */
1974
  export declare const reasonAnnotations: <E>(self: Reason<E>) => Context.Context<never>;
1975
  /**
1976
+ * Reads the merged annotations from all reasons in a `Cause`.
1977
+ *
1978
+ * **When to use**
1979
+ *
1980
+ * Use to read diagnostic metadata merged from the whole cause.
1981
+ *
1982
+ * **Gotchas**
1983
  *
1984
+ * When multiple reasons contain the same annotation key, the value from the
1985
+ * later reason wins.
1986
+ *
1987
+ * **Example** (reading merged annotations)
1988
+ *
1989
+ * ```ts
1990
+ * import { Cause, Context } from "effect"
1991
+ *
1992
+ * class RequestId extends Context.Service<RequestId, string>()("RequestId") {}
1993
+ *
1994
+ * const cause = Cause.annotate(
1995
+ * Cause.fail("error"),
1996
+ * Context.make(RequestId, "req-1")
1997
+ * )
1998
+ *
1999
+ * console.log(Context.getOrUndefined(Cause.annotations(cause), RequestId)) // "req-1"
2000
+ * ```
2001
  *
2002
  * @see {@link reasonAnnotations} — annotations from a single reason
 
2003
  *
2004
  * @category annotations
2005
  * @since 4.0.0
 
2007
  export declare const annotations: <E>(self: Cause<E>) => Context.Context<never>;
2008
  declare const StackTrace_base: Context.ServiceClass<StackTrace, "effect/Cause/StackTrace", StackFrame>;
2009
  /**
2010
+ * Context annotation used to store the stack frame captured at the point of failure.
2011
+ *
2012
+ * **When to use**
2013
+ *
2014
+ * Use to read the failure stack-frame annotation from a `Reason` when building
2015
+ * diagnostics, logging, or custom cause renderers.
2016
+ *
2017
+ * **Details**
2018
  *
2019
  * The runtime annotates every reason with this when a stack frame is
2020
  * available. Retrieve it via
2021
  * `Context.get(Cause.reasonAnnotations(reason), Cause.StackTrace)`.
2022
  *
2023
+ * @see {@link reasonAnnotations} for reading annotations from a single reason
2024
+ * @see {@link annotations} for reading merged annotations from a cause
2025
+ * @see {@link InterruptorStackTrace} for the interrupt-specific stack-frame annotation
2026
+ *
2027
  * @category annotations
2028
  * @since 4.0.0
2029
  */
 
2031
  }
2032
  declare const InterruptorStackTrace_base: Context.ServiceClass<InterruptorStackTrace, "effect/Cause/InterruptorStackTrace", StackFrame>;
2033
  /**
2034
+ * Context annotation used to store the stack frame captured at the point of
2035
  * interruption.
2036
  *
2037
+ * **When to use**
2038
+ *
2039
+ * Use when you need the stack-frame annotation used by interrupt-only cause
2040
+ * rendering.
2041
+ *
2042
+ * **Details**
2043
+ *
2044
+ * Similar to `StackTrace` but specific to `Interrupt` reasons.
2045
+ *
2046
+ * @see {@link StackTrace} for stack frames attached to failures
2047
+ * @see {@link reasonAnnotations} for reading annotations from a single reason
2048
+ * @see {@link annotate} for attaching annotations to a cause
2049
  *
2050
  * @category annotations
2051
  * @since 4.0.0
.opencode/node_modules/effect/dist/Cause.d.ts.map CHANGED
@@ -1 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KAAK,CAA4B,CAAA;AAEzG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,WAAW,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,KAAK,CAA2B,CAAA;;AAEjG;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,UAAW,SAAQ,eAAoE;CAAG;;AAEvG;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,qBACX,SAAQ,0BAA0F;CAClG"}
.opencode/node_modules/effect/dist/Cause.js CHANGED
@@ -1,79 +1,11 @@
1
  /**
2
- * Structured representation of how an Effect can fail.
3
- *
4
- * A `Cause<E>` holds a flat array of `Reason` values, where each reason is one of:
5
- *
6
- * - **Fail** — a typed, expected error `E` (created by `Effect.fail`)
7
- * - **Die** — an untyped defect (`unknown`) from `Effect.die` or uncaught throws
8
- * - **Interrupt** — a fiber interruption, optionally carrying the interrupting fiber's ID
9
- *
10
- * ## Mental model
11
- *
12
- * - A `Cause` is always flat: concurrent and sequential failures are stored together
13
- * in `cause.reasons` (a `ReadonlyArray<Reason<E>>`).
14
- * - Each `Reason` carries an `annotations` map with tracing metadata (stack frames, spans).
15
- * - An empty `reasons` array means the computation succeeded or the cause was empty
16
- * ({@link empty}).
17
- * - `Cause` implements `Equal`, so two causes with identical reasons compare as equal.
18
- *
19
- * ## Common tasks
20
- *
21
- * | Intent | API |
22
- * |--------|-----|
23
- * | Create a cause | {@link fail}, {@link die}, {@link interrupt}, {@link fromReasons} |
24
- * | Test for reason types | {@link hasFails}, {@link hasDies}, {@link hasInterrupts} |
25
- * | Extract the first error/defect | {@link findError}, {@link findDefect}, {@link findFail}, {@link findDie} |
26
- * | Iterate over reasons manually | `cause.reasons.filter(Cause.isFailReason)` |
27
- * | Combine two causes | {@link combine} |
28
- * | Transform errors | {@link map} |
29
- * | Collapse to a single thrown value | {@link squash} |
30
- * | Render for logging | {@link pretty}, {@link prettyErrors} |
31
- * | Attach/read tracing metadata | {@link annotate}, {@link annotations}, {@link reasonAnnotations} |
32
- *
33
- * ## Gotchas
34
- *
35
- * - `findError`/`findDefect` return `Filter.fail` (not `Option.none`) when no match is
36
- * found. Use {@link findErrorOption} if you need an `Option`.
37
- * - `squash` picks the first `Fail` error, then the first `Die` defect, then falls back
38
- * to a generic "interrupted" / "empty" error. It is lossy — use `prettyErrors` or
39
- * iterate `reasons` directly when you need all failures.
40
- * - The module also exports several built-in error classes (`NoSuchElementError`,
41
- * `TimeoutError`, `IllegalArgumentError`, `ExceededCapacityError`, `UnknownError`)
42
- * and the `Done` completion signal. These all implement `YieldableError` and can be
43
- * yielded directly inside `Effect.gen`.
44
- *
45
- * **Example** (inspecting a concurrent failure)
46
  *
47
- * ```ts
48
- * import { Cause, Effect } from "effect"
49
- *
50
- * const program = Effect.gen(function*() {
51
- * const cause = yield* Effect.sandbox(
52
- * Effect.all([
53
- * Effect.fail("err1"),
54
- * Effect.die("defect"),
55
- * Effect.fail("err2")
56
- * ], { concurrency: "unbounded" })
57
- * ).pipe(Effect.flip)
58
- *
59
- * const errors = cause.reasons
60
- * .filter(Cause.isFailReason)
61
- * .map((r) => r.error)
62
- *
63
- * const defects = cause.reasons
64
- * .filter(Cause.isDieReason)
65
- * .map((r) => r.defect)
66
- *
67
- * console.log(errors) // ["err1", "err2"] (order may vary)
68
- * console.log(defects) // ["defect"]
69
- * })
70
- *
71
- * Effect.runPromise(program)
72
- * ```
73
- *
74
- * @see {@link Cause} — the core interface
75
- * @see {@link Reason} — the union of failure kinds
76
- * @see {@link pretty} — human-readable rendering
77
  *
78
  * @since 2.0.0
79
  */
@@ -83,19 +15,19 @@ import * as effect from "./internal/effect.js";
83
  /**
84
  * Unique brand for `Cause` values, used for runtime type checks via {@link isCause}.
85
  *
86
- * @since 2.0.0
87
- * @category symbols
88
  */
89
  export const TypeId = core.CauseTypeId;
90
  /**
91
  * Unique brand for `Reason` values, used for runtime type checks via {@link isReason}.
92
  *
93
- * @since 2.0.0
94
- * @category symbols
95
  */
96
  export const ReasonTypeId = core.CauseReasonTypeId;
97
  /**
98
- * Tests if an arbitrary value is a {@link Cause}.
99
  *
100
  * **Example** (runtime type check)
101
  *
@@ -111,7 +43,7 @@ export const ReasonTypeId = core.CauseReasonTypeId;
111
  */
112
  export const isCause = core.isCause;
113
  /**
114
- * Tests if an arbitrary value is a {@link Reason} (`Fail`, `Die`, or `Interrupt`).
115
  *
116
  * **Example** (runtime type check)
117
  *
@@ -124,13 +56,16 @@ export const isCause = core.isCause;
124
  * ```
125
  *
126
  * @category guards
127
- * @since 2.0.0
128
  */
129
  export const isReason = core.isCauseReason;
130
  /**
131
- * Narrows a {@link Reason} to {@link Fail}.
 
 
132
  *
133
- * Useful as a predicate for `Array.filter` when iterating over `cause.reasons`.
 
134
  *
135
  * **Example** (filtering fail reasons)
136
  *
@@ -150,9 +85,12 @@ export const isReason = core.isCauseReason;
150
  */
151
  export const isFailReason = core.isFailReason;
152
  /**
153
- * Narrows a {@link Reason} to {@link Die}.
154
  *
155
- * Useful as a predicate for `Array.filter` when iterating over `cause.reasons`.
 
 
 
156
  *
157
  * **Example** (filtering die reasons)
158
  *
@@ -172,9 +110,12 @@ export const isFailReason = core.isFailReason;
172
  */
173
  export const isDieReason = core.isDieReason;
174
  /**
175
- * Narrows a {@link Reason} to {@link Interrupt}.
 
 
176
  *
177
- * Useful as a predicate for `Array.filter` when iterating over `cause.reasons`.
 
178
  *
179
  * **Example** (filtering interrupt reasons)
180
  *
@@ -194,14 +135,23 @@ export const isDieReason = core.isDieReason;
194
  */
195
  export const isInterruptReason = core.isInterruptReason;
196
  /**
197
- * Creates a {@link Cause} from an array of {@link Reason} values.
198
  *
199
- * Use this when you already have individual reasons (e.g. from filtering or
 
 
200
  * transforming another cause's `reasons` array) and need to wrap them back
201
  * into a `Cause`.
202
  *
203
- * - Returns a new `Cause`; does not mutate the input array.
204
- * - An empty array produces a cause equivalent to {@link empty}.
 
 
 
 
 
 
 
205
  *
206
  * **Example** (building a cause from reasons)
207
  *
@@ -219,25 +169,47 @@ export const isInterruptReason = core.isInterruptReason;
219
  * @see {@link combine} — merge two existing causes
220
  *
221
  * @category constructors
222
- * @since 2.0.0
223
  */
224
  export const fromReasons = core.causeFromReasons;
225
  /**
226
- * A {@link Cause} with an empty `reasons` array.
 
 
 
 
 
 
 
227
  *
228
  * Represents the absence of failure. Combining any cause with `empty` via
229
  * {@link combine} returns the original cause unchanged.
230
  *
231
- * @see {@link combine}
 
 
 
 
 
 
 
 
 
 
 
232
  *
233
  * @category constructors
234
  * @since 2.0.0
235
  */
236
  export const empty = core.causeEmpty;
237
  /**
238
- * Creates a {@link Cause} containing a single {@link Fail} reason with the
239
  * given typed error.
240
  *
 
 
 
 
241
  * **Example** (creating a fail cause)
242
  *
243
  * ```ts
@@ -256,15 +228,19 @@ export const empty = core.causeEmpty;
256
  */
257
  export const fail = core.causeFail;
258
  /**
259
- * Creates a {@link Cause} containing a single {@link Die} reason with the
260
  * given defect.
261
  *
 
 
 
 
262
  * **Example** (creating a die cause)
263
  *
264
  * ```ts
265
  * import { Cause } from "effect"
266
  *
267
- * const cause = Cause.die(new Error("Unexpected"))
268
  * console.log(cause.reasons.length) // 1
269
  * console.log(Cause.isDieReason(cause.reasons[0])) // true
270
  * ```
@@ -277,7 +253,7 @@ export const fail = core.causeFail;
277
  */
278
  export const die = core.causeDie;
279
  /**
280
- * Creates a {@link Cause} containing a single {@link Interrupt} reason,
281
  * optionally carrying the interrupting fiber's ID.
282
  *
283
  * **Example** (creating an interrupt cause)
@@ -298,10 +274,12 @@ export const die = core.causeDie;
298
  */
299
  export const interrupt = effect.causeInterrupt;
300
  /**
301
- * Creates a standalone {@link Fail} reason (not wrapped in a {@link Cause}).
302
  *
303
- * Use this when you need to construct individual reasons for
304
- * {@link fromReasons} or for direct comparison.
 
 
305
  *
306
  * **Example** (creating a Fail reason)
307
  *
@@ -321,15 +299,21 @@ export const interrupt = effect.causeInterrupt;
321
  */
322
  export const makeFailReason = error => new core.Fail(error);
323
  /**
324
- * Creates a standalone {@link Die} reason (not wrapped in a {@link Cause}).
 
 
 
 
 
325
  *
326
  * **Example** (creating a Die reason)
327
  *
328
  * ```ts
329
  * import { Cause } from "effect"
330
  *
331
- * const reason = Cause.makeDieReason(new Error("bug"))
332
  * console.log(reason._tag) // "Die"
 
333
  * ```
334
  *
335
  * @see {@link makeFailReason} — create a `Fail` reason
@@ -340,9 +324,14 @@ export const makeFailReason = error => new core.Fail(error);
340
  */
341
  export const makeDieReason = defect => new core.Die(defect);
342
  /**
343
- * Creates a standalone {@link Interrupt} reason (not wrapped in a {@link Cause}),
344
  * optionally carrying the interrupting fiber's ID.
345
  *
 
 
 
 
 
346
  * **Example** (creating an Interrupt reason)
347
  *
348
  * ```ts
@@ -361,11 +350,12 @@ export const makeDieReason = defect => new core.Die(defect);
361
  */
362
  export const makeInterruptReason = effect.makeInterruptReason;
363
  /**
364
- * Returns `true` if every reason in the cause is an {@link Interrupt} (and
365
  * there is at least one reason).
366
  *
367
- * Useful for deciding whether a failure was entirely due to interruption and
368
- * can be silently discarded.
 
369
  *
370
  * **Example** (checking interrupt-only causes)
371
  *
@@ -380,15 +370,24 @@ export const makeInterruptReason = effect.makeInterruptReason;
380
  * @see {@link hasInterrupts} — `true` if the cause contains *any* interrupts
381
  *
382
  * @category predicates
383
- * @since 2.0.0
384
  */
385
  export const hasInterruptsOnly = effect.hasInterruptsOnly;
386
  /**
387
- * Transforms the typed error values inside a {@link Cause} using the
388
- * provided function. Only {@link Fail} reasons are affected; {@link Die}
389
- * and {@link Interrupt} reasons pass through unchanged.
 
 
 
 
 
 
 
390
  *
391
- * Returns a new `Cause`; does not mutate the original.
 
 
392
  *
393
  * **Example** (mapping errors to uppercase)
394
  *
@@ -404,14 +403,20 @@ export const hasInterruptsOnly = effect.hasInterruptsOnly;
404
  * ```
405
  *
406
  * @category mapping
407
- * @since 4.0.0
408
  */
409
  export const map = effect.causeMap;
410
  /**
411
  * Merges two causes into a single cause whose `reasons` array is the union
412
  * of both inputs (de-duplicated by value equality).
413
  *
414
- * - Combining with {@link empty} returns the other cause unchanged.
 
 
 
 
 
 
415
  * - If the result is structurally equal to `self`, `self` is returned
416
  * (referential shortcut).
417
  *
@@ -427,23 +432,35 @@ export const map = effect.causeMap;
427
  * ```
428
  *
429
  * @see {@link fromReasons} — build a cause from an array of reasons
 
430
  *
431
  * @category combining
432
  * @since 4.0.0
433
  */
434
  export const combine = effect.causeCombine;
435
  /**
436
- * Collapses a {@link Cause} into a single `unknown` value, picking the "most
437
  * important" failure in this order:
438
  *
439
- * 1. First {@link Fail} error (the `E` value)
440
- * 2. First {@link Die} defect
 
 
 
 
 
 
 
441
  * 3. A generic `Error("All fibers interrupted without error")` for interrupt-only causes
442
- * 4. A generic `Error("Empty cause")` for {@link empty}
443
  *
444
  * This is the function used by `Effect.runPromise` and `Effect.runSync` to
445
- * decide what to throw. It is lossy — use {@link prettyErrors} or iterate
446
- * `cause.reasons` when you need all failures.
 
 
 
 
447
  *
448
  * **Example** (squashing a cause)
449
  *
@@ -462,7 +479,12 @@ export const combine = effect.causeCombine;
462
  */
463
  export const squash = effect.causeSquash;
464
  /**
465
- * Returns `true` if the cause contains at least one {@link Fail} reason.
 
 
 
 
 
466
  *
467
  * **Example** (checking for typed errors)
468
  *
@@ -477,15 +499,19 @@ export const squash = effect.causeSquash;
477
  * @see {@link hasInterrupts} — check for interruptions
478
  *
479
  * @category predicates
480
- * @since 2.0.0
481
  */
482
  export const hasFails = effect.hasFails;
483
  /**
484
- * Returns the first {@link Fail} reason from a cause, including its
485
- * annotations. Returns `Filter.fail` with the remaining cause when no
486
- * `Fail` is found.
 
 
 
487
  *
488
- * Use {@link findError} if you only need the unwrapped error value `E`.
 
489
  *
490
  * **Example** (extracting the first Fail reason)
491
  *
@@ -501,16 +527,20 @@ export const hasFails = effect.hasFails;
501
  * @see {@link findError} — extract the unwrapped `E` value
502
  * @see {@link findDie} — extract the first `Die` reason
503
  *
504
- * @category filters
505
  * @since 4.0.0
506
  */
507
  export const findFail = effect.findFail;
508
  /**
509
- * Returns the first typed error value `E` from a cause.
510
- * Returns `Filter.fail` with the remaining cause when no `Fail` is found.
 
 
511
  *
512
- * Use {@link findFail} if you need the full {@link Fail} reason (including
513
- * annotations). Use {@link findErrorOption} if you prefer an `Option`.
 
 
514
  *
515
  * **Example** (extracting the first error value)
516
  *
@@ -526,16 +556,18 @@ export const findFail = effect.findFail;
526
  * @see {@link findFail} — extract the full `Fail` reason
527
  * @see {@link findErrorOption} — `Option`-based variant
528
  *
529
- * @category filters
530
  * @since 4.0.0
531
  */
532
  export const findError = effect.findError;
533
  /**
534
  * Returns the first typed error value `E` from a cause wrapped in
535
- * `Option.some`, or `Option.none` if no {@link Fail} reason exists.
 
 
536
  *
537
- * This is a convenience wrapper around {@link findError} for code that
538
- * already works with `Option` instead of `Filter`.
539
  *
540
  * **Example** (extracting an error as Option)
541
  *
@@ -549,14 +581,19 @@ export const findError = effect.findError;
549
  * console.log(Option.isNone(none)) // true
550
  * ```
551
  *
552
- * @see {@link findError} — `Filter`-based variant
553
  *
554
- * @category filters
555
  * @since 4.0.0
556
  */
557
  export const findErrorOption = effect.findErrorOption;
558
  /**
559
- * Returns `true` if the cause contains at least one {@link Die} reason.
 
 
 
 
 
560
  *
561
  * **Example** (checking for defects)
562
  *
@@ -571,15 +608,18 @@ export const findErrorOption = effect.findErrorOption;
571
  * @see {@link hasInterrupts} — check for interruptions
572
  *
573
  * @category predicates
574
- * @since 2.0.0
575
  */
576
  export const hasDies = effect.hasDies;
577
  /**
578
- * Returns the first {@link Die} reason from a cause, including its
579
- * annotations. Returns `Filter.fail` with the original cause when no
580
- * `Die` is found.
 
 
581
  *
582
- * Use {@link findDefect} if you only need the unwrapped defect value.
 
583
  *
584
  * **Example** (extracting the first Die reason)
585
  *
@@ -595,17 +635,19 @@ export const hasDies = effect.hasDies;
595
  * @see {@link findDefect} — extract the unwrapped defect value
596
  * @see {@link findFail} — extract the first `Fail` reason
597
  *
598
- * @category filters
599
  * @since 4.0.0
600
  */
601
  export const findDie = effect.findDie;
602
  /**
603
- * Returns the first defect value (`unknown`) from a cause.
604
- * Returns `Filter.fail` with the original cause when no {@link Die} reason
605
- * is found.
 
 
606
  *
607
- * Use {@link findDie} if you need the full `Die` reason (including
608
- * annotations).
609
  *
610
  * **Example** (extracting the first defect)
611
  *
@@ -621,12 +663,12 @@ export const findDie = effect.findDie;
621
  * @see {@link findDie} — extract the full `Die` reason
622
  * @see {@link findError} — extract the first typed error
623
  *
624
- * @category filters
625
  * @since 4.0.0
626
  */
627
  export const findDefect = effect.findDefect;
628
  /**
629
- * Returns `true` if the cause contains at least one {@link Interrupt} reason.
630
  *
631
  * **Example** (checking for interruptions)
632
  *
@@ -642,13 +684,18 @@ export const findDefect = effect.findDefect;
642
  * @see {@link hasDies} — check for defects
643
  *
644
  * @category predicates
645
- * @since 2.0.0
646
  */
647
  export const hasInterrupts = effect.hasInterrupts;
648
  /**
649
- * Returns the first {@link Interrupt} reason from a cause, including its
650
- * annotations. Returns `Filter.fail` with the original cause when no
651
- * `Interrupt` is found.
 
 
 
 
 
652
  *
653
  * **Example** (extracting the first interrupt)
654
  *
@@ -663,16 +710,19 @@ export const hasInterrupts = effect.hasInterrupts;
663
  *
664
  * @see {@link interruptors} — collect all interrupting fiber IDs as a `Set`
665
  *
666
- * @category filters
667
  * @since 4.0.0
668
  */
669
  export const findInterrupt = effect.findInterrupt;
670
  /**
671
- * Collects the fiber IDs of all {@link Interrupt} reasons in the cause into
672
- * a `ReadonlySet`. Returns an empty set when the cause has no interrupts.
 
 
 
673
  *
674
- * This always succeeds (no `Filter.fail`). Use {@link filterInterruptors}
675
- * for the `Filter`-based variant.
676
  *
677
  * **Example** (collecting interruptors)
678
  *
@@ -683,45 +733,61 @@ export const findInterrupt = effect.findInterrupt;
683
  * Cause.interrupt(1),
684
  * Cause.interrupt(2)
685
  * )
686
- * console.log(Cause.interruptors(cause)) // Set { 1, 2 }
 
687
  * ```
688
  *
689
- * @see {@link filterInterruptors} — `Filter`-based variant
690
  *
691
  * @category accessors
692
- * @since 4.0.0
693
  */
694
  export const interruptors = effect.causeInterruptors;
695
  /**
696
- * Extracts the set of interrupting fiber IDs from a cause.
697
- * Returns `Filter.fail` with the original cause when no {@link Interrupt}
698
- * reason is found.
 
 
 
 
 
699
  *
700
- * Use {@link interruptors} if you always want a `Set` (possibly empty)
701
- * without `Filter` wrapping.
702
  *
703
- * **Example** (extracting interruptors with Filter)
 
 
 
 
704
  *
705
  * ```ts
706
  * import { Cause, Result } from "effect"
707
  *
708
  * const result = Cause.filterInterruptors(Cause.interrupt(1))
709
  * if (!Result.isFailure(result)) {
710
- * console.log(result.success) // Set { 1 }
711
  * }
712
  * ```
713
  *
714
  * @see {@link interruptors} — always-succeeding variant
715
  *
716
- * @category filters
717
  * @since 4.0.0
718
  */
719
  export const filterInterruptors = effect.causeFilterInterruptors;
720
  /**
721
- * Converts a {@link Cause} into an `Array<Error>` suitable for logging or
722
  * rethrowing.
723
  *
724
- * Each {@link Fail} and {@link Die} reason is converted into a standard
 
 
 
 
 
 
 
725
  * `Error`:
726
  *
727
  * - **Objects / Error instances** — `message`, `name`, `stack`, and `cause`
@@ -731,10 +797,12 @@ export const filterInterruptors = effect.causeFilterInterruptors;
731
  * - **Other primitives** (`null`, `undefined`, numbers, …) — wrapped in an
732
  * `Error` with message `"Unknown error: <value>"`.
733
  *
734
- * {@link Interrupt} reasons are collected separately. If the cause contains
735
  * **only** interrupts (no `Fail` or `Die`), a single `InterruptError` is
736
  * returned whose `cause` lists the interrupting fiber IDs.
737
  *
 
 
738
  * **Example** (converting a cause to errors)
739
  *
740
  * ```ts
@@ -748,13 +816,19 @@ export const filterInterruptors = effect.causeFilterInterruptors;
748
  * @see {@link pretty} — renders the cause as a single string
749
  * @see {@link squash} — lossy collapse to a single thrown value
750
  *
751
- * @since 4.0.0
752
  * @category rendering
 
753
  */
754
  export const prettyErrors = effect.causePrettyErrors;
755
  /**
756
- * Renders a {@link Cause} as a human-readable string for logging or
757
- * debugging.
 
 
 
 
 
 
758
  *
759
  * Delegates to {@link prettyErrors} to convert each reason to an `Error`,
760
  * then joins their stack traces with newlines. Nested `Error.cause` chains
@@ -771,25 +845,28 @@ export const prettyErrors = effect.causePrettyErrors;
771
  *
772
  * Span annotations are appended to the relevant stack frames when available.
773
  *
 
 
 
 
 
774
  * **Example** (rendering a cause)
775
  *
776
  * ```ts
777
  * import { Cause } from "effect"
778
  *
779
- * const cause = Cause.fail("something went wrong")
780
- * console.log(Cause.pretty(cause))
781
- * // Error: something went wrong
782
- * // at ...
783
  * ```
784
  *
785
  * @see {@link prettyErrors} — get the individual `Error` instances
786
  *
787
- * @since 4.0.0
788
  * @category rendering
 
789
  */
790
  export const pretty = effect.causePretty;
791
  /**
792
- * Tests if an arbitrary value is a {@link NoSuchElementError}.
793
  *
794
  * **Example** (runtime type check)
795
  *
@@ -805,14 +882,19 @@ export const pretty = effect.causePretty;
805
  */
806
  export const isNoSuchElementError = core.isNoSuchElementError;
807
  /**
808
- * Unique brand for {@link NoSuchElementError}.
809
  *
 
810
  * @since 4.0.0
811
- * @category symbols
812
  */
813
  export const NoSuchElementErrorTypeId = core.NoSuchElementErrorTypeId;
814
  /**
815
- * Constructs a {@link NoSuchElementError} with an optional message.
 
 
 
 
 
816
  *
817
  * **Example** (creating a NoSuchElementError)
818
  *
@@ -823,12 +905,14 @@ export const NoSuchElementErrorTypeId = core.NoSuchElementErrorTypeId;
823
  * console.log(error.message) // "Element not found"
824
  * ```
825
  *
 
 
826
  * @category constructors
827
  * @since 4.0.0
828
  */
829
  export const NoSuchElementError = core.NoSuchElementError;
830
  /**
831
- * Tests if an arbitrary value is a {@link Done} signal.
832
  *
833
  * **Example** (runtime type check)
834
  *
@@ -844,14 +928,18 @@ export const NoSuchElementError = core.NoSuchElementError;
844
  */
845
  export const isDone = core.isDone;
846
  /**
847
- * Unique brand for {@link Done} values.
848
  *
 
849
  * @since 4.0.0
850
- * @category symbols
851
  */
852
  export const DoneTypeId = core.DoneTypeId;
853
  /**
854
- * Creates a {@link Done} signal with an optional value.
 
 
 
 
855
  *
856
  * @see {@link done} — create a failing `Effect` with `Done`
857
  *
@@ -860,24 +948,40 @@ export const DoneTypeId = core.DoneTypeId;
860
  */
861
  export const Done = core.Done;
862
  /**
863
- * Creates an Effect that fails with a {@link Done} error. Shorthand for
864
  * `Effect.fail(Cause.Done(value))`.
865
  *
866
- * @see {@link Done:var | Done} — create the signal value without an Effect
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
867
  *
868
  * @category constructors
869
  * @since 4.0.0
870
  */
871
  export const done = core.done;
872
  /**
873
- * Unique brand for {@link TimeoutError}.
874
  *
 
875
  * @since 4.0.0
876
- * @category symbols
877
  */
878
  export const TimeoutErrorTypeId = effect.TimeoutErrorTypeId;
879
  /**
880
- * Tests if an arbitrary value is a {@link TimeoutError}.
881
  *
882
  * **Example** (runtime type check)
883
  *
@@ -893,7 +997,7 @@ export const TimeoutErrorTypeId = effect.TimeoutErrorTypeId;
893
  */
894
  export const isTimeoutError = effect.isTimeoutError;
895
  /**
896
- * Constructs a {@link TimeoutError} with an optional message.
897
  *
898
  * **Example** (creating a TimeoutError)
899
  *
@@ -909,14 +1013,14 @@ export const isTimeoutError = effect.isTimeoutError;
909
  */
910
  export const TimeoutError = effect.TimeoutError;
911
  /**
912
- * Unique brand for {@link IllegalArgumentError}.
913
  *
 
914
  * @since 4.0.0
915
- * @category symbols
916
  */
917
  export const IllegalArgumentErrorTypeId = effect.IllegalArgumentErrorTypeId;
918
  /**
919
- * Tests if an arbitrary value is an {@link IllegalArgumentError}.
920
  *
921
  * **Example** (runtime type check)
922
  *
@@ -932,7 +1036,7 @@ export const IllegalArgumentErrorTypeId = effect.IllegalArgumentErrorTypeId;
932
  */
933
  export const isIllegalArgumentError = effect.isIllegalArgumentError;
934
  /**
935
- * Constructs an {@link IllegalArgumentError} with an optional message.
936
  *
937
  * **Example** (creating an IllegalArgumentError)
938
  *
@@ -948,7 +1052,7 @@ export const isIllegalArgumentError = effect.isIllegalArgumentError;
948
  */
949
  export const IllegalArgumentError = effect.IllegalArgumentError;
950
  /**
951
- * Tests if an arbitrary value is an {@link ExceededCapacityError}.
952
  *
953
  * **Example** (runtime type check)
954
  *
@@ -964,14 +1068,18 @@ export const IllegalArgumentError = effect.IllegalArgumentError;
964
  */
965
  export const isExceededCapacityError = effect.isExceededCapacityError;
966
  /**
967
- * Unique brand for {@link ExceededCapacityError}.
968
  *
 
969
  * @since 4.0.0
970
- * @category symbols
971
  */
972
  export const ExceededCapacityErrorTypeId = effect.ExceededCapacityErrorTypeId;
973
  /**
974
- * Constructs an {@link ExceededCapacityError} with an optional message.
 
 
 
 
975
  *
976
  * **Example** (creating an ExceededCapacityError)
977
  *
@@ -982,38 +1090,76 @@ export const ExceededCapacityErrorTypeId = effect.ExceededCapacityErrorTypeId;
982
  * console.log(error.message) // "Queue full"
983
  * ```
984
  *
 
 
985
  * @category constructors
986
  * @since 4.0.0
987
  */
988
  export const ExceededCapacityError = effect.ExceededCapacityError;
989
  /**
990
- * Unique brand for {@link AsyncFiberError}.
 
991
  *
 
992
  * @since 4.0.0
993
- * @category symbols
994
  */
995
  export const AsyncFiberErrorTypeId = effect.AsyncFiberErrorTypeId;
996
  /**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
997
  * @category guards
998
  * @since 4.0.0
999
  */
1000
  export const isAsyncFiberError = effect.isAsyncFiberError;
1001
  /**
1002
- * An error that occurs when trying to run an async fiber with Effect.runSync.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1003
  *
1004
  * @category constructors
1005
  * @since 4.0.0
1006
  */
1007
  export const AsyncFiberError = effect.AsyncFiberError;
1008
  /**
1009
- * Unique brand for {@link UnknownError}.
1010
  *
 
1011
  * @since 4.0.0
1012
- * @category symbols
1013
  */
1014
  export const UnknownErrorTypeId = effect.UnknownErrorTypeId;
1015
  /**
1016
- * Tests if an arbitrary value is an {@link UnknownError}.
1017
  *
1018
  * **Example** (runtime type check)
1019
  *
@@ -1029,7 +1175,7 @@ export const UnknownErrorTypeId = effect.UnknownErrorTypeId;
1029
  */
1030
  export const isUnknownError = effect.isUnknownError;
1031
  /**
1032
- * Constructs an {@link UnknownError}. The first argument is the original
1033
  * cause (stored in `Error.cause`); the second is an optional human-readable
1034
  * message.
1035
  *
@@ -1047,13 +1193,19 @@ export const isUnknownError = effect.isUnknownError;
1047
  */
1048
  export const UnknownError = effect.UnknownError;
1049
  /**
1050
- * Attaches metadata to every reason in a {@link Cause}.
 
 
 
 
 
 
1051
  *
1052
  * Annotations are stored as a `Context` on each reason and can be
1053
  * retrieved later via {@link reasonAnnotations} or {@link annotations}.
1054
  * The runtime uses this to attach stack traces and spans.
1055
  *
1056
- * - Returns a new `Cause`; does not mutate the input.
1057
  * - By default, existing keys are preserved. Pass `{ overwrite: true }` to
1058
  * replace them.
1059
  *
@@ -1062,58 +1214,119 @@ export const UnknownError = effect.UnknownError;
1062
  * ```ts
1063
  * import { Cause, Context } from "effect"
1064
  *
 
 
1065
  * const cause = Cause.fail("error")
1066
- * const annotated = Cause.annotate(cause, Context.empty())
 
 
1067
  * ```
1068
  *
1069
- * @see {@link annotations} — read merged annotations from a cause
1070
- * @see {@link reasonAnnotations} — read annotations from a single reason
1071
  *
1072
  * @category annotations
1073
  * @since 4.0.0
1074
  */
1075
  export const annotate = core.causeAnnotate;
1076
  /**
1077
- * Reads the annotations from a single {@link Reason} as a `Context`.
1078
  *
1079
- * Use this when you need tracing metadata (e.g. {@link StackTrace}) from
 
 
1080
  * a specific reason rather than the whole cause.
1081
  *
 
 
 
 
 
 
 
 
 
 
 
 
 
1082
  * @see {@link annotations} — merged annotations from all reasons in a cause
1083
- * @see {@link annotate} — attach annotations
1084
  *
1085
  * @category annotations
1086
  * @since 4.0.0
1087
  */
1088
  export const reasonAnnotations = effect.reasonAnnotations;
1089
  /**
1090
- * Reads the merged annotations from all reasons in a {@link Cause}.
1091
  *
1092
- * Annotations from later reasons overwrite earlier ones when keys collide.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1093
  *
1094
  * @see {@link reasonAnnotations} — annotations from a single reason
1095
- * @see {@link annotate} — attach annotations
1096
  *
1097
  * @category annotations
1098
  * @since 4.0.0
1099
  */
1100
  export const annotations = effect.causeAnnotations;
1101
  /**
1102
- * `Context` key for the stack frame captured at the point of failure.
 
 
 
 
 
 
 
1103
  *
1104
  * The runtime annotates every reason with this when a stack frame is
1105
  * available. Retrieve it via
1106
  * `Context.get(Cause.reasonAnnotations(reason), Cause.StackTrace)`.
1107
  *
 
 
 
 
1108
  * @category annotations
1109
  * @since 4.0.0
1110
  */
1111
  export class StackTrace extends /*#__PURE__*/Context.Service()("effect/Cause/StackTrace") {}
1112
  /**
1113
- * `Context` key for the stack frame captured at the point of
1114
  * interruption.
1115
  *
1116
- * Similar to {@link StackTrace} but specific to {@link Interrupt} reasons.
 
 
 
 
 
 
 
 
 
 
 
1117
  *
1118
  * @category annotations
1119
  * @since 4.0.0
 
1
  /**
2
+ * Records the full reason an `Effect` failed.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  *
4
+ * A `Cause<E>` can contain typed failures, unexpected defects, interruptions,
5
+ * and annotations. Keeping those details together lets code inspect or format
6
+ * failures without first collapsing them to a single error value. This module
7
+ * includes the `Cause` and `Reason` data types, helpers for building and
8
+ * checking causes, and small error types used by several Effect APIs.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  *
10
  * @since 2.0.0
11
  */
 
15
  /**
16
  * Unique brand for `Cause` values, used for runtime type checks via {@link isCause}.
17
  *
18
+ * @category type IDs
19
+ * @since 4.0.0
20
  */
21
  export const TypeId = core.CauseTypeId;
22
  /**
23
  * Unique brand for `Reason` values, used for runtime type checks via {@link isReason}.
24
  *
25
+ * @category type IDs
26
+ * @since 4.0.0
27
  */
28
  export const ReasonTypeId = core.CauseReasonTypeId;
29
  /**
30
+ * Checks whether an arbitrary value is a `Cause`.
31
  *
32
  * **Example** (runtime type check)
33
  *
 
43
  */
44
  export const isCause = core.isCause;
45
  /**
46
+ * Checks whether an arbitrary value is a `Reason` (`Fail`, `Die`, or `Interrupt`).
47
  *
48
  * **Example** (runtime type check)
49
  *
 
56
  * ```
57
  *
58
  * @category guards
59
+ * @since 4.0.0
60
  */
61
  export const isReason = core.isCauseReason;
62
  /**
63
+ * Narrows a `Reason` to `Fail`.
64
+ *
65
+ * **When to use**
66
  *
67
+ * Use as a predicate for `Array.filter` to pick out typed `Fail` reasons when
68
+ * iterating over `cause.reasons`.
69
  *
70
  * **Example** (filtering fail reasons)
71
  *
 
85
  */
86
  export const isFailReason = core.isFailReason;
87
  /**
88
+ * Narrows a `Reason` to `Die`.
89
  *
90
+ * **When to use**
91
+ *
92
+ * Use as a predicate for `Array.filter` to pick out `Die` (defect) reasons when
93
+ * iterating over `cause.reasons`.
94
  *
95
  * **Example** (filtering die reasons)
96
  *
 
110
  */
111
  export const isDieReason = core.isDieReason;
112
  /**
113
+ * Narrows a `Reason` to `Interrupt`.
114
+ *
115
+ * **When to use**
116
  *
117
+ * Use as a predicate for `Array.filter` to pick out `Interrupt` reasons when
118
+ * iterating over `cause.reasons`.
119
  *
120
  * **Example** (filtering interrupt reasons)
121
  *
 
135
  */
136
  export const isInterruptReason = core.isInterruptReason;
137
  /**
138
+ * Creates a `Cause` from an array of `Reason` values.
139
  *
140
+ * **When to use**
141
+ *
142
+ * Use when you already have individual reasons (e.g. from filtering or
143
  * transforming another cause's `reasons` array) and need to wrap them back
144
  * into a `Cause`.
145
  *
146
+ * **Details**
147
+ *
148
+ * - Returns a new `Cause`.
149
+ * - An empty array produces a cause equivalent to `empty`.
150
+ *
151
+ * **Gotchas**
152
+ *
153
+ * The `reasons` array is stored as provided. Treat the array as immutable
154
+ * after passing it to this function.
155
  *
156
  * **Example** (building a cause from reasons)
157
  *
 
169
  * @see {@link combine} — merge two existing causes
170
  *
171
  * @category constructors
172
+ * @since 4.0.0
173
  */
174
  export const fromReasons = core.causeFromReasons;
175
  /**
176
+ * Represents a `Cause` with an empty `reasons` array.
177
+ *
178
+ * **When to use**
179
+ *
180
+ * Use to represent the absence of failure when constructing or combining
181
+ * causes.
182
+ *
183
+ * **Details**
184
  *
185
  * Represents the absence of failure. Combining any cause with `empty` via
186
  * {@link combine} returns the original cause unchanged.
187
  *
188
+ * **Example** (combining with the empty cause)
189
+ *
190
+ * ```ts
191
+ * import { Cause } from "effect"
192
+ *
193
+ * const cause = Cause.combine(Cause.empty, Cause.fail("boom"))
194
+ *
195
+ * console.log(cause.reasons.length) // 1
196
+ * console.log(Cause.hasFails(cause)) // true
197
+ * ```
198
+ *
199
+ * @see {@link combine} for merging causes where `empty` acts as the identity
200
  *
201
  * @category constructors
202
  * @since 2.0.0
203
  */
204
  export const empty = core.causeEmpty;
205
  /**
206
+ * Creates a `Cause` containing a single `Fail` reason with the
207
  * given typed error.
208
  *
209
+ * **When to use**
210
+ *
211
+ * Use to construct a cause from an expected typed error.
212
+ *
213
  * **Example** (creating a fail cause)
214
  *
215
  * ```ts
 
228
  */
229
  export const fail = core.causeFail;
230
  /**
231
+ * Creates a `Cause` containing a single `Die` reason with the
232
  * given defect.
233
  *
234
+ * **When to use**
235
+ *
236
+ * Use to construct a cause from an untyped defect or unexpected thrown value.
237
+ *
238
  * **Example** (creating a die cause)
239
  *
240
  * ```ts
241
  * import { Cause } from "effect"
242
  *
243
+ * const cause = Cause.die("Unexpected")
244
  * console.log(cause.reasons.length) // 1
245
  * console.log(Cause.isDieReason(cause.reasons[0])) // true
246
  * ```
 
253
  */
254
  export const die = core.causeDie;
255
  /**
256
+ * Creates a `Cause` containing a single `Interrupt` reason,
257
  * optionally carrying the interrupting fiber's ID.
258
  *
259
  * **Example** (creating an interrupt cause)
 
274
  */
275
  export const interrupt = effect.causeInterrupt;
276
  /**
277
+ * Creates a standalone `Fail` reason (not wrapped in a `Cause`).
278
  *
279
+ * **When to use**
280
+ *
281
+ * Use when constructing a standalone typed failure reason for
282
+ * {@link fromReasons} or direct comparison.
283
  *
284
  * **Example** (creating a Fail reason)
285
  *
 
299
  */
300
  export const makeFailReason = error => new core.Fail(error);
301
  /**
302
+ * Creates a standalone `Die` reason (not wrapped in a `Cause`).
303
+ *
304
+ * **When to use**
305
+ *
306
+ * Use when constructing a standalone defect reason for {@link fromReasons} or
307
+ * direct comparison.
308
  *
309
  * **Example** (creating a Die reason)
310
  *
311
  * ```ts
312
  * import { Cause } from "effect"
313
  *
314
+ * const reason = Cause.makeDieReason("bug")
315
  * console.log(reason._tag) // "Die"
316
+ * console.log(reason.defect) // "bug"
317
  * ```
318
  *
319
  * @see {@link makeFailReason} — create a `Fail` reason
 
324
  */
325
  export const makeDieReason = defect => new core.Die(defect);
326
  /**
327
+ * Creates a standalone `Interrupt` reason (not wrapped in a `Cause`),
328
  * optionally carrying the interrupting fiber's ID.
329
  *
330
+ * **When to use**
331
+ *
332
+ * Use when constructing a standalone interrupt reason for {@link fromReasons}
333
+ * or direct comparison.
334
+ *
335
  * **Example** (creating an Interrupt reason)
336
  *
337
  * ```ts
 
350
  */
351
  export const makeInterruptReason = effect.makeInterruptReason;
352
  /**
353
+ * Returns `true` if every reason in the cause is an `Interrupt` (and
354
  * there is at least one reason).
355
  *
356
+ * **When to use**
357
+ *
358
+ * Use when you need to detect failures caused only by interruption.
359
  *
360
  * **Example** (checking interrupt-only causes)
361
  *
 
370
  * @see {@link hasInterrupts} — `true` if the cause contains *any* interrupts
371
  *
372
  * @category predicates
373
+ * @since 4.0.0
374
  */
375
  export const hasInterruptsOnly = effect.hasInterruptsOnly;
376
  /**
377
+ * Transforms the typed error values inside a `Cause` using the
378
+ * provided function. Only `Fail` reasons are affected; `Die` and `Interrupt`
379
+ * reasons pass through unchanged.
380
+ *
381
+ * **When to use**
382
+ *
383
+ * Use to transform expected typed failures while preserving defects and
384
+ * interruptions unchanged.
385
+ *
386
+ * **Details**
387
  *
388
+ * If at least one `Fail` reason exists, this returns a new `Cause`
389
+ * containing the mapped failures. If the cause has no `Fail` reasons, the
390
+ * original cause is returned unchanged.
391
  *
392
  * **Example** (mapping errors to uppercase)
393
  *
 
403
  * ```
404
  *
405
  * @category mapping
406
+ * @since 2.0.0
407
  */
408
  export const map = effect.causeMap;
409
  /**
410
  * Merges two causes into a single cause whose `reasons` array is the union
411
  * of both inputs (de-duplicated by value equality).
412
  *
413
+ * **When to use**
414
+ *
415
+ * Use to merge independent causes into one structured failure value.
416
+ *
417
+ * **Details**
418
+ *
419
+ * - Combining with `empty` returns the other cause unchanged.
420
  * - If the result is structurally equal to `self`, `self` is returned
421
  * (referential shortcut).
422
  *
 
432
  * ```
433
  *
434
  * @see {@link fromReasons} — build a cause from an array of reasons
435
+ * @see {@link empty} for the identity cause used when combining
436
  *
437
  * @category combining
438
  * @since 4.0.0
439
  */
440
  export const combine = effect.causeCombine;
441
  /**
442
+ * Collapses a `Cause` into a single `unknown` value, picking the "most
443
  * important" failure in this order:
444
  *
445
+ * **When to use**
446
+ *
447
+ * Use to collapse a structured cause to the single value that synchronous and
448
+ * promise runners would throw.
449
+ *
450
+ * **Details**
451
+ *
452
+ * 1. First `Fail` error (the `E` value)
453
+ * 2. First `Die` defect
454
  * 3. A generic `Error("All fibers interrupted without error")` for interrupt-only causes
455
+ * 4. A generic `Error("Empty cause")` for `empty`
456
  *
457
  * This is the function used by `Effect.runPromise` and `Effect.runSync` to
458
+ * decide what to throw.
459
+ *
460
+ * **Gotchas**
461
+ *
462
+ * This function is lossy. Use {@link prettyErrors} or iterate `cause.reasons`
463
+ * when you need all failures.
464
  *
465
  * **Example** (squashing a cause)
466
  *
 
479
  */
480
  export const squash = effect.causeSquash;
481
  /**
482
+ * Returns `true` if the cause contains at least one `Fail` reason.
483
+ *
484
+ * **When to use**
485
+ *
486
+ * Use to check whether a cause includes typed failures before extracting,
487
+ * mapping, or rendering them.
488
  *
489
  * **Example** (checking for typed errors)
490
  *
 
499
  * @see {@link hasInterrupts} — check for interruptions
500
  *
501
  * @category predicates
502
+ * @since 4.0.0
503
  */
504
  export const hasFails = effect.hasFails;
505
  /**
506
+ * Returns a `Result` whose success value is the first `Fail` reason in
507
+ * the cause, including its annotations. If the cause has no `Fail` reason, the
508
+ * failure value is the original cause narrowed to `Cause<never>`, because it
509
+ * contains no typed error reasons.
510
+ *
511
+ * **When to use**
512
  *
513
+ * Use when you need the full `Fail` reason from a `Cause`, including
514
+ * annotations.
515
  *
516
  * **Example** (extracting the first Fail reason)
517
  *
 
527
  * @see {@link findError} — extract the unwrapped `E` value
528
  * @see {@link findDie} — extract the first `Die` reason
529
  *
530
+ * @category filtering
531
  * @since 4.0.0
532
  */
533
  export const findFail = effect.findFail;
534
  /**
535
+ * Returns a `Result` whose success value is the first typed error value `E`
536
+ * from a `Fail` reason in the cause. If the cause has no `Fail` reason,
537
+ * the failure value is the original cause narrowed to `Cause<never>`, because
538
+ * it contains no typed error reasons.
539
  *
540
+ * **When to use**
541
+ *
542
+ * Use when you need the first typed error value from a `Cause` as a `Result`
543
+ * that preserves the original cause when no match is found.
544
  *
545
  * **Example** (extracting the first error value)
546
  *
 
556
  * @see {@link findFail} — extract the full `Fail` reason
557
  * @see {@link findErrorOption} — `Option`-based variant
558
  *
559
+ * @category filtering
560
  * @since 4.0.0
561
  */
562
  export const findError = effect.findError;
563
  /**
564
  * Returns the first typed error value `E` from a cause wrapped in
565
+ * `Option.some`, or `Option.none` if no `Fail` reason exists.
566
+ *
567
+ * **When to use**
568
  *
569
+ * Use when you need the first typed error value from a `Cause` as an `Option`,
570
+ * discarding the original cause.
571
  *
572
  * **Example** (extracting an error as Option)
573
  *
 
581
  * console.log(Option.isNone(none)) // true
582
  * ```
583
  *
584
+ * @see {@link findError} — `Result`-based variant
585
  *
586
+ * @category filtering
587
  * @since 4.0.0
588
  */
589
  export const findErrorOption = effect.findErrorOption;
590
  /**
591
+ * Returns `true` if the cause contains at least one `Die` reason.
592
+ *
593
+ * **When to use**
594
+ *
595
+ * Use to check whether a cause includes defects before extracting or rendering
596
+ * them.
597
  *
598
  * **Example** (checking for defects)
599
  *
 
608
  * @see {@link hasInterrupts} — check for interruptions
609
  *
610
  * @category predicates
611
+ * @since 4.0.0
612
  */
613
  export const hasDies = effect.hasDies;
614
  /**
615
+ * Returns a `Result` whose success value is the first `Die` reason in
616
+ * the cause, including its annotations. If the cause has no `Die` reason, the
617
+ * failure value is the original cause.
618
+ *
619
+ * **When to use**
620
  *
621
+ * Use when you need the full `Die` reason from a `Cause`, including
622
+ * annotations.
623
  *
624
  * **Example** (extracting the first Die reason)
625
  *
 
635
  * @see {@link findDefect} — extract the unwrapped defect value
636
  * @see {@link findFail} — extract the first `Fail` reason
637
  *
638
+ * @category filtering
639
  * @since 4.0.0
640
  */
641
  export const findDie = effect.findDie;
642
  /**
643
+ * Returns a `Result` whose success value is the first defect value from a
644
+ * `Die` reason in the cause. If the cause has no `Die` reason, the
645
+ * failure value is the original cause.
646
+ *
647
+ * **When to use**
648
  *
649
+ * Use when you need the first defect value from a `Cause` as a `Result`,
650
+ * without the full `Die` reason.
651
  *
652
  * **Example** (extracting the first defect)
653
  *
 
663
  * @see {@link findDie} — extract the full `Die` reason
664
  * @see {@link findError} — extract the first typed error
665
  *
666
+ * @category filtering
667
  * @since 4.0.0
668
  */
669
  export const findDefect = effect.findDefect;
670
  /**
671
+ * Returns `true` if the cause contains at least one `Interrupt` reason.
672
  *
673
  * **Example** (checking for interruptions)
674
  *
 
684
  * @see {@link hasDies} — check for defects
685
  *
686
  * @category predicates
687
+ * @since 4.0.0
688
  */
689
  export const hasInterrupts = effect.hasInterrupts;
690
  /**
691
+ * Returns a `Result` whose success value is the first `Interrupt` reason
692
+ * in the cause, including its annotations. If the cause has no `Interrupt`
693
+ * reason, the failure value is the original cause.
694
+ *
695
+ * **When to use**
696
+ *
697
+ * Use when you need the first `Interrupt` reason from a `Cause`, including the
698
+ * fiber ID and annotations.
699
  *
700
  * **Example** (extracting the first interrupt)
701
  *
 
710
  *
711
  * @see {@link interruptors} — collect all interrupting fiber IDs as a `Set`
712
  *
713
+ * @category filtering
714
  * @since 4.0.0
715
  */
716
  export const findInterrupt = effect.findInterrupt;
717
  /**
718
+ * Collects the defined fiber IDs from all `Interrupt` reasons in the
719
+ * cause into a `ReadonlySet`. Interrupt reasons without a `fiberId` are
720
+ * ignored. Returns an empty set when the cause has no interrupting fiber IDs.
721
+ *
722
+ * **When to use**
723
  *
724
+ * Use when you need interrupting fiber IDs as a set, with absence represented
725
+ * as an empty set.
726
  *
727
  * **Example** (collecting interruptors)
728
  *
 
733
  * Cause.interrupt(1),
734
  * Cause.interrupt(2)
735
  * )
736
+ *
737
+ * console.log(Cause.interruptors(cause)) // Set(2) { 1, 2 }
738
  * ```
739
  *
740
+ * @see {@link filterInterruptors} — `Result`-based variant
741
  *
742
  * @category accessors
743
+ * @since 2.0.0
744
  */
745
  export const interruptors = effect.causeInterruptors;
746
  /**
747
+ * Returns a `Result` whose success value is the set of defined fiber IDs from
748
+ * the cause's `Interrupt` reasons. If the cause has no `Interrupt`
749
+ * reason, the failure value is the original cause.
750
+ *
751
+ * **When to use**
752
+ *
753
+ * Use when you need absence of interrupt reasons to fail with the original
754
+ * cause.
755
  *
756
+ * **Gotchas**
 
757
  *
758
+ * Interrupt reasons without a `fiberId` still count as interrupts, so the
759
+ * function succeeds with an empty `Set` when every interrupt reason has an
760
+ * undefined fiber ID.
761
+ *
762
+ * **Example** (extracting interruptors with Result)
763
  *
764
  * ```ts
765
  * import { Cause, Result } from "effect"
766
  *
767
  * const result = Cause.filterInterruptors(Cause.interrupt(1))
768
  * if (!Result.isFailure(result)) {
769
+ * console.log(result.success) // Set(1) { 1 }
770
  * }
771
  * ```
772
  *
773
  * @see {@link interruptors} — always-succeeding variant
774
  *
775
+ * @category filtering
776
  * @since 4.0.0
777
  */
778
  export const filterInterruptors = effect.causeFilterInterruptors;
779
  /**
780
+ * Converts a `Cause` into an `Array<Error>` suitable for logging or
781
  * rethrowing.
782
  *
783
+ * **When to use**
784
+ *
785
+ * Use to convert every renderable failure in a cause into individual `Error`
786
+ * values before logging or rethrowing.
787
+ *
788
+ * **Details**
789
+ *
790
+ * Each `Fail` and `Die` reason is converted into a standard
791
  * `Error`:
792
  *
793
  * - **Objects / Error instances** — `message`, `name`, `stack`, and `cause`
 
797
  * - **Other primitives** (`null`, `undefined`, numbers, …) — wrapped in an
798
  * `Error` with message `"Unknown error: <value>"`.
799
  *
800
+ * `Interrupt` reasons are collected separately. If the cause contains
801
  * **only** interrupts (no `Fail` or `Die`), a single `InterruptError` is
802
  * returned whose `cause` lists the interrupting fiber IDs.
803
  *
804
+ * An empty cause returns an empty array.
805
+ *
806
  * **Example** (converting a cause to errors)
807
  *
808
  * ```ts
 
816
  * @see {@link pretty} — renders the cause as a single string
817
  * @see {@link squash} — lossy collapse to a single thrown value
818
  *
 
819
  * @category rendering
820
+ * @since 3.2.0
821
  */
822
  export const prettyErrors = effect.causePrettyErrors;
823
  /**
824
+ * Formats a `Cause` as a human-readable string for logging or debugging.
825
+ *
826
+ * **When to use**
827
+ *
828
+ * Use to render a whole cause as one human-readable string for logs or
829
+ * diagnostics.
830
+ *
831
+ * **Details**
832
  *
833
  * Delegates to {@link prettyErrors} to convert each reason to an `Error`,
834
  * then joins their stack traces with newlines. Nested `Error.cause` chains
 
845
  *
846
  * Span annotations are appended to the relevant stack frames when available.
847
  *
848
+ * **Gotchas**
849
+ *
850
+ * Rendering an empty cause produces an empty string because there are no
851
+ * errors to render.
852
+ *
853
  * **Example** (rendering a cause)
854
  *
855
  * ```ts
856
  * import { Cause } from "effect"
857
  *
858
+ * const rendered = Cause.pretty(Cause.fail("something went wrong"))
859
+ * console.log(rendered.includes("something went wrong")) // true
 
 
860
  * ```
861
  *
862
  * @see {@link prettyErrors} — get the individual `Error` instances
863
  *
 
864
  * @category rendering
865
+ * @since 2.0.0
866
  */
867
  export const pretty = effect.causePretty;
868
  /**
869
+ * Checks whether an arbitrary value is a `NoSuchElementError`.
870
  *
871
  * **Example** (runtime type check)
872
  *
 
882
  */
883
  export const isNoSuchElementError = core.isNoSuchElementError;
884
  /**
885
+ * Unique brand for `NoSuchElementError`.
886
  *
887
+ * @category type IDs
888
  * @since 4.0.0
 
889
  */
890
  export const NoSuchElementErrorTypeId = core.NoSuchElementErrorTypeId;
891
  /**
892
+ * Constructs a `NoSuchElementError` with an optional message.
893
+ *
894
+ * **When to use**
895
+ *
896
+ * Use to create the error value for APIs that intentionally fail when an
897
+ * expected element is absent.
898
  *
899
  * **Example** (creating a NoSuchElementError)
900
  *
 
905
  * console.log(error.message) // "Element not found"
906
  * ```
907
  *
908
+ * @see {@link isNoSuchElementError} for checking unknown values
909
+ *
910
  * @category constructors
911
  * @since 4.0.0
912
  */
913
  export const NoSuchElementError = core.NoSuchElementError;
914
  /**
915
+ * Checks whether an arbitrary value is a `Done` signal.
916
  *
917
  * **Example** (runtime type check)
918
  *
 
928
  */
929
  export const isDone = core.isDone;
930
  /**
931
+ * Unique brand for `Done` values.
932
  *
933
+ * @category type IDs
934
  * @since 4.0.0
 
935
  */
936
  export const DoneTypeId = core.DoneTypeId;
937
  /**
938
+ * Creates a `Done` signal with an optional value.
939
+ *
940
+ * **When to use**
941
+ *
942
+ * Use when you need to construct a low-level pull completion signal directly.
943
  *
944
  * @see {@link done} — create a failing `Effect` with `Done`
945
  *
 
948
  */
949
  export const Done = core.Done;
950
  /**
951
+ * Creates an Effect that fails with a `Done` error. Shorthand for
952
  * `Effect.fail(Cause.Done(value))`.
953
  *
954
+ * **When to use**
955
+ *
956
+ * Use when you model stream or queue completion through the error channel.
957
+ *
958
+ * **Example** (failing with Done)
959
+ *
960
+ * ```ts
961
+ * import { Cause, Effect } from "effect"
962
+ *
963
+ * const program = Cause.done("finished")
964
+ *
965
+ * Effect.runPromiseExit(program).then((exit) => {
966
+ * console.log(exit._tag) // "Failure"
967
+ * })
968
+ * ```
969
+ *
970
+ * @see {@link Done} — create the signal value without an Effect
971
  *
972
  * @category constructors
973
  * @since 4.0.0
974
  */
975
  export const done = core.done;
976
  /**
977
+ * Unique brand for `TimeoutError`.
978
  *
979
+ * @category type IDs
980
  * @since 4.0.0
 
981
  */
982
  export const TimeoutErrorTypeId = effect.TimeoutErrorTypeId;
983
  /**
984
+ * Checks whether an arbitrary value is a `TimeoutError`.
985
  *
986
  * **Example** (runtime type check)
987
  *
 
997
  */
998
  export const isTimeoutError = effect.isTimeoutError;
999
  /**
1000
+ * Constructs a `TimeoutError` with an optional message.
1001
  *
1002
  * **Example** (creating a TimeoutError)
1003
  *
 
1013
  */
1014
  export const TimeoutError = effect.TimeoutError;
1015
  /**
1016
+ * Unique brand for `IllegalArgumentError`.
1017
  *
1018
+ * @category type IDs
1019
  * @since 4.0.0
 
1020
  */
1021
  export const IllegalArgumentErrorTypeId = effect.IllegalArgumentErrorTypeId;
1022
  /**
1023
+ * Checks whether an arbitrary value is an `IllegalArgumentError`.
1024
  *
1025
  * **Example** (runtime type check)
1026
  *
 
1036
  */
1037
  export const isIllegalArgumentError = effect.isIllegalArgumentError;
1038
  /**
1039
+ * Constructs an `IllegalArgumentError` with an optional message.
1040
  *
1041
  * **Example** (creating an IllegalArgumentError)
1042
  *
 
1052
  */
1053
  export const IllegalArgumentError = effect.IllegalArgumentError;
1054
  /**
1055
+ * Checks whether an arbitrary value is an `ExceededCapacityError`.
1056
  *
1057
  * **Example** (runtime type check)
1058
  *
 
1068
  */
1069
  export const isExceededCapacityError = effect.isExceededCapacityError;
1070
  /**
1071
+ * Unique brand for `ExceededCapacityError`.
1072
  *
1073
+ * @category type IDs
1074
  * @since 4.0.0
 
1075
  */
1076
  export const ExceededCapacityErrorTypeId = effect.ExceededCapacityErrorTypeId;
1077
  /**
1078
+ * Constructs an `ExceededCapacityError` with an optional message.
1079
+ *
1080
+ * **When to use**
1081
+ *
1082
+ * Use to create the error value for bounded-resource capacity failures.
1083
  *
1084
  * **Example** (creating an ExceededCapacityError)
1085
  *
 
1090
  * console.log(error.message) // "Queue full"
1091
  * ```
1092
  *
1093
+ * @see {@link isExceededCapacityError} for checking unknown values
1094
+ *
1095
  * @category constructors
1096
  * @since 4.0.0
1097
  */
1098
  export const ExceededCapacityError = effect.ExceededCapacityError;
1099
  /**
1100
+ * Unique brand present on `AsyncFiberError` values and used by
1101
+ * `isAsyncFiberError` for runtime checks.
1102
  *
1103
+ * @category type IDs
1104
  * @since 4.0.0
 
1105
  */
1106
  export const AsyncFiberErrorTypeId = effect.AsyncFiberErrorTypeId;
1107
  /**
1108
+ * Checks whether an arbitrary value is an `AsyncFiberError`.
1109
+ *
1110
+ * **Example** (runtime type check)
1111
+ *
1112
+ * ```ts
1113
+ * import { Cause } from "effect"
1114
+ * import type { Fiber } from "effect"
1115
+ *
1116
+ * declare const fiber: Fiber.Fiber<unknown, unknown>
1117
+ *
1118
+ * const error = new Cause.AsyncFiberError(fiber)
1119
+ * console.log(Cause.isAsyncFiberError(error)) // true
1120
+ * console.log(Cause.isAsyncFiberError("nope")) // false
1121
+ * ```
1122
+ *
1123
  * @category guards
1124
  * @since 4.0.0
1125
  */
1126
  export const isAsyncFiberError = effect.isAsyncFiberError;
1127
  /**
1128
+ * Constructs an `AsyncFiberError` for a fiber that could not be resolved
1129
+ * synchronously.
1130
+ *
1131
+ * **When to use**
1132
+ *
1133
+ * Use to create the error value for a fiber that could not be completed by a
1134
+ * synchronous runner.
1135
+ *
1136
+ * **Example** (creating an AsyncFiberError)
1137
+ *
1138
+ * ```ts
1139
+ * import { Cause } from "effect"
1140
+ * import type { Fiber } from "effect"
1141
+ *
1142
+ * declare const fiber: Fiber.Fiber<unknown, unknown>
1143
+ *
1144
+ * const error = new Cause.AsyncFiberError(fiber)
1145
+ * console.log(error.message) // "An asynchronous Effect was executed with Effect.runSync"
1146
+ * ```
1147
+ *
1148
+ * @see {@link isAsyncFiberError} for checking unknown values
1149
  *
1150
  * @category constructors
1151
  * @since 4.0.0
1152
  */
1153
  export const AsyncFiberError = effect.AsyncFiberError;
1154
  /**
1155
+ * Unique brand for `UnknownError`.
1156
  *
1157
+ * @category type IDs
1158
  * @since 4.0.0
 
1159
  */
1160
  export const UnknownErrorTypeId = effect.UnknownErrorTypeId;
1161
  /**
1162
+ * Checks whether an arbitrary value is an `UnknownError`.
1163
  *
1164
  * **Example** (runtime type check)
1165
  *
 
1175
  */
1176
  export const isUnknownError = effect.isUnknownError;
1177
  /**
1178
+ * Constructs an `UnknownError`. The first argument is the original
1179
  * cause (stored in `Error.cause`); the second is an optional human-readable
1180
  * message.
1181
  *
 
1193
  */
1194
  export const UnknownError = effect.UnknownError;
1195
  /**
1196
+ * Attaches metadata to every reason in a `Cause`.
1197
+ *
1198
+ * **When to use**
1199
+ *
1200
+ * Use to attach diagnostic metadata to every reason in a cause.
1201
+ *
1202
+ * **Details**
1203
  *
1204
  * Annotations are stored as a `Context` on each reason and can be
1205
  * retrieved later via {@link reasonAnnotations} or {@link annotations}.
1206
  * The runtime uses this to attach stack traces and spans.
1207
  *
1208
+ * - Returns a new `Cause`.
1209
  * - By default, existing keys are preserved. Pass `{ overwrite: true }` to
1210
  * replace them.
1211
  *
 
1214
  * ```ts
1215
  * import { Cause, Context } from "effect"
1216
  *
1217
+ * class RequestId extends Context.Service<RequestId, string>()("RequestId") {}
1218
+ *
1219
  * const cause = Cause.fail("error")
1220
+ * const annotated = Cause.annotate(cause, Context.make(RequestId, "req-1"))
1221
+ *
1222
+ * console.log(Context.getOrUndefined(Cause.annotations(annotated), RequestId)) // "req-1"
1223
  * ```
1224
  *
1225
+ * @see {@link annotations} for reading merged annotations from a cause
1226
+ * @see {@link reasonAnnotations} for reading annotations from a single reason
1227
  *
1228
  * @category annotations
1229
  * @since 4.0.0
1230
  */
1231
  export const annotate = core.causeAnnotate;
1232
  /**
1233
+ * Reads the annotations from a single `Reason` as a `Context`.
1234
  *
1235
+ * **When to use**
1236
+ *
1237
+ * Use when you need tracing metadata (e.g. `StackTrace`) from
1238
  * a specific reason rather than the whole cause.
1239
  *
1240
+ * **Example** (reading reason annotations)
1241
+ *
1242
+ * ```ts
1243
+ * import { Cause, Context } from "effect"
1244
+ *
1245
+ * class RequestId extends Context.Service<RequestId, string>()("RequestId") {}
1246
+ *
1247
+ * const reason = Cause.makeFailReason("error")
1248
+ * const annotated = reason.annotate(Context.make(RequestId, "req-1"))
1249
+ *
1250
+ * console.log(Context.getOrUndefined(Cause.reasonAnnotations(annotated), RequestId)) // "req-1"
1251
+ * ```
1252
+ *
1253
  * @see {@link annotations} — merged annotations from all reasons in a cause
 
1254
  *
1255
  * @category annotations
1256
  * @since 4.0.0
1257
  */
1258
  export const reasonAnnotations = effect.reasonAnnotations;
1259
  /**
1260
+ * Reads the merged annotations from all reasons in a `Cause`.
1261
  *
1262
+ * **When to use**
1263
+ *
1264
+ * Use to read diagnostic metadata merged from the whole cause.
1265
+ *
1266
+ * **Gotchas**
1267
+ *
1268
+ * When multiple reasons contain the same annotation key, the value from the
1269
+ * later reason wins.
1270
+ *
1271
+ * **Example** (reading merged annotations)
1272
+ *
1273
+ * ```ts
1274
+ * import { Cause, Context } from "effect"
1275
+ *
1276
+ * class RequestId extends Context.Service<RequestId, string>()("RequestId") {}
1277
+ *
1278
+ * const cause = Cause.annotate(
1279
+ * Cause.fail("error"),
1280
+ * Context.make(RequestId, "req-1")
1281
+ * )
1282
+ *
1283
+ * console.log(Context.getOrUndefined(Cause.annotations(cause), RequestId)) // "req-1"
1284
+ * ```
1285
  *
1286
  * @see {@link reasonAnnotations} — annotations from a single reason
 
1287
  *
1288
  * @category annotations
1289
  * @since 4.0.0
1290
  */
1291
  export const annotations = effect.causeAnnotations;
1292
  /**
1293
+ * Context annotation used to store the stack frame captured at the point of failure.
1294
+ *
1295
+ * **When to use**
1296
+ *
1297
+ * Use to read the failure stack-frame annotation from a `Reason` when building
1298
+ * diagnostics, logging, or custom cause renderers.
1299
+ *
1300
+ * **Details**
1301
  *
1302
  * The runtime annotates every reason with this when a stack frame is
1303
  * available. Retrieve it via
1304
  * `Context.get(Cause.reasonAnnotations(reason), Cause.StackTrace)`.
1305
  *
1306
+ * @see {@link reasonAnnotations} for reading annotations from a single reason
1307
+ * @see {@link annotations} for reading merged annotations from a cause
1308
+ * @see {@link InterruptorStackTrace} for the interrupt-specific stack-frame annotation
1309
+ *
1310
  * @category annotations
1311
  * @since 4.0.0
1312
  */
1313
  export class StackTrace extends /*#__PURE__*/Context.Service()("effect/Cause/StackTrace") {}
1314
  /**
1315
+ * Context annotation used to store the stack frame captured at the point of
1316
  * interruption.
1317
  *
1318
+ * **When to use**
1319
+ *
1320
+ * Use when you need the stack-frame annotation used by interrupt-only cause
1321
+ * rendering.
1322
+ *
1323
+ * **Details**
1324
+ *
1325
+ * Similar to `StackTrace` but specific to `Interrupt` reasons.
1326
+ *
1327
+ * @see {@link StackTrace} for stack frames attached to failures
1328
+ * @see {@link reasonAnnotations} for reading annotations from a single reason
1329
+ * @see {@link annotate} for attaching annotations to a cause
1330
  *
1331
  * @category annotations
1332
  * @since 4.0.0
.opencode/node_modules/effect/dist/Cause.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Cause.js","names":["Context","core","effect","TypeId","CauseTypeId","ReasonTypeId","CauseReasonTypeId","isCause","isReason","isCauseReason","isFailReason","isDieReason","isInterruptReason","fromReasons","causeFromReasons","empty","causeEmpty","fail","causeFail","die","causeDie","interrupt","causeInterrupt","makeFailReason","error","Fail","makeDieReason","defect","Die","makeInterruptReason","hasInterruptsOnly","map","causeMap","combine","causeCombine","squash","causeSquash","hasFails","findFail","findError","findErrorOption","hasDies","findDie","findDefect","hasInterrupts","findInterrupt","interruptors","causeInterruptors","filterInterruptors","causeFilterInterruptors","prettyErrors","causePrettyErrors","pretty","causePretty","isNoSuchElementError","NoSuchElementErrorTypeId","NoSuchElementError","isDone","DoneTypeId","Done","done","TimeoutErrorTypeId","isTimeoutError","TimeoutError","IllegalArgumentErrorTypeId","isIllegalArgumentError","IllegalArgumentError","isExceededCapacityError","ExceededCapacityErrorTypeId","ExceededCapacityError","AsyncFiberErrorTypeId","isAsyncFiberError","AsyncFiberError","UnknownErrorTypeId","isUnknownError","UnknownError","annotate","causeAnnotate","reasonAnnotations","annotations","causeAnnotations","StackTrace","Service","InterruptorStackTrace"],"sources":["../src/Cause.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+EA,OAAO,KAAKA,OAAO,MAAM,cAAc;AAKvC,OAAO,KAAKC,IAAI,MAAM,oBAAoB;AAC1C,OAAO,KAAKC,MAAM,MAAM,sBAAsB;AAO9C;;;;;;AAMA,OAAO,MAAMC,MAAM,GAAoBF,IAAI,CAACG,WAAW;AAEvD;;;;;;AAMA,OAAO,MAAMC,YAAY,GAA2BJ,IAAI,CAACK,iBAAiB;AAsC1E;;;;;;;;;;;;;;;AAeA,OAAO,MAAMC,OAAO,GAA8CN,IAAI,CAACM,OAAO;AAE9E;;;;;;;;;;;;;;;;AAgBA,OAAO,MAAMC,QAAQ,GAA+CP,IAAI,CAACQ,aAAa;AAmCtF;;;;;;;;;;;;;;;;;;;;;AAqBA,OAAO,MAAMC,YAAY,GAA4CT,IAAI,CAACS,YAAY;AAEtF;;;;;;;;;;;;;;;;;;;;;AAqBA,OAAO,MAAMC,WAAW,GAAwCV,IAAI,CAACU,WAAW;AAEhF;;;;;;;;;;;;;;;;;;;;;AAqBA,OAAO,MAAMC,iBAAiB,GAA8CX,IAAI,CAACW,iBAAiB;AA8JlG;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,OAAO,MAAMC,WAAW,GAERZ,IAAI,CAACa,gBAAgB;AAErC;;;;;;;;;;;AAWA,OAAO,MAAMC,KAAK,GAAiBd,IAAI,CAACe,UAAU;AAElD;;;;;;;;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MAAMC,cAAc,GAAsCxE,MAAM,CAACwE,cAAc;AA6BtF;;;;;;;;;;;;;;;;;AAiBA,OAAO,MAAMC,YAAY,GAA0DzE,MAAM,CAACyE,YAAY;AAEtG;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,OAAO,MAAMC,QAAQ,GA8DjB3E,IAAI,CAAC4E,aAAa;AAEtB;;;;;;;;;;;;AAYA,OAAO,MAAMC,iBAAiB,GAAmD5E,MAAM,CAAC4E,iBAAiB;AAEzG;;;;;;;;;;;AAWA,OAAO,MAAMC,WAAW,GAAkD7E,MAAM,CAAC8E,gBAAgB;AAEjG;;;;;;;;;;AAUA,OAAM,MAAOC,UAAW,sBAAQjF,OAAO,CAACkF,OAAO,EAA0B,CAAC,yBAAyB,CAAC;AAEpG;;;;;;;;;AASA,OAAM,MAAOC,qBACX,sBAAQnF,OAAO,CAACkF,OAAO,EAAqC,CAAC,oCAAoC,CAAC","ignoreList":[]}
 
1
+ {"version":3,"file":"Cause.js","names":["Context","core","effect","TypeId","CauseTypeId","ReasonTypeId","CauseReasonTypeId","isCause","isReason","isCauseReason","isFailReason","isDieReason","isInterruptReason","fromReasons","causeFromReasons","empty","causeEmpty","fail","causeFail","die","causeDie","interrupt","causeInterrupt","makeFailReason","error","Fail","makeDieReason","defect","Die","makeInterruptReason","hasInterruptsOnly","map","causeMap","combine","causeCombine","squash","causeSquash","hasFails","findFail","findError","findErrorOption","hasDies","findDie","findDefect","hasInterrupts","findInterrupt","interruptors","causeInterruptors","filterInterruptors","causeFilterInterruptors","prettyErrors","causePrettyErrors","pretty","causePretty","isNoSuchElementError","NoSuchElementErrorTypeId","NoSuchElementError","isDone","DoneTypeId","Done","done","TimeoutErrorTypeId","isTimeoutError","TimeoutError","IllegalArgumentErrorTypeId","isIllegalArgumentError","IllegalArgumentError","isExceededCapacityError","ExceededCapacityErrorTypeId","ExceededCapacityError","AsyncFiberErrorTypeId","isAsyncFiberError","AsyncFiberError","UnknownErrorTypeId","isUnknownError","UnknownError","annotate","causeAnnotate","reasonAnnotations","annotations","causeAnnotations","StackTrace","Service","InterruptorStackTrace"],"sources":["../src/Cause.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;AAWA,OAAO,KAAKA,OAAO,MAAM,cAAc;AAKvC,OAAO,KAAKC,IAAI,MAAM,oBAAoB;AAC1C,OAAO,KAAKC,MAAM,MAAM,sBAAsB;AAO9C;;;;;;AAMA,OAAO,MAAMC,MAAM,GAAoBF,IAAI,CAACG,WAAW;AAEvD;;;;;;AAMA,OAAO,MAAMC,YAAY,GAA2BJ,IAAI,CAACK,iBAAiB;AA2C1E;;;;;;;;;;;;;;;AAeA,OAAO,MAAMC,OAAO,GAA8CN,IAAI,CAACM,OAAO;AAE9E;;;;;;;;;;;;;;;;AAgBA,OAAO,MAAMC,QAAQ,GAA+CP,IAAI,CAACQ,aAAa;AAiCtF;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,OAAO,MAAMC,YAAY,GAA4CT,IAAI,CAACS,YAAY;AAEtF;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,OAAO,MAAMC,WAAW,GAAwCV,IAAI,CAACU,WAAW;AAEhF;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,OAAO,MAAMC,iBAAiB,GAA8CX,IAAI,CAACW,iBAAiB;AA0KlG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,OAAO,MAAMC,WAAW,GAERZ,IAAI,CAACa,gBAAgB;AAErC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,OAAO,MAAMC,KAAK,GAAiBd,IAAI,CAACe,UAAU;AAElD;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,OAAO,MAAMC,IAAI,GAA8BhB,IAAI,CAACiB,SAAS;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,OAAO,MAAMC,GAAG,GAAsClB,IAAI,CAACmB,QAAQ;AAEnE;;;;;;;;;;;;;;;;;;;;AAoBA,OAAO,MA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AAeA,OAAO,MAAMC,cAAc,GAAsCxE,MAAM,CAACwE,cAAc;AA6BtF;;;;;;;;;;;;;;;;;AAiBA,OAAO,MAAMC,YAAY,GAA0DzE,MAAM,CAACyE,YAAY;AAEtG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,OAAO,MAAMC,QAAQ,GAkFjB3E,IAAI,CAAC4E,aAAa;AAEtB;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,OAAO,MAAMC,iBAAiB,GAAmD5E,MAAM,CAAC4E,iBAAiB;AAEzG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,OAAO,MAAMC,WAAW,GAAkD7E,MAAM,CAAC8E,gBAAgB;AAEjG;;;;;;;;;;;;;;;;;;;;;AAqBA,OAAM,MAAOC,UAAW,sBAAQjF,OAAO,CAACkF,OAAO,EAA0B,CAAC,yBAAyB,CAAC;AAEpG;;;;;;;;;;;;;;;;;;;;AAoBA,OAAM,MAAOC,qBACX,sBAAQnF,OAAO,CAACkF,OAAO,EAAqC,CAAC,oCAAoC,CAAC","ignoreList":[]}
.opencode/node_modules/effect/dist/Channel.d.ts CHANGED
The diff for this file is too large to render. See raw diff
 
.opencode/node_modules/effect/dist/Channel.d.ts.map CHANGED
The diff for this file is too large to render. See raw diff
 
.opencode/node_modules/effect/dist/Channel.js CHANGED
The diff for this file is too large to render. See raw diff
 
.opencode/node_modules/effect/dist/Channel.js.map CHANGED
The diff for this file is too large to render. See raw diff
 
.opencode/node_modules/effect/dist/ChannelSchema.d.ts CHANGED
@@ -1,45 +1,165 @@
1
  /**
 
 
 
 
 
 
2
  * @since 4.0.0
3
  */
4
  import type * as Arr from "./Array.ts";
5
  import * as Channel from "./Channel.ts";
6
  import * as Schema from "./Schema.ts";
7
  /**
8
- * @since 4.0.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  * @category constructors
 
10
  */
11
  export declare const encode: <S extends Schema.Top>(schema: S) => <IE = never, Done = unknown>() => Channel.Channel<Arr.NonEmptyReadonlyArray<S["Encoded"]>, IE | Schema.SchemaError, Done, Arr.NonEmptyReadonlyArray<S["Type"]>, IE, Done, S["EncodingServices"]>;
12
  /**
13
- * @since 4.0.0
 
 
 
 
 
 
 
 
 
14
  * @category constructors
 
15
  */
16
  export declare const encodeUnknown: <S extends Schema.Top>(schema: S) => <IE = never, Done = unknown>() => Channel.Channel<Arr.NonEmptyReadonlyArray<unknown>, IE | Schema.SchemaError, Done, Arr.NonEmptyReadonlyArray<S["Type"]>, IE, Done, S["EncodingServices"]>;
17
  /**
18
- * @since 4.0.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  * @category constructors
 
20
  */
21
  export declare const decode: <S extends Schema.Top>(schema: S) => <IE = never, Done = unknown>() => Channel.Channel<Arr.NonEmptyReadonlyArray<S["Type"]>, IE | Schema.SchemaError, Done, Arr.NonEmptyReadonlyArray<S["Encoded"]>, IE, Done, S["DecodingServices"]>;
22
  /**
23
- * @since 4.0.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  * @category constructors
 
25
  */
26
  export declare const decodeUnknown: <S extends Schema.Top>(schema: S) => <IE = never, Done = unknown>() => Channel.Channel<Arr.NonEmptyReadonlyArray<S["Type"]>, IE | Schema.SchemaError, Done, Arr.NonEmptyReadonlyArray<S["Encoded"]>, IE, Done, S["DecodingServices"]>;
27
  /**
28
- * @since 4.0.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  * @category combinators
 
30
  */
31
  export declare const duplex: {
32
  /**
33
- * @since 4.0.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  * @category combinators
 
35
  */
36
  <In extends Schema.Top, Out extends Schema.Top>(options: {
37
  readonly inputSchema: In;
38
  readonly outputSchema: Out;
39
  }): <OutErr, OutDone, InErr, InDone, R>(self: Channel.Channel<Arr.NonEmptyReadonlyArray<Out["Encoded"]>, OutErr, OutDone, Arr.NonEmptyReadonlyArray<In["Encoded"]>, Schema.SchemaError | InErr, InDone, R>) => Channel.Channel<Arr.NonEmptyReadonlyArray<Out["Type"]>, Schema.SchemaError | OutErr, OutDone, Arr.NonEmptyReadonlyArray<In["Type"]>, InErr, InDone, R | In["EncodingServices"] | Out["DecodingServices"]>;
40
  /**
41
- * @since 4.0.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  * @category combinators
 
43
  */
44
  <Out extends Schema.Top, OutErr, OutDone, In extends Schema.Top, InErr, InDone, R>(self: Channel.Channel<Arr.NonEmptyReadonlyArray<Out["Encoded"]>, OutErr, OutDone, Arr.NonEmptyReadonlyArray<In["Encoded"]>, Schema.SchemaError | InErr, InDone, R>, options: {
45
  readonly inputSchema: In;
@@ -47,21 +167,69 @@ export declare const duplex: {
47
  }): Channel.Channel<Arr.NonEmptyReadonlyArray<Out["Type"]>, Schema.SchemaError | OutErr, OutDone, Arr.NonEmptyReadonlyArray<In["Type"]>, InErr, InDone, R | In["EncodingServices"] | Out["DecodingServices"]>;
48
  };
49
  /**
50
- * @since 4.0.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  * @category combinators
 
52
  */
53
  export declare const duplexUnknown: {
54
  /**
55
- * @since 4.0.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  * @category combinators
 
57
  */
58
  <In extends Schema.Top, Out extends Schema.Top>(options: {
59
  readonly inputSchema: In;
60
  readonly outputSchema: Out;
61
  }): <OutErr, OutDone, InErr, InDone, R>(self: Channel.Channel<Arr.NonEmptyReadonlyArray<unknown>, OutErr, OutDone, Arr.NonEmptyReadonlyArray<any>, Schema.SchemaError | InErr, InDone, R>) => Channel.Channel<Arr.NonEmptyReadonlyArray<Out["Type"]>, Schema.SchemaError | OutErr, OutDone, Arr.NonEmptyReadonlyArray<In["Type"]>, InErr, InDone, R | In["EncodingServices"] | Out["DecodingServices"]>;
62
  /**
63
- * @since 4.0.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  * @category combinators
 
65
  */
66
  <Out extends Schema.Top, OutErr, OutDone, In extends Schema.Top, InErr, InDone, R>(self: Channel.Channel<Arr.NonEmptyReadonlyArray<unknown>, OutErr, OutDone, Arr.NonEmptyReadonlyArray<any>, Schema.SchemaError | InErr, InDone, R>, options: {
67
  readonly inputSchema: In;
 
1
  /**
2
+ * Schema adapters for `Channel` boundaries. The helpers encode typed channel
3
+ * chunks before they cross an encoded boundary, decode encoded chunks before
4
+ * application code receives them, and wrap bidirectional channels so callers
5
+ * work with schema-typed input and output while the inner channel uses encoded
6
+ * values.
7
+ *
8
  * @since 4.0.0
9
  */
10
  import type * as Arr from "./Array.ts";
11
  import * as Channel from "./Channel.ts";
12
  import * as Schema from "./Schema.ts";
13
  /**
14
+ * Creates a channel that encodes non-empty chunks of schema values into the
15
+ * schema's encoded representation.
16
+ *
17
+ * **When to use**
18
+ *
19
+ * Use to encode typed channel input into the schema's encoded representation
20
+ * before passing chunks to an encoded downstream boundary.
21
+ *
22
+ * **Details**
23
+ *
24
+ * Encoding failures are emitted as `SchemaError`, and any encoding services
25
+ * required by the schema become channel requirements.
26
+ *
27
+ * @see {@link encodeUnknown} for encoded output chunks that should be typed as `unknown`
28
+ * @see {@link decode} for the inverse channel that decodes encoded chunks into schema values
29
+ *
30
  * @category constructors
31
+ * @since 4.0.0
32
  */
33
  export declare const encode: <S extends Schema.Top>(schema: S) => <IE = never, Done = unknown>() => Channel.Channel<Arr.NonEmptyReadonlyArray<S["Encoded"]>, IE | Schema.SchemaError, Done, Arr.NonEmptyReadonlyArray<S["Type"]>, IE, Done, S["EncodingServices"]>;
34
  /**
35
+ * Creates an `encode` channel variant whose encoded output chunks are typed as
36
+ * `unknown`.
37
+ *
38
+ * **When to use**
39
+ *
40
+ * Use when a channel boundary should encode typed input chunks while the encoded
41
+ * output representation is intentionally untyped.
42
+ *
43
+ * @see {@link encode} for the variant that preserves the schema encoded type
44
+ *
45
  * @category constructors
46
+ * @since 4.0.0
47
  */
48
  export declare const encodeUnknown: <S extends Schema.Top>(schema: S) => <IE = never, Done = unknown>() => Channel.Channel<Arr.NonEmptyReadonlyArray<unknown>, IE | Schema.SchemaError, Done, Arr.NonEmptyReadonlyArray<S["Type"]>, IE, Done, S["EncodingServices"]>;
49
  /**
50
+ * Creates a channel that decodes non-empty chunks from the schema's encoded
51
+ * representation into schema values.
52
+ *
53
+ * **When to use**
54
+ *
55
+ * Use to validate and decode encoded channel output into typed schema values
56
+ * before application code consumes it.
57
+ *
58
+ * **Details**
59
+ *
60
+ * Decoding failures are emitted as `SchemaError`, and any decoding services
61
+ * required by the schema become channel requirements.
62
+ *
63
+ * @see {@link decodeUnknown} for boundaries where the encoded input side is intentionally untyped
64
+ * @see {@link encode} for the inverse adapter that encodes typed schema values
65
+ *
66
  * @category constructors
67
+ * @since 4.0.0
68
  */
69
  export declare const decode: <S extends Schema.Top>(schema: S) => <IE = never, Done = unknown>() => Channel.Channel<Arr.NonEmptyReadonlyArray<S["Type"]>, IE | Schema.SchemaError, Done, Arr.NonEmptyReadonlyArray<S["Encoded"]>, IE, Done, S["DecodingServices"]>;
70
  /**
71
+ * Creates a `decode` channel variant for schema-decoding channel boundaries.
72
+ *
73
+ * **When to use**
74
+ *
75
+ * Use when you need an intentionally unknown or untyped encoded input while
76
+ * keeping only the decoded output statically typed according to the schema.
77
+ *
78
+ * **Details**
79
+ *
80
+ * The channel decodes non-empty encoded chunks into schema values, emits
81
+ * `SchemaError` when decoding fails, and requires the schema's decoding
82
+ * services.
83
+ *
84
+ * @see {@link decode} for the typed variant that preserves the schema's encoded type
85
+ *
86
  * @category constructors
87
+ * @since 4.0.0
88
  */
89
  export declare const decodeUnknown: <S extends Schema.Top>(schema: S) => <IE = never, Done = unknown>() => Channel.Channel<Arr.NonEmptyReadonlyArray<S["Type"]>, IE | Schema.SchemaError, Done, Arr.NonEmptyReadonlyArray<S["Encoded"]>, IE, Done, S["DecodingServices"]>;
90
  /**
91
+ * Wraps a channel so callers work with typed input and output chunks while the
92
+ * wrapped channel uses encoded chunks.
93
+ *
94
+ * **When to use**
95
+ *
96
+ * Use to expose typed input and output at a bidirectional channel boundary
97
+ * while the wrapped channel continues to operate on schema-encoded chunks.
98
+ *
99
+ * **Details**
100
+ *
101
+ * Values sent into the resulting channel are encoded with `inputSchema` before
102
+ * reaching the wrapped channel. Values emitted by the wrapped channel are
103
+ * decoded with `outputSchema` before they are emitted downstream. Schema
104
+ * failures are surfaced as `SchemaError`.
105
+ *
106
+ * @see {@link duplexUnknown} for the variant whose encoded side is intentionally untyped
107
+ * @see {@link encode} for encoding typed chunks at one-way channel boundaries
108
+ * @see {@link decode} for decoding encoded chunks at one-way channel boundaries
109
+ *
110
  * @category combinators
111
+ * @since 4.0.0
112
  */
113
  export declare const duplex: {
114
  /**
115
+ * Wraps a channel so callers work with typed input and output chunks while the
116
+ * wrapped channel uses encoded chunks.
117
+ *
118
+ * **When to use**
119
+ *
120
+ * Use to expose typed input and output at a bidirectional channel boundary
121
+ * while the wrapped channel continues to operate on schema-encoded chunks.
122
+ *
123
+ * **Details**
124
+ *
125
+ * Values sent into the resulting channel are encoded with `inputSchema` before
126
+ * reaching the wrapped channel. Values emitted by the wrapped channel are
127
+ * decoded with `outputSchema` before they are emitted downstream. Schema
128
+ * failures are surfaced as `SchemaError`.
129
+ *
130
+ * @see {@link duplexUnknown} for the variant whose encoded side is intentionally untyped
131
+ * @see {@link encode} for encoding typed chunks at one-way channel boundaries
132
+ * @see {@link decode} for decoding encoded chunks at one-way channel boundaries
133
+ *
134
  * @category combinators
135
+ * @since 4.0.0
136
  */
137
  <In extends Schema.Top, Out extends Schema.Top>(options: {
138
  readonly inputSchema: In;
139
  readonly outputSchema: Out;
140
  }): <OutErr, OutDone, InErr, InDone, R>(self: Channel.Channel<Arr.NonEmptyReadonlyArray<Out["Encoded"]>, OutErr, OutDone, Arr.NonEmptyReadonlyArray<In["Encoded"]>, Schema.SchemaError | InErr, InDone, R>) => Channel.Channel<Arr.NonEmptyReadonlyArray<Out["Type"]>, Schema.SchemaError | OutErr, OutDone, Arr.NonEmptyReadonlyArray<In["Type"]>, InErr, InDone, R | In["EncodingServices"] | Out["DecodingServices"]>;
141
  /**
142
+ * Wraps a channel so callers work with typed input and output chunks while the
143
+ * wrapped channel uses encoded chunks.
144
+ *
145
+ * **When to use**
146
+ *
147
+ * Use to expose typed input and output at a bidirectional channel boundary
148
+ * while the wrapped channel continues to operate on schema-encoded chunks.
149
+ *
150
+ * **Details**
151
+ *
152
+ * Values sent into the resulting channel are encoded with `inputSchema` before
153
+ * reaching the wrapped channel. Values emitted by the wrapped channel are
154
+ * decoded with `outputSchema` before they are emitted downstream. Schema
155
+ * failures are surfaced as `SchemaError`.
156
+ *
157
+ * @see {@link duplexUnknown} for the variant whose encoded side is intentionally untyped
158
+ * @see {@link encode} for encoding typed chunks at one-way channel boundaries
159
+ * @see {@link decode} for decoding encoded chunks at one-way channel boundaries
160
+ *
161
  * @category combinators
162
+ * @since 4.0.0
163
  */
164
  <Out extends Schema.Top, OutErr, OutDone, In extends Schema.Top, InErr, InDone, R>(self: Channel.Channel<Arr.NonEmptyReadonlyArray<Out["Encoded"]>, OutErr, OutDone, Arr.NonEmptyReadonlyArray<In["Encoded"]>, Schema.SchemaError | InErr, InDone, R>, options: {
165
  readonly inputSchema: In;
 
167
  }): Channel.Channel<Arr.NonEmptyReadonlyArray<Out["Type"]>, Schema.SchemaError | OutErr, OutDone, Arr.NonEmptyReadonlyArray<In["Type"]>, InErr, InDone, R | In["EncodingServices"] | Out["DecodingServices"]>;
168
  };
169
  /**
170
+ * Wraps a bidirectional channel whose encoded chunks are typed as `unknown`.
171
+ *
172
+ * **When to use**
173
+ *
174
+ * Use when you need a bidirectional channel to cross an encoded boundary whose
175
+ * chunk types are intentionally erased, while callers send and receive
176
+ * schema-typed chunks.
177
+ *
178
+ * **Details**
179
+ *
180
+ * The resulting channel accepts typed input chunks, encodes them with
181
+ * `inputSchema`, decodes unknown output chunks with `outputSchema`, and
182
+ * surfaces schema failures as `SchemaError`.
183
+ *
184
+ * @see {@link duplex} for the variant that preserves the schema encoded types on the wrapped channel
185
+ *
186
  * @category combinators
187
+ * @since 4.0.0
188
  */
189
  export declare const duplexUnknown: {
190
  /**
191
+ * Wraps a bidirectional channel whose encoded chunks are typed as `unknown`.
192
+ *
193
+ * **When to use**
194
+ *
195
+ * Use when you need a bidirectional channel to cross an encoded boundary whose
196
+ * chunk types are intentionally erased, while callers send and receive
197
+ * schema-typed chunks.
198
+ *
199
+ * **Details**
200
+ *
201
+ * The resulting channel accepts typed input chunks, encodes them with
202
+ * `inputSchema`, decodes unknown output chunks with `outputSchema`, and
203
+ * surfaces schema failures as `SchemaError`.
204
+ *
205
+ * @see {@link duplex} for the variant that preserves the schema encoded types on the wrapped channel
206
+ *
207
  * @category combinators
208
+ * @since 4.0.0
209
  */
210
  <In extends Schema.Top, Out extends Schema.Top>(options: {
211
  readonly inputSchema: In;
212
  readonly outputSchema: Out;
213
  }): <OutErr, OutDone, InErr, InDone, R>(self: Channel.Channel<Arr.NonEmptyReadonlyArray<unknown>, OutErr, OutDone, Arr.NonEmptyReadonlyArray<any>, Schema.SchemaError | InErr, InDone, R>) => Channel.Channel<Arr.NonEmptyReadonlyArray<Out["Type"]>, Schema.SchemaError | OutErr, OutDone, Arr.NonEmptyReadonlyArray<In["Type"]>, InErr, InDone, R | In["EncodingServices"] | Out["DecodingServices"]>;
214
  /**
215
+ * Wraps a bidirectional channel whose encoded chunks are typed as `unknown`.
216
+ *
217
+ * **When to use**
218
+ *
219
+ * Use when you need a bidirectional channel to cross an encoded boundary whose
220
+ * chunk types are intentionally erased, while callers send and receive
221
+ * schema-typed chunks.
222
+ *
223
+ * **Details**
224
+ *
225
+ * The resulting channel accepts typed input chunks, encodes them with
226
+ * `inputSchema`, decodes unknown output chunks with `outputSchema`, and
227
+ * surfaces schema failures as `SchemaError`.
228
+ *
229
+ * @see {@link duplex} for the variant that preserves the schema encoded types on the wrapped channel
230
+ *
231
  * @category combinators
232
+ * @since 4.0.0
233
  */
234
  <Out extends Schema.Top, OutErr, OutDone, In extends Schema.Top, InErr, InDone, R>(self: Channel.Channel<Arr.NonEmptyReadonlyArray<unknown>, OutErr, OutDone, Arr.NonEmptyReadonlyArray<any>, Schema.SchemaError | InErr, InDone, R>, options: {
235
  readonly inputSchema: In;
.opencode/node_modules/effect/dist/ChannelSchema.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ChannelSchema.d.ts","sourceRoot":"","sources":["../src/ChannelSchema.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,GAAG,MAAM,YAAY,CAAA;AACtC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAGvC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AAErC;;;GAGG;AACH,eAAO,MAAM,MAAM,GAAI,CAAC,SAAS,MAAM,CAAC,GAAG,EACzC,QAAQ,CAAC,MAEV,EAAE,GAAG,KAAK,EAAE,IAAI,GAAG,OAAO,OAAK,OAAO,CAAC,OAAO,CAC7C,GAAG,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,EACvC,EAAE,GAAG,MAAM,CAAC,WAAW,EACvB,IAAI,EACJ,GAAG,CAAC,qBAAqB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EACpC,EAAE,EACF,IAAI,EACJ,CAAC,CAAC,kBAAkB,CAAC,CAItB,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,EAC/C,MAAM,EAAE,CAAC,KACN,CAAC,EAAE,GAAG,KAAK,EAAE,IAAI,GAAG,OAAO,OAAO,OAAO,CAAC,OAAO,CACpD,GAAG,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAClC,EAAE,GAAG,MAAM,CAAC,WAAW,EACvB,IAAI,EACJ,GAAG,CAAC,qBAAqB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EACpC,EAAE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AG,CAAC,qBAAqB,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,EACrC,KAAK,EACL,MAAM,EACN,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,GAAG,GAAG,CAAC,kBAAkB,CAAC,CACrD,CAAA;IACD;;;;;;;;;;;;;;;;;;;OAmBG;IACH,CAAC,GAAG,SAAS,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,SAAS,MAAM,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAC/E,IAAI,EAAE,OAAO,CAAC,OAAO,CACnB,GAAG,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAClC,MAAM,EACN,OAAO,EACP,GAAG,CAAC,qBAAqB,CAAC,GAAG,CAAC,EAC9B,MAAM,CAAC,WAAW,GAAG,KAAK,EAC1B,MAAM,EACN,CAAC,CACF,EACD,OAAO,EAAE;QACP,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAA;QACxB,QAAQ,CAAC,YAAY,EAAE,GAAG,CAAA;KAC3B,GACA,OAAO,CAAC,OAAO,CAChB,GAAG,CAAC,qBAAqB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EACtC,MAAM,CAAC,WAAW,GAAG,MAAM,EAC3B,OAAO,EACP,GAAG,CAAC,qBAAqB,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,EACrC,KAAK,EACL,MAAM,EACN,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,GAAG,GAAG,CAAC,kBAAkB,CAAC,CACrD,CAAA;CACO,CAAA"}
.opencode/node_modules/effect/dist/ChannelSchema.js CHANGED
@@ -3,39 +3,131 @@ import * as Effect from "./Effect.js";
3
  import { dual } from "./Function.js";
4
  import * as Schema from "./Schema.js";
5
  /**
6
- * @since 4.0.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  * @category constructors
 
8
  */
9
  export const encode = schema => () => {
10
  const encode = Schema.encodeEffect(Schema.NonEmptyArray(schema));
11
  return Channel.fromTransform((upstream, _scope) => Effect.succeed(Effect.flatMap(upstream, chunk => encode(chunk))));
12
  };
13
  /**
14
- * @since 4.0.0
 
 
 
 
 
 
 
 
 
15
  * @category constructors
 
16
  */
17
  export const encodeUnknown = encode;
18
  /**
19
- * @since 4.0.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  * @category constructors
 
21
  */
22
  export const decode = schema => () => {
23
  const decode = Schema.decodeEffect(Schema.NonEmptyArray(schema));
24
  return Channel.fromTransform((upstream, _scope) => Effect.succeed(Effect.flatMap(upstream, chunk => decode(chunk))));
25
  };
26
  /**
27
- * @since 4.0.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  * @category constructors
 
29
  */
30
  export const decodeUnknown = decode;
31
  /**
32
- * @since 4.0.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  * @category combinators
 
34
  */
35
  export const duplex = /*#__PURE__*/dual(2, (self, options) => encode(options.inputSchema)().pipe(Channel.pipeTo(self), Channel.pipeTo(decode(options.outputSchema)())));
36
  /**
37
- * @since 4.0.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  * @category combinators
 
39
  */
40
  export const duplexUnknown = duplex;
41
  //# sourceMappingURL=ChannelSchema.js.map
 
3
  import { dual } from "./Function.js";
4
  import * as Schema from "./Schema.js";
5
  /**
6
+ * Creates a channel that encodes non-empty chunks of schema values into the
7
+ * schema's encoded representation.
8
+ *
9
+ * **When to use**
10
+ *
11
+ * Use to encode typed channel input into the schema's encoded representation
12
+ * before passing chunks to an encoded downstream boundary.
13
+ *
14
+ * **Details**
15
+ *
16
+ * Encoding failures are emitted as `SchemaError`, and any encoding services
17
+ * required by the schema become channel requirements.
18
+ *
19
+ * @see {@link encodeUnknown} for encoded output chunks that should be typed as `unknown`
20
+ * @see {@link decode} for the inverse channel that decodes encoded chunks into schema values
21
+ *
22
  * @category constructors
23
+ * @since 4.0.0
24
  */
25
  export const encode = schema => () => {
26
  const encode = Schema.encodeEffect(Schema.NonEmptyArray(schema));
27
  return Channel.fromTransform((upstream, _scope) => Effect.succeed(Effect.flatMap(upstream, chunk => encode(chunk))));
28
  };
29
  /**
30
+ * Creates an `encode` channel variant whose encoded output chunks are typed as
31
+ * `unknown`.
32
+ *
33
+ * **When to use**
34
+ *
35
+ * Use when a channel boundary should encode typed input chunks while the encoded
36
+ * output representation is intentionally untyped.
37
+ *
38
+ * @see {@link encode} for the variant that preserves the schema encoded type
39
+ *
40
  * @category constructors
41
+ * @since 4.0.0
42
  */
43
  export const encodeUnknown = encode;
44
  /**
45
+ * Creates a channel that decodes non-empty chunks from the schema's encoded
46
+ * representation into schema values.
47
+ *
48
+ * **When to use**
49
+ *
50
+ * Use to validate and decode encoded channel output into typed schema values
51
+ * before application code consumes it.
52
+ *
53
+ * **Details**
54
+ *
55
+ * Decoding failures are emitted as `SchemaError`, and any decoding services
56
+ * required by the schema become channel requirements.
57
+ *
58
+ * @see {@link decodeUnknown} for boundaries where the encoded input side is intentionally untyped
59
+ * @see {@link encode} for the inverse adapter that encodes typed schema values
60
+ *
61
  * @category constructors
62
+ * @since 4.0.0
63
  */
64
  export const decode = schema => () => {
65
  const decode = Schema.decodeEffect(Schema.NonEmptyArray(schema));
66
  return Channel.fromTransform((upstream, _scope) => Effect.succeed(Effect.flatMap(upstream, chunk => decode(chunk))));
67
  };
68
  /**
69
+ * Creates a `decode` channel variant for schema-decoding channel boundaries.
70
+ *
71
+ * **When to use**
72
+ *
73
+ * Use when you need an intentionally unknown or untyped encoded input while
74
+ * keeping only the decoded output statically typed according to the schema.
75
+ *
76
+ * **Details**
77
+ *
78
+ * The channel decodes non-empty encoded chunks into schema values, emits
79
+ * `SchemaError` when decoding fails, and requires the schema's decoding
80
+ * services.
81
+ *
82
+ * @see {@link decode} for the typed variant that preserves the schema's encoded type
83
+ *
84
  * @category constructors
85
+ * @since 4.0.0
86
  */
87
  export const decodeUnknown = decode;
88
  /**
89
+ * Wraps a channel so callers work with typed input and output chunks while the
90
+ * wrapped channel uses encoded chunks.
91
+ *
92
+ * **When to use**
93
+ *
94
+ * Use to expose typed input and output at a bidirectional channel boundary
95
+ * while the wrapped channel continues to operate on schema-encoded chunks.
96
+ *
97
+ * **Details**
98
+ *
99
+ * Values sent into the resulting channel are encoded with `inputSchema` before
100
+ * reaching the wrapped channel. Values emitted by the wrapped channel are
101
+ * decoded with `outputSchema` before they are emitted downstream. Schema
102
+ * failures are surfaced as `SchemaError`.
103
+ *
104
+ * @see {@link duplexUnknown} for the variant whose encoded side is intentionally untyped
105
+ * @see {@link encode} for encoding typed chunks at one-way channel boundaries
106
+ * @see {@link decode} for decoding encoded chunks at one-way channel boundaries
107
+ *
108
  * @category combinators
109
+ * @since 4.0.0
110
  */
111
  export const duplex = /*#__PURE__*/dual(2, (self, options) => encode(options.inputSchema)().pipe(Channel.pipeTo(self), Channel.pipeTo(decode(options.outputSchema)())));
112
  /**
113
+ * Wraps a bidirectional channel whose encoded chunks are typed as `unknown`.
114
+ *
115
+ * **When to use**
116
+ *
117
+ * Use when you need a bidirectional channel to cross an encoded boundary whose
118
+ * chunk types are intentionally erased, while callers send and receive
119
+ * schema-typed chunks.
120
+ *
121
+ * **Details**
122
+ *
123
+ * The resulting channel accepts typed input chunks, encodes them with
124
+ * `inputSchema`, decodes unknown output chunks with `outputSchema`, and
125
+ * surfaces schema failures as `SchemaError`.
126
+ *
127
+ * @see {@link duplex} for the variant that preserves the schema encoded types on the wrapped channel
128
+ *
129
  * @category combinators
130
+ * @since 4.0.0
131
  */
132
  export const duplexUnknown = duplex;
133
  //# sourceMappingURL=ChannelSchema.js.map
.opencode/node_modules/effect/dist/ChannelSchema.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ChannelSchema.js","names":["Channel","Effect","dual","Schema","encode","schema","encodeEffect","NonEmptyArray","fromTransform","upstream","_scope","succeed","flatMap","chunk","encodeUnknown","decode","decodeEffect","decodeUnknown","duplex","self","options","inputSchema","pipe","pipeTo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AACuB,MAAM,CAACR,MAAM,CAACK,OAAO,CAACI,YAAY,CAAC,EAAE,CAAC,CAC/C,CAAC;AAEJ;;;;AAIA,OAAO,MAAMC,aAAa,GAwDtBP,MAAM","ignoreList":[]}
 
1
+ {"version":3,"file":"ChannelSchema.js","names":["Channel","Effect","dual","Schema","encode","schema","encodeEffect","NonEmptyArray","fromTransform","upstream","_scope","succeed","flatMap","chunk","encodeUnknown","decode","decodeEffect","decodeUnknown","duplex","self","options","inputSchema","pipe","pipeTo","outputSchema","duplexUnknown"],"sources":["../src/ChannelSchema.ts"],"sourcesContent":[null],"mappings":"AAUA,OAAO,KAAKA,OAAO,MAAM,cAAc;AACvC,OAAO,KAAKC,MAAM,MAAM,aAAa;AACrC,SAASC,IAAI,QAAQ,eAAe;AACpC,OAAO,KAAKC,MAAM,MAAM,aAAa;AAErC;;;;;;;;;;;;;;;;;;;;AAoBA,OAAO,MAAMC,MAAM,GACjBC,MAAS,IAEX,MAQI;EACF,MAAMD,MAAM,GAAGD,MAAM,CAACG,YAAY,CAACH,MAAM,CAACI,aAAa,CAACF,MAAM,CAAC,CAAC;EAChE,OAAOL,OAAO,CAACQ,aAAa,CAAC,CAACC,QAAQ,EAAEC,MAAM,KAAKT,MAAM,CAACU,OAAO,CAACV,MAAM,CAACW,OAAO,CAACH,QAAQ,EAAGI,KAAK,IAAKT,MAAM,CAACS,KAAK,CAAC,CAAC,CAAC,CAAC;AACxH,CAAC;AAED;;;;;;;;;;;;;;AAcA,OAAO,MAAMC,aAAa,GAUtBV,MAAM;AAEV;;;;;;;;;;;;;;;;;;;;AAoBA,OAAO,MAAMW,MAAM,GACjBV,MAAS,IAEX,MAQI;EACF,MAAMU,MAAM,GAAGZ,MAAM,CAACa,YAAY,CAACb,MAAM,CAACI,aAAa,CAACF,MAAM,CAAC,CAAC;EAChE,OAAOL,OAAO,CAACQ,aAAa,CAAC,CAACC,QAAQ,EAAEC,MAAM,KAAKT,MAAM,CAACU,OAAO,CAACV,MAAM,CAACW,OAAO,CAACH,QAAQ,EAAGI,KAAK,IAAKE,MAAM,CAACF,KAAK,CAAC,CAAC,CAAC,CAAC;AACxH,CAAC;AAED;;;;;;;;;;;;;;;;;;;AAmBA,OAAO,MAAMI,aAAa,GAUtBF,MAAM;AAEV;;;;;;;;;;;;;;;;;;;;;;;AAuBA,OAAO,MAAMG,MAAM,gBA8FfhB,IAAI,CAAC,CAAC,EAAE,CACViB,IAQC,EACDC,OAGC,KAUDhB,MAAM,CAACgB,OAAO,CAACC,WAAW,CAAC,EA8ClB,CAACC,IAAI,CACZtB,OAAO,CAACuB,MAAM,CAACJ,IAAI,CAAC,EACpBnB,OAAO,CAACuB,MAAM,CAACR,MAAM,CAACK,OAAO,CAACI,YAAY,CAAC,EAAE,CAAC,CAC/C,CAAC;AAEJ;;;;;;;;;;;;;;;;;;;;AAoBA,OAAO,MAAMC,aAAa,GAwFtBP,MAAM","ignoreList":[]}
.opencode/node_modules/effect/dist/Chunk.d.ts CHANGED
The diff for this file is too large to render. See raw diff
 
.opencode/node_modules/effect/dist/Chunk.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Chunk.d.ts","sourceRoot":"","sources":["../src/Chunk.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AACH,OAAO,KAAK,EAAE,MAAM,YAAY,CAAA;AAChC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AACvD,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAA;AAC/C,OAAO,KAAK,KAAK,MAAM,MAAM,aAAa,CAAA;AAI1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAC1C,OAAO,EAAE,KAAK,WAAW,EAA6B,MAAM,kBAAkB,CAAA;AAC9E,OAAO,KAAK,EAAE,gB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,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAA;IAC9C,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA;CAM3C,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,UAAU,EAAE;IACvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAA;IACjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA;CAI9C,CAAA"}
.opencode/node_modules/effect/dist/Chunk.js CHANGED
@@ -1,70 +1,11 @@
1
  /**
2
- * The `Chunk` module provides an immutable, high-performance sequence data structure
3
- * optimized for functional programming patterns. A `Chunk` is a persistent data structure
4
- * that supports efficient append, prepend, and concatenation operations.
5
  *
6
- * ## What is a Chunk?
7
- *
8
- * A `Chunk<A>` is an immutable sequence of elements of type `A` that provides:
9
- * - **O(1) append and prepend operations**
10
- * - **Efficient concatenation** through tree-like structure
11
- * - **Memory efficiency** with structural sharing
12
- * - **Rich API** with functional programming operations
13
- * - **Type safety** with full TypeScript integration
14
- *
15
- * ## Key Features
16
- *
17
- * - **Immutable**: All operations return new chunks without modifying the original
18
- * - **Efficient**: Optimized data structure with logarithmic complexity for most operations
19
- * - **Functional**: Rich set of transformation and combination operators
20
- * - **Lazy evaluation**: Many operations are deferred until needed
21
- * - **Interoperable**: Easy conversion to/from arrays and other collections
22
- *
23
- * ## Performance Characteristics
24
- *
25
- * - **Append/Prepend**: O(1) amortized
26
- * - **Random Access**: O(log n)
27
- * - **Concatenation**: O(log min(m, n))
28
- * - **Iteration**: O(n)
29
- * - **Memory**: Structural sharing minimizes allocation
30
- *
31
- * @example
32
- * ```ts
33
- * import { Chunk } from "effect"
34
- *
35
- * // Creating chunks
36
- * const chunk1 = Chunk.fromIterable([1, 2, 3])
37
- * const chunk2 = Chunk.fromIterable([4, 5, 6])
38
- * const empty = Chunk.empty<number>()
39
- *
40
- * // Combining chunks
41
- * const combined = Chunk.appendAll(chunk1, chunk2)
42
- * console.log(Chunk.toReadonlyArray(combined)) // [1, 2, 3, 4, 5, 6]
43
- * ```
44
- *
45
- * @example
46
- * ```ts
47
- * import { Chunk } from "effect"
48
- *
49
- * // Functional transformations
50
- * const numbers = Chunk.range(1, 5) // [1, 2, 3, 4, 5]
51
- * const doubled = Chunk.map(numbers, (n) => n * 2) // [2, 4, 6, 8, 10]
52
- * const evens = Chunk.filter(doubled, (n) => n % 4 === 0) // [4, 8]
53
- * const sum = Chunk.reduce(evens, 0, (acc, n) => acc + n) // 12
54
- * ```
55
- *
56
- * @example
57
- * ```ts
58
- * import { Chunk, Effect } from "effect"
59
- *
60
- * // Working with Effects
61
- * const processChunk = (chunk: Chunk.Chunk<number>) =>
62
- * Effect.gen(function*() {
63
- * const mapped = Chunk.map(chunk, (n) => n * 2)
64
- * const filtered = Chunk.filter(mapped, (n) => n > 5)
65
- * return Chunk.toReadonlyArray(filtered)
66
- * })
67
- * ```
68
  *
69
  * @since 2.0.0
70
  */
@@ -89,12 +30,13 @@ function copy(src, srcPos, dest, destPos, len) {
89
  }
90
  const emptyArray = [];
91
  /**
92
- * Compares the two chunks of equal length using the specified function
 
 
 
93
  *
94
- * @example
95
  * ```ts
96
- * import { Chunk } from "effect"
97
- * import * as Equivalence from "effect/Equivalence"
98
  *
99
  * const chunk1 = Chunk.make(1, 2, 3)
100
  * const chunk2 = Chunk.make(1, 2, 3)
@@ -105,8 +47,8 @@ const emptyArray = [];
105
  * console.log(eq(chunk1, chunk3)) // false
106
  * ```
107
  *
108
- * @category equivalence
109
- * @since 2.0.0
110
  */
111
  export const makeEquivalence = isEquivalent => Equivalence.make((self, that) => self.length === that.length && toReadonlyArray(self).every((value, i) => isEquivalent(value, getUnsafe(that, i))));
112
  const _equivalence = /*#__PURE__*/makeEquivalence(Equal.equals);
@@ -200,9 +142,10 @@ const makeChunk = backing => {
200
  return chunk;
201
  };
202
  /**
203
- * Checks if `u` is a `Chunk<unknown>`
 
 
204
  *
205
- * @example
206
  * ```ts
207
  * import { Chunk } from "effect"
208
  *
@@ -224,7 +167,8 @@ const _empty = /*#__PURE__*/makeChunk({
224
  /**
225
  * Creates an empty `Chunk`.
226
  *
227
- * @example
 
228
  * ```ts
229
  * import { Chunk } from "effect"
230
  *
@@ -239,13 +183,13 @@ export const empty = () => _empty;
239
  /**
240
  * Builds a `NonEmptyChunk` from an non-empty collection of elements.
241
  *
242
- * @example
 
243
  * ```ts
244
  * import { Chunk } from "effect"
245
  *
246
  * const chunk = Chunk.make(1, 2, 3, 4)
247
- * console.log(chunk)
248
- * // { _id: 'Chunk', values: [ 1, 2, 3, 4 ] }
249
  * ```
250
  *
251
  * @category constructors
@@ -255,13 +199,13 @@ export const make = (...as) => fromNonEmptyArrayUnsafe(as);
255
  /**
256
  * Builds a `NonEmptyChunk` from a single element.
257
  *
258
- * @example
 
259
  * ```ts
260
  * import { Chunk } from "effect"
261
  *
262
  * const chunk = Chunk.of("hello")
263
- * console.log(chunk)
264
- * // { _id: 'Chunk', values: [ "hello" ] }
265
  * ```
266
  *
267
  * @category constructors
@@ -274,13 +218,13 @@ export const of = a => makeChunk({
274
  /**
275
  * Creates a new `Chunk` from an iterable collection of values.
276
  *
277
- * @example
 
278
  * ```ts
279
  * import { Chunk } from "effect"
280
  *
281
  * const chunk = Chunk.fromIterable([1, 2, 3])
282
- * console.log(chunk)
283
- * // { _id: 'Chunk', values: [ 1, 2, 3 ] }
284
  * ```
285
  *
286
  * @category constructors
@@ -324,7 +268,8 @@ const toArray_ = self => toReadonlyArray(self).slice();
324
  * (`NonEmptyChunk`), the function will return a `NonEmptyArray`, ensuring the
325
  * non-empty property is preserved.
326
  *
327
- * @example
 
328
  * ```ts
329
  * import { Chunk } from "effect"
330
  *
@@ -338,7 +283,7 @@ const toArray_ = self => toReadonlyArray(self).slice();
338
  * console.log(Chunk.toArray(emptyChunk)) // []
339
  * ```
340
  *
341
- * @category conversions
342
  * @since 2.0.0
343
  */
344
  export const toArray = toArray_;
@@ -372,7 +317,8 @@ const toReadonlyArray_ = self => {
372
  * non-empty (`NonEmptyChunk`), the function will return a
373
  * `NonEmptyReadonlyArray`, ensuring the non-empty property is preserved.
374
  *
375
- * @example
 
376
  * ```ts
377
  * import { Chunk } from "effect"
378
  *
@@ -388,7 +334,7 @@ const toReadonlyArray_ = self => {
388
  * console.log(Chunk.toReadonlyArray(emptyChunk)) // []
389
  * ```
390
  *
391
- * @category conversions
392
  * @since 2.0.0
393
  */
394
  export const toReadonlyArray = toReadonlyArray_;
@@ -418,9 +364,17 @@ const reverseChunk = self => {
418
  };
419
  /**
420
  * Reverses the order of elements in a `Chunk`.
421
- * Importantly, if the input chunk is a `NonEmptyChunk`, the reversed chunk will also be a `NonEmptyChunk`.
422
  *
423
- * @example
 
 
 
 
 
 
 
 
 
424
  *
425
  * ```ts
426
  * import { Chunk } from "effect"
@@ -428,18 +382,19 @@ const reverseChunk = self => {
428
  * const chunk = Chunk.make(1, 2, 3)
429
  * const result = Chunk.reverse(chunk)
430
  *
431
- * console.log(result)
432
- * // { _id: 'Chunk', values: [ 3, 2, 1 ] }
433
  * ```
434
  *
435
- * @since 2.0.0
436
  * @category elements
 
437
  */
438
  export const reverse = reverseChunk;
439
  /**
440
- * This function provides a safe way to read a value at a particular index from a `Chunk`.
 
 
 
441
  *
442
- * @example
443
  * ```ts
444
  * import { Chunk } from "effect"
445
  *
@@ -459,9 +414,19 @@ export const reverse = reverseChunk;
459
  */
460
  export const get = /*#__PURE__*/dual(2, (self, index) => index < 0 || index >= self.length ? O.none() : O.some(getUnsafe(self, index)));
461
  /**
462
- * Wraps an array into a chunk without copying, unsafe on mutable arrays
 
 
 
 
 
 
 
 
 
 
 
463
  *
464
- * @example
465
  * ```ts
466
  * import { Chunk } from "effect"
467
  *
@@ -474,20 +439,29 @@ export const get = /*#__PURE__*/dual(2, (self, index) => index < 0 || index >= s
474
  * console.log(Chunk.toArray(chunk)) // [999, 2, 3, 4, 5]
475
  * ```
476
  *
477
- * @since 2.0.0
478
  * @category unsafe
 
479
  */
480
  export const fromArrayUnsafe = self => self.length === 0 ? empty() : self.length === 1 ? of(self[0]) : makeChunk({
481
  _tag: "IArray",
482
  array: self
483
  });
484
  /**
485
- * Wraps an array into a chunk without copying, unsafe on mutable arrays
 
 
 
 
 
 
 
 
 
 
 
486
  *
487
- * @example
488
  * ```ts
489
- * import { Chunk } from "effect"
490
- * import * as Array from "effect/Array"
491
  *
492
  * const nonEmptyArray = Array.make(1, 2, 3, 4, 5)
493
  * const chunk = Chunk.fromNonEmptyArrayUnsafe(nonEmptyArray)
@@ -497,32 +471,38 @@ export const fromArrayUnsafe = self => self.length === 0 ? empty() : self.length
497
  * console.log(Chunk.isNonEmpty(chunk)) // true
498
  * ```
499
  *
500
- * @since 2.0.0
501
  * @category unsafe
 
502
  */
503
  export const fromNonEmptyArrayUnsafe = self => fromArrayUnsafe(self);
504
  /**
505
- * Gets an element unsafely, will throw on out of bounds
 
 
 
 
 
 
 
 
 
 
 
506
  *
507
- * @example
508
  * ```ts
509
- * import { Chunk } from "effect"
510
  *
511
  * const chunk = Chunk.make("a", "b", "c", "d")
512
  *
513
  * console.log(Chunk.getUnsafe(chunk, 1)) // "b"
514
  * console.log(Chunk.getUnsafe(chunk, 3)) // "d"
515
  *
516
- * // Warning: This will throw an error for invalid indices
517
- * try {
518
- * Chunk.getUnsafe(chunk, 10) // throws "Index out of bounds"
519
- * } catch (error) {
520
- * console.log((error as Error).message) // "Index out of bounds"
521
- * }
522
  * ```
523
  *
524
- * @since 2.0.0
525
  * @category unsafe
 
526
  */
527
  export const getUnsafe = /*#__PURE__*/dual(2, (self, index) => {
528
  const i = Math.floor(index);
@@ -558,7 +538,13 @@ export const getUnsafe = /*#__PURE__*/dual(2, (self, index) => {
558
  /**
559
  * Appends the specified element to the end of the `Chunk`.
560
  *
561
- * @example
 
 
 
 
 
 
562
  * ```ts
563
  * import { Chunk } from "effect"
564
  *
@@ -572,14 +558,18 @@ export const getUnsafe = /*#__PURE__*/dual(2, (self, index) => {
572
  * console.log(Chunk.toArray(singleElement)) // [42]
573
  * ```
574
  *
575
- * @category concatenating
 
 
 
576
  * @since 2.0.0
577
  */
578
  export const append = /*#__PURE__*/dual(2, (self, a) => appendAll(self, of(a)));
579
  /**
580
- * Prepend an element to the front of a `Chunk`, creating a new `NonEmptyChunk`.
 
 
581
  *
582
- * @example
583
  * ```ts
584
  * import { Chunk } from "effect"
585
  *
@@ -593,21 +583,21 @@ export const append = /*#__PURE__*/dual(2, (self, a) => appendAll(self, of(a)));
593
  * console.log(Chunk.toArray(singleElement)) // ["first"]
594
  * ```
595
  *
596
- * @category concatenating
597
  * @since 2.0.0
598
  */
599
  export const prepend = /*#__PURE__*/dual(2, (self, elem) => appendAll(of(elem), self));
600
  /**
601
  * Takes the first up to `n` elements from the chunk.
602
  *
603
- * @example
 
604
  * ```ts
605
  * import { Chunk } from "effect"
606
  *
607
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
608
  * const result = Chunk.take(chunk, 3)
609
- * console.log(result)
610
- * // { _id: 'Chunk', values: [ 1, 2, 3 ] }
611
  * ```
612
  *
613
  * @category elements
@@ -655,14 +645,14 @@ export const take = /*#__PURE__*/dual(2, (self, n) => {
655
  /**
656
  * Drops the first up to `n` elements from the chunk.
657
  *
658
- * @example
 
659
  * ```ts
660
  * import { Chunk } from "effect"
661
  *
662
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
663
  * const result = Chunk.drop(chunk, 2)
664
- * console.log(result)
665
- * // { _id: 'Chunk', values: [ 3, 4, 5 ] }
666
  * ```
667
  *
668
  * @category elements
@@ -710,14 +700,14 @@ export const drop = /*#__PURE__*/dual(2, (self, n) => {
710
  /**
711
  * Drops the last `n` elements.
712
  *
713
- * @example
 
714
  * ```ts
715
  * import { Chunk } from "effect"
716
  *
717
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
718
  * const result = Chunk.dropRight(chunk, 2)
719
- * console.log(result)
720
- * // { _id: 'Chunk', values: [ 1, 2, 3 ] }
721
  * ```
722
  *
723
  * @category elements
@@ -727,14 +717,14 @@ export const dropRight = /*#__PURE__*/dual(2, (self, n) => take(self, Math.max(0
727
  /**
728
  * Drops all elements so long as the predicate returns true.
729
  *
730
- * @example
 
731
  * ```ts
732
  * import { Chunk } from "effect"
733
  *
734
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
735
  * const result = Chunk.dropWhile(chunk, (n) => n < 3)
736
- * console.log(result)
737
- * // { _id: 'Chunk', values: [ 3, 4, 5 ] }
738
  * ```
739
  *
740
  * @category elements
@@ -753,7 +743,7 @@ export const dropWhile = /*#__PURE__*/dual(2, (self, predicate) => {
753
  * Prepends the specified prefix chunk to the beginning of the specified chunk.
754
  * If either chunk is non-empty, the result is also a non-empty chunk.
755
  *
756
- * @example
757
  *
758
  * ```ts
759
  * import { Chunk } from "effect"
@@ -767,7 +757,7 @@ export const dropWhile = /*#__PURE__*/dual(2, (self, predicate) => {
767
  * // [ "a", "b", 1, 2 ]
768
  * ```
769
  *
770
- * @category concatenating
771
  * @since 2.0.0
772
  */
773
  export const prependAll = /*#__PURE__*/dual(2, (self, that) => appendAll(that, self));
@@ -775,7 +765,12 @@ export const prependAll = /*#__PURE__*/dual(2, (self, that) => appendAll(that, s
775
  * Concatenates two chunks, combining their elements.
776
  * If either chunk is non-empty, the result is also a non-empty chunk.
777
  *
778
- * @example
 
 
 
 
 
779
  *
780
  * ```ts
781
  * import { Chunk } from "effect"
@@ -789,7 +784,10 @@ export const prependAll = /*#__PURE__*/dual(2, (self, that) => appendAll(that, s
789
  * // [ 1, 2, "a", "b" ]
790
  * ```
791
  *
792
- * @category concatenating
 
 
 
793
  * @since 2.0.0
794
  */
795
  export const appendAll = /*#__PURE__*/dual(2, (self, that) => {
@@ -879,10 +877,10 @@ export const appendAll = /*#__PURE__*/dual(2, (self, that) => {
879
  /**
880
  * Returns a filtered and mapped subset of the elements.
881
  *
882
- * @example
 
883
  * ```ts
884
- * import { Chunk } from "effect"
885
- * import * as Result from "effect/Result"
886
  *
887
  * const chunk = Chunk.make("1", "2", "hello", "3", "world")
888
  * const numbers = Chunk.filterMap(chunk, (str) => {
@@ -899,8 +897,8 @@ export const appendAll = /*#__PURE__*/dual(2, (self, that) => {
899
  * console.log(Chunk.toArray(evenIndexNumbers)) // [1]
900
  * ```
901
  *
902
- * @since 2.0.0
903
  * @category filtering
 
904
  */
905
  export const filterMap = /*#__PURE__*/dual(2, (self, f) => {
906
  const as = RA.fromIterable(self);
@@ -916,7 +914,8 @@ export const filterMap = /*#__PURE__*/dual(2, (self, f) => {
916
  /**
917
  * Returns a filtered subset of the elements.
918
  *
919
- * @example
 
920
  * ```ts
921
  * import { Chunk } from "effect"
922
  *
@@ -930,17 +929,17 @@ export const filterMap = /*#__PURE__*/dual(2, (self, f) => {
930
  * console.log(Chunk.toArray(numbers)) // [42, 100]
931
  * ```
932
  *
933
- * @since 2.0.0
934
  * @category filtering
 
935
  */
936
  export const filter = /*#__PURE__*/dual(2, (self, predicate) => fromArrayUnsafe(RA.filter(self, predicate)));
937
  /**
938
  * Transforms all elements of the chunk for as long as the specified function succeeds.
939
  *
940
- * @example
 
941
  * ```ts
942
- * import { Chunk } from "effect"
943
- * import * as Result from "effect/Result"
944
  *
945
  * const chunk = Chunk.make("1", "2", "hello", "3", "4")
946
  * const result = Chunk.filterMapWhile(chunk, (s) => {
@@ -958,8 +957,8 @@ export const filter = /*#__PURE__*/dual(2, (self, predicate) => fromArrayUnsafe(
958
  * console.log(Chunk.toArray(allNumbers)) // [1, 2, 3, 4]
959
  * ```
960
  *
961
- * @since 2.0.0
962
  * @category filtering
 
963
  */
964
  export const filterMapWhile = /*#__PURE__*/dual(2, (self, f) => {
965
  const out = [];
@@ -974,17 +973,16 @@ export const filterMapWhile = /*#__PURE__*/dual(2, (self, f) => {
974
  return fromArrayUnsafe(out);
975
  });
976
  /**
977
- * Filter out optional values
 
 
978
  *
979
- * @example
980
  * ```ts
981
- * import { Chunk } from "effect"
982
- * import * as Option from "effect/Option"
983
  *
984
  * const chunk = Chunk.make(Option.some(1), Option.none(), Option.some(3))
985
  * const result = Chunk.compact(chunk)
986
- * console.log(result)
987
- * // { _id: 'Chunk', values: [ 1, 3 ] }
988
  * ```
989
  *
990
  * @category filtering
@@ -1002,7 +1000,8 @@ export const compact = self => {
1002
  /**
1003
  * Applies a function to each element in a chunk and returns a new chunk containing the concatenated mapped elements.
1004
  *
1005
- * @example
 
1006
  * ```ts
1007
  * import { Chunk } from "effect"
1008
  *
@@ -1023,8 +1022,8 @@ export const compact = self => {
1023
  * console.log(Chunk.toArray(indexed)) // [1, 3, 5]
1024
  * ```
1025
  *
1026
- * @since 2.0.0
1027
  * @category sequencing
 
1028
  */
1029
  export const flatMap = /*#__PURE__*/dual(2, (self, f) => {
1030
  if (self.backing._tag === "ISingleton") {
@@ -1047,7 +1046,8 @@ export const flatMap = /*#__PURE__*/dual(2, (self, f) => {
1047
  * instead, it is primarily used for side effects, such as logging or
1048
  * accumulating data in an external variable.
1049
  *
1050
- * @example
 
1051
  * ```ts
1052
  * import { Chunk } from "effect"
1053
  *
@@ -1070,14 +1070,15 @@ export const flatMap = /*#__PURE__*/dual(2, (self, f) => {
1070
  * // Index 3: 4
1071
  * ```
1072
  *
1073
- * @since 2.0.0
1074
  * @category combinators
 
1075
  */
1076
  export const forEach = /*#__PURE__*/dual(2, (self, f) => toReadonlyArray(self).forEach(f));
1077
  /**
1078
  * Flattens a chunk of chunks into a single chunk by concatenating all chunks.
1079
  *
1080
- * @example
 
1081
  * ```ts
1082
  * import { Chunk } from "effect"
1083
  *
@@ -1098,14 +1099,29 @@ export const forEach = /*#__PURE__*/dual(2, (self, f) => toReadonlyArray(self).f
1098
  * console.log(Chunk.toArray(Chunk.flatten(withEmpty))) // [1, 2, 3, 4]
1099
  * ```
1100
  *
1101
- * @since 2.0.0
1102
  * @category sequencing
 
1103
  */
1104
  export const flatten = /*#__PURE__*/flatMap(identity);
1105
  /**
1106
  * Groups elements in chunks of up to `n` elements.
1107
  *
1108
- * @example
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1109
  * ```ts
1110
  * import { Chunk } from "effect"
1111
  *
@@ -1122,8 +1138,10 @@ export const flatten = /*#__PURE__*/flatMap(identity);
1122
  * // [[1, 2], [3, 4], [5]]
1123
  * ```
1124
  *
1125
- * @since 2.0.0
 
1126
  * @category elements
 
1127
  */
1128
  export const chunksOf = /*#__PURE__*/dual(2, (self, n) => {
1129
  const gr = [];
@@ -1141,11 +1159,14 @@ export const chunksOf = /*#__PURE__*/dual(2, (self, n) => {
1141
  return fromArrayUnsafe(gr);
1142
  });
1143
  /**
1144
- * Creates a Chunk of unique values that are included in all given Chunks.
 
 
1145
  *
1146
- * The order and references of result values are determined by the Chunk.
 
 
1147
  *
1148
- * @example
1149
  * ```ts
1150
  * import { Chunk } from "effect"
1151
  *
@@ -1165,14 +1186,15 @@ export const chunksOf = /*#__PURE__*/dual(2, (self, n) => {
1165
  * console.log(Chunk.toArray(Chunk.intersection(chunk3, chunk4))) // []
1166
  * ```
1167
  *
1168
- * @since 2.0.0
1169
  * @category elements
 
1170
  */
1171
  export const intersection = /*#__PURE__*/dual(2, (self, that) => fromArrayUnsafe(RA.intersection(toReadonlyArray(self), toReadonlyArray(that))));
1172
  /**
1173
  * Determines if the chunk is empty.
1174
  *
1175
- * @example
 
1176
  * ```ts
1177
  * import { Chunk } from "effect"
1178
  *
@@ -1187,7 +1209,8 @@ export const isEmpty = self => self.length === 0;
1187
  /**
1188
  * Determines if the chunk is not empty.
1189
  *
1190
- * @example
 
1191
  * ```ts
1192
  * import { Chunk } from "effect"
1193
  *
@@ -1200,9 +1223,10 @@ export const isEmpty = self => self.length === 0;
1200
  */
1201
  export const isNonEmpty = self => self.length > 0;
1202
  /**
1203
- * Returns the first element of this chunk if it exists.
 
 
1204
  *
1205
- * @example
1206
  * ```ts
1207
  * import { Chunk } from "effect"
1208
  *
@@ -1217,11 +1241,19 @@ export const head = /*#__PURE__*/get(0);
1217
  /**
1218
  * Returns the first element of this chunk.
1219
  *
1220
- * It will throw an error if the chunk is empty.
 
 
 
 
 
 
 
 
 
1221
  *
1222
- * @example
1223
  * ```ts
1224
- * import { Chunk } from "effect"
1225
  *
1226
  * const chunk = Chunk.make(1, 2, 3, 4)
1227
  * console.log(Chunk.headUnsafe(chunk)) // 1
@@ -1229,22 +1261,19 @@ export const head = /*#__PURE__*/get(0);
1229
  * const singleElement = Chunk.make("hello")
1230
  * console.log(Chunk.headUnsafe(singleElement)) // "hello"
1231
  *
1232
- * // Warning: This will throw for empty chunks
1233
- * try {
1234
- * Chunk.headUnsafe(Chunk.empty())
1235
- * } catch (error) {
1236
- * console.log((error as Error).message) // "Index out of bounds"
1237
- * }
1238
  * ```
1239
  *
1240
- * @since 2.0.0
1241
  * @category unsafe
 
1242
  */
1243
  export const headUnsafe = self => getUnsafe(self, 0);
1244
  /**
1245
  * Returns the first element of this non empty chunk.
1246
  *
1247
- * @example
 
1248
  * ```ts
1249
  * import { Chunk } from "effect"
1250
  *
@@ -1258,14 +1287,15 @@ export const headUnsafe = self => getUnsafe(self, 0);
1258
  * // Chunk.headNonEmpty(Chunk.empty()) // TypeScript error
1259
  * ```
1260
  *
1261
- * @since 2.0.0
1262
  * @category elements
 
1263
  */
1264
  export const headNonEmpty = headUnsafe;
1265
  /**
1266
- * Returns the last element of this chunk if it exists.
 
 
1267
  *
1268
- * @example
1269
  * ```ts
1270
  * import { Chunk } from "effect"
1271
  *
@@ -1280,11 +1310,19 @@ export const last = self => get(self, self.length - 1);
1280
  /**
1281
  * Returns the last element of this chunk.
1282
  *
1283
- * It will throw an error if the chunk is empty.
 
 
 
 
 
 
 
 
 
1284
  *
1285
- * @example
1286
  * ```ts
1287
- * import { Chunk } from "effect"
1288
  *
1289
  * const chunk = Chunk.make(1, 2, 3, 4)
1290
  * console.log(Chunk.lastUnsafe(chunk)) // 4
@@ -1292,22 +1330,19 @@ export const last = self => get(self, self.length - 1);
1292
  * const singleElement = Chunk.make("hello")
1293
  * console.log(Chunk.lastUnsafe(singleElement)) // "hello"
1294
  *
1295
- * // Warning: This will throw for empty chunks
1296
- * try {
1297
- * Chunk.lastUnsafe(Chunk.empty())
1298
- * } catch (error) {
1299
- * console.log((error as Error).message) // "Index out of bounds"
1300
- * }
1301
  * ```
1302
  *
1303
- * @since 2.0.0
1304
  * @category unsafe
 
1305
  */
1306
  export const lastUnsafe = self => getUnsafe(self, self.length - 1);
1307
  /**
1308
  * Returns the last element of this non empty chunk.
1309
  *
1310
- * @example
 
1311
  * ```ts
1312
  * import { Chunk } from "effect"
1313
  *
@@ -1321,33 +1356,33 @@ export const lastUnsafe = self => getUnsafe(self, self.length - 1);
1321
  * // Chunk.lastNonEmpty(Chunk.empty()) // TypeScript error
1322
  * ```
1323
  *
1324
- * @since 3.4.0
1325
  * @category elements
 
1326
  */
1327
  export const lastNonEmpty = lastUnsafe;
1328
  /**
1329
  * Transforms the elements of a chunk using the specified mapping function.
1330
  * If the input chunk is non-empty, the resulting chunk will also be non-empty.
1331
  *
1332
- * @example
1333
  *
1334
  * ```ts
1335
  * import { Chunk } from "effect"
1336
  *
1337
  * const result = Chunk.map(Chunk.make(1, 2), (n) => n + 1)
1338
  *
1339
- * console.log(result)
1340
- * // { _id: 'Chunk', values: [ 2, 3 ] }
1341
  * ```
1342
  *
1343
- * @since 2.0.0
1344
  * @category mapping
 
1345
  */
1346
  export const map = /*#__PURE__*/dual(2, (self, f) => self.backing._tag === "ISingleton" ? of(f(self.backing.a, 0)) : fromArrayUnsafe(pipe(toReadonlyArray(self), RA.map((a, i) => f(a, i)))));
1347
  /**
1348
- * Statefully maps over the chunk, producing new elements of type `B`.
 
 
1349
  *
1350
- * @example
1351
  * ```ts
1352
  * import { Chunk } from "effect"
1353
  *
@@ -1370,8 +1405,8 @@ export const map = /*#__PURE__*/dual(2, (self, f) => self.backing._tag === "ISin
1370
  * console.log(Chunk.toArray(indexed)) // ["0: hello", "1: world", "2: effect"]
1371
  * ```
1372
  *
1373
- * @since 2.0.0
1374
  * @category folding
 
1375
  */
1376
  export const mapAccum = /*#__PURE__*/dual(3, (self, s, f) => {
1377
  const [s1, as] = RA.mapAccum(self, s, f);
@@ -1380,10 +1415,12 @@ export const mapAccum = /*#__PURE__*/dual(3, (self, s, f) => {
1380
  /**
1381
  * Splits a chunk using a `Filter` into failures and successes.
1382
  *
1383
- * - Returns `[excluded, satisfying]`.
1384
- * - The filter receives `(element, index)`.
 
 
 
1385
  *
1386
- * @example
1387
  * ```ts
1388
  * import { Chunk, Result } from "effect"
1389
  *
@@ -1403,12 +1440,18 @@ export const partition = /*#__PURE__*/dual(2, (self, f) => {
1403
  return [fromArrayUnsafe(excluded), fromArrayUnsafe(satisfying)];
1404
  });
1405
  /**
1406
- * Partitions the elements of this chunk into two chunks.
 
 
 
 
 
 
 
 
1407
  *
1408
- * @example
1409
  * ```ts
1410
- * import { Chunk } from "effect"
1411
- * import * as Result from "effect/Result"
1412
  *
1413
  * const chunk = Chunk.make(
1414
  * Result.succeed(1),
@@ -1436,7 +1479,8 @@ export const separate = self => pipe(RA.separate(toReadonlyArray(self)), ([l, r]
1436
  /**
1437
  * Retrieves the size of the chunk.
1438
  *
1439
- * @example
 
1440
  * ```ts
1441
  * import { Chunk } from "effect"
1442
  *
@@ -1449,12 +1493,12 @@ export const separate = self => pipe(RA.separate(toReadonlyArray(self)), ([l, r]
1449
  */
1450
  export const size = self => self.length;
1451
  /**
1452
- * Sort the elements of a Chunk in increasing order, creating a new Chunk.
 
 
1453
  *
1454
- * @example
1455
  * ```ts
1456
- * import { Chunk } from "effect"
1457
- * import * as Order from "effect/Order"
1458
  *
1459
  * const numbers = Chunk.make(3, 1, 4, 1, 5, 9, 2, 6)
1460
  * const sorted = Chunk.sort(numbers, Order.Number)
@@ -1470,17 +1514,17 @@ export const size = self => self.length;
1470
  * console.log(Chunk.toArray(sortedWords)) // ["apple", "banana", "cherry"]
1471
  * ```
1472
  *
1473
- * @since 2.0.0
1474
  * @category sorting
 
1475
  */
1476
  export const sort = /*#__PURE__*/dual(2, (self, O) => fromArrayUnsafe(RA.sort(toReadonlyArray(self), O)));
1477
  /**
1478
- * Sorts the elements of a Chunk based on a projection function.
 
 
1479
  *
1480
- * @example
1481
  * ```ts
1482
- * import { Chunk } from "effect"
1483
- * import * as Order from "effect/Order"
1484
  *
1485
  * const people = Chunk.make(
1486
  * { name: "Alice", age: 30 },
@@ -1504,14 +1548,15 @@ export const sort = /*#__PURE__*/dual(2, (self, O) => fromArrayUnsafe(RA.sort(to
1504
  * console.log(Chunk.toArray(byLength)) // ["a", "ab", "abc"]
1505
  * ```
1506
  *
1507
- * @since 2.0.0
1508
  * @category sorting
 
1509
  */
1510
  export const sortWith = /*#__PURE__*/dual(3, (self, f, order) => sort(self, Order.mapInput(order, f)));
1511
  /**
1512
  * Returns two splits of this chunk at the specified index.
1513
  *
1514
- * @example
 
1515
  * ```ts
1516
  * import { Chunk } from "effect"
1517
  *
@@ -1531,15 +1576,22 @@ export const sortWith = /*#__PURE__*/dual(3, (self, f, order) => sort(self, Orde
1531
  * console.log(Chunk.toArray(empty2)) // []
1532
  * ```
1533
  *
1534
- * @since 2.0.0
1535
  * @category splitting
 
1536
  */
1537
  export const splitAt = /*#__PURE__*/dual(2, (self, n) => [take(self, n), drop(self, n)]);
1538
  /**
1539
- * Splits a `NonEmptyChunk` into two segments, with the first segment containing a maximum of `n` elements.
1540
- * The value of `n` must be `>= 1`.
 
 
 
 
 
 
 
 
1541
  *
1542
- * @example
1543
  * ```ts
1544
  * import { Chunk } from "effect"
1545
  *
@@ -1565,9 +1617,15 @@ export const splitNonEmptyAt = /*#__PURE__*/dual(2, (self, n) => {
1565
  return _n >= self.length ? [self, empty()] : [take(self, _n), drop(self, _n)];
1566
  });
1567
  /**
1568
- * Splits this chunk into `n` equally sized chunks.
 
 
 
 
 
 
 
1569
  *
1570
- * @example
1571
  * ```ts
1572
  * import { Chunk } from "effect"
1573
  *
@@ -1588,15 +1646,16 @@ export const splitNonEmptyAt = /*#__PURE__*/dual(2, (self, n) => {
1588
  * // [[1, 2, 3, 4, 5, 6, 7, 8, 9]]
1589
  * ```
1590
  *
1591
- * @since 2.0.0
1592
  * @category splitting
 
1593
  */
1594
  export const split = /*#__PURE__*/dual(2, (self, n) => chunksOf(self, Math.ceil(self.length / Math.floor(n))));
1595
  /**
1596
  * Splits this chunk on the first element that matches this predicate.
1597
  * Returns a tuple containing two chunks: the first one is before the match, and the second one is from the match onward.
1598
  *
1599
- * @example
 
1600
  * ```ts
1601
  * import { Chunk } from "effect"
1602
  *
@@ -1631,9 +1690,10 @@ export const splitWhere = /*#__PURE__*/dual(2, (self, predicate) => {
1631
  return splitAt(self, i);
1632
  });
1633
  /**
1634
- * Returns every elements after the first.
 
 
1635
  *
1636
- * @example
1637
  * ```ts
1638
  * import { Chunk } from "effect"
1639
  *
@@ -1647,14 +1707,15 @@ export const splitWhere = /*#__PURE__*/dual(2, (self, predicate) => {
1647
  * console.log(Chunk.tail(empty)) // Option.none()
1648
  * ```
1649
  *
1650
- * @since 2.0.0
1651
  * @category elements
 
1652
  */
1653
  export const tail = self => self.length > 0 ? O.some(drop(self, 1)) : O.none();
1654
  /**
1655
- * Returns every elements after the first.
 
 
1656
  *
1657
- * @example
1658
  * ```ts
1659
  * import { Chunk } from "effect"
1660
  *
@@ -1670,14 +1731,15 @@ export const tail = self => self.length > 0 ? O.some(drop(self, 1)) : O.none();
1670
  * // Chunk.tailNonEmpty(Chunk.empty()) // TypeScript error
1671
  * ```
1672
  *
1673
- * @since 2.0.0
1674
  * @category elements
 
1675
  */
1676
  export const tailNonEmpty = self => drop(self, 1);
1677
  /**
1678
  * Takes the last `n` elements.
1679
  *
1680
- * @example
 
1681
  * ```ts
1682
  * import { Chunk } from "effect"
1683
  *
@@ -1694,14 +1756,15 @@ export const tailNonEmpty = self => drop(self, 1);
1694
  * console.log(Chunk.toArray(none)) // []
1695
  * ```
1696
  *
1697
- * @since 2.0.0
1698
  * @category elements
 
1699
  */
1700
  export const takeRight = /*#__PURE__*/dual(2, (self, n) => drop(self, self.length - n));
1701
  /**
1702
  * Takes all elements so long as the predicate returns true.
1703
  *
1704
- * @example
 
1705
  * ```ts
1706
  * import { Chunk } from "effect"
1707
  *
@@ -1719,8 +1782,8 @@ export const takeRight = /*#__PURE__*/dual(2, (self, n) => drop(self, self.lengt
1719
  * console.log(Chunk.toArray(all)) // [1, 2, 3]
1720
  * ```
1721
  *
1722
- * @since 2.0.0
1723
  * @category elements
 
1724
  */
1725
  export const takeWhile = /*#__PURE__*/dual(2, (self, predicate) => {
1726
  const out = [];
@@ -1736,7 +1799,8 @@ export const takeWhile = /*#__PURE__*/dual(2, (self, predicate) => {
1736
  /**
1737
  * Creates a Chunks of unique values, in order, from all given Chunks.
1738
  *
1739
- * @example
 
1740
  * ```ts
1741
  * import { Chunk } from "effect"
1742
  *
@@ -1752,14 +1816,16 @@ export const takeWhile = /*#__PURE__*/dual(2, (self, predicate) => {
1752
  * console.log(Chunk.toArray(unified)) // [1, 2, 3]
1753
  * ```
1754
  *
1755
- * @since 2.0.0
1756
  * @category elements
 
1757
  */
1758
  export const union = /*#__PURE__*/dual(2, (self, that) => fromArrayUnsafe(RA.union(toReadonlyArray(self), toReadonlyArray(that))));
1759
  /**
1760
- * Remove duplicates from an array, keeping the first occurrence of an element.
 
 
 
1761
  *
1762
- * @example
1763
  * ```ts
1764
  * import { Chunk } from "effect"
1765
  *
@@ -1778,14 +1844,15 @@ export const union = /*#__PURE__*/dual(2, (self, that) => fromArrayUnsafe(RA.uni
1778
  * console.log(Chunk.toArray(uniqueDeduped)) // [1, 2, 3]
1779
  * ```
1780
  *
1781
- * @since 2.0.0
1782
  * @category elements
 
1783
  */
1784
  export const dedupe = self => fromArrayUnsafe(RA.dedupe(toReadonlyArray(self)));
1785
  /**
1786
  * Deduplicates adjacent elements that are identical.
1787
  *
1788
- * @example
 
1789
  * ```ts
1790
  * import { Chunk } from "effect"
1791
  *
@@ -1799,16 +1866,19 @@ export const dedupe = self => fromArrayUnsafe(RA.dedupe(toReadonlyArray(self)));
1799
  * console.log(Chunk.toArray(mixedResult)) // ["a", "b", "a"]
1800
  * ```
1801
  *
1802
- * @since 2.0.0
1803
  * @category filtering
 
1804
  */
1805
  export const dedupeAdjacent = self => fromArrayUnsafe(RA.dedupeAdjacent(self));
1806
  /**
1807
- * Takes a `Chunk` of pairs and return two corresponding `Chunk`s.
1808
  *
1809
- * Note: The function is reverse of `zip`.
 
 
 
 
1810
  *
1811
- * @example
1812
  * ```ts
1813
  * import { Chunk } from "effect"
1814
  *
@@ -1828,8 +1898,8 @@ export const dedupeAdjacent = self => fromArrayUnsafe(RA.dedupeAdjacent(self));
1828
  * console.log(Chunk.toArray(emptyStrs)) // []
1829
  * ```
1830
  *
1831
- * @since 2.0.0
1832
  * @category elements
 
1833
  */
1834
  export const unzip = self => {
1835
  const [left, right] = RA.unzip(self);
@@ -1838,7 +1908,8 @@ export const unzip = self => {
1838
  /**
1839
  * Zips this chunk pointwise with the specified chunk using the specified combiner.
1840
  *
1841
- * @example
 
1842
  * ```ts
1843
  * import { Chunk } from "effect"
1844
  *
@@ -1854,14 +1925,15 @@ export const unzip = self => {
1854
  * console.log(Chunk.toArray(mixed)) // [[1, "a"], [2, "b"]]
1855
  * ```
1856
  *
1857
- * @since 2.0.0
1858
  * @category zipping
 
1859
  */
1860
  export const zipWith = /*#__PURE__*/dual(3, (self, that, f) => fromArrayUnsafe(RA.zipWith(self, that, f)));
1861
  /**
1862
  * Zips this chunk pointwise with the specified chunk.
1863
  *
1864
- * @example
 
1865
  * ```ts
1866
  * import { Chunk } from "effect"
1867
  *
@@ -1877,14 +1949,15 @@ export const zipWith = /*#__PURE__*/dual(3, (self, that, f) => fromArrayUnsafe(R
1877
  * console.log(Chunk.toArray(zipped)) // [[1, "a"], [2, "b"]]
1878
  * ```
1879
  *
1880
- * @since 2.0.0
1881
  * @category zipping
 
1882
  */
1883
  export const zip = /*#__PURE__*/dual(2, (self, that) => zipWith(self, that, (a, b) => [a, b]));
1884
  /**
1885
- * Delete the element at the specified index, creating a new `Chunk`.
 
 
1886
  *
1887
- * @example
1888
  * ```ts
1889
  * import { Chunk } from "effect"
1890
  *
@@ -1906,10 +1979,11 @@ export const zip = /*#__PURE__*/dual(2, (self, that) => zipWith(self, that, (a,
1906
  */
1907
  export const remove = /*#__PURE__*/dual(2, (self, i) => fromArrayUnsafe(RA.remove(toReadonlyArray(self), i)));
1908
  /**
1909
- * Applies a function to the element at the specified index, creating a new `Chunk`,
1910
  * or returns `None` if the index is out of bounds.
1911
  *
1912
- * @example
 
1913
  * ```ts
1914
  * import { Chunk } from "effect"
1915
  *
@@ -1931,10 +2005,11 @@ export const remove = /*#__PURE__*/dual(2, (self, i) => fromArrayUnsafe(RA.remov
1931
  */
1932
  export const modify = /*#__PURE__*/dual(3, (self, i, f) => pipe(RA.modify(toReadonlyArray(self), i, f), O.map(fromArrayUnsafe)));
1933
  /**
1934
- * Change the element at the specified index, creating a new `Chunk`,
1935
  * or returns `None` if the index is out of bounds.
1936
  *
1937
- * @example
 
1938
  * ```ts
1939
  * import { Chunk } from "effect"
1940
  *
@@ -1956,17 +2031,19 @@ export const modify = /*#__PURE__*/dual(3, (self, i, f) => pipe(RA.modify(toRead
1956
  */
1957
  export const replace = /*#__PURE__*/dual(3, (self, i, b) => modify(self, i, () => b));
1958
  /**
1959
- * Return a Chunk of length n with element i initialized with f(i).
1960
  *
1961
- * **Note**. `n` is normalized to an integer >= 1.
 
 
 
 
1962
  *
1963
- * @example
1964
  * ```ts
1965
  * import { Chunk } from "effect"
1966
  *
1967
  * const chunk = Chunk.makeBy(5, (i) => i * 2)
1968
- * console.log(chunk)
1969
- * // { _id: 'Chunk', values: [ 0, 2, 4, 6, 8 ] }
1970
  * ```
1971
  *
1972
  * @category constructors
@@ -1974,15 +2051,21 @@ export const replace = /*#__PURE__*/dual(3, (self, i, b) => modify(self, i, () =
1974
  */
1975
  export const makeBy = /*#__PURE__*/dual(2, (n, f) => fromIterable(RA.makeBy(n, f)));
1976
  /**
1977
- * Create a non empty `Chunk` containing a range of integers, including both endpoints.
 
 
 
 
 
 
 
 
1978
  *
1979
- * @example
1980
  * ```ts
1981
  * import { Chunk } from "effect"
1982
  *
1983
  * const chunk = Chunk.range(1, 5)
1984
- * console.log(chunk)
1985
- * // { _id: 'Chunk', values: [ 1, 2, 3, 4, 5 ] }
1986
  * ```
1987
  *
1988
  * @category constructors
@@ -1995,7 +2078,8 @@ export const range = (start, end) => start <= end ? makeBy(end - start + 1, i =>
1995
  /**
1996
  * Returns a function that checks if a `Chunk` contains a given value using the default `Equivalence`.
1997
  *
1998
- * @example
 
1999
  * ```ts
2000
  * import { Chunk } from "effect"
2001
  *
@@ -2020,7 +2104,8 @@ export const contains = RA.contains;
2020
  /**
2021
  * Returns a function that checks if a `Chunk` contains a given value using a provided `isEquivalent` function.
2022
  *
2023
- * @example
 
2024
  * ```ts
2025
  * import { Chunk } from "effect"
2026
  *
@@ -2050,7 +2135,8 @@ export const containsWith = RA.containsWith;
2050
  * Returns the first element that satisfies the specified
2051
  * predicate, or `None` if no such element exists.
2052
  *
2053
- * @example
 
2054
  * ```ts
2055
  * import { Chunk, Option } from "effect"
2056
  *
@@ -2077,9 +2163,10 @@ export const containsWith = RA.containsWith;
2077
  */
2078
  export const findFirst = RA.findFirst;
2079
  /**
2080
- * Return the first index for which a predicate holds.
 
 
2081
  *
2082
- * @example
2083
  * ```ts
2084
  * import { Chunk } from "effect"
2085
  *
@@ -2101,12 +2188,12 @@ export const findFirst = RA.findFirst;
2101
  */
2102
  export const findFirstIndex = /*#__PURE__*/dual(2, (self, predicate) => RA.findFirstIndex(self, predicate));
2103
  /**
2104
- * Find the last element for which a predicate holds.
 
 
2105
  *
2106
- * @example
2107
  * ```ts
2108
- * import { Chunk } from "effect"
2109
- * import * as Option from "effect/Option"
2110
  *
2111
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
2112
  * const result = Chunk.findLast(chunk, (n) => n < 4)
@@ -2127,9 +2214,10 @@ export const findFirstIndex = /*#__PURE__*/dual(2, (self, predicate) => RA.findF
2127
  */
2128
  export const findLast = RA.findLast;
2129
  /**
2130
- * Return the last index for which a predicate holds.
 
 
2131
  *
2132
- * @example
2133
  * ```ts
2134
  * import { Chunk } from "effect"
2135
  *
@@ -2151,9 +2239,10 @@ export const findLast = RA.findLast;
2151
  */
2152
  export const findLastIndex = /*#__PURE__*/dual(2, (self, predicate) => RA.findLastIndex(self, predicate));
2153
  /**
2154
- * Check if a predicate holds true for every `Chunk` element.
 
 
2155
  *
2156
- * @example
2157
  * ```ts
2158
  * import { Chunk } from "effect"
2159
  *
@@ -2178,9 +2267,10 @@ export const findLastIndex = /*#__PURE__*/dual(2, (self, predicate) => RA.findLa
2178
  */
2179
  export const every = /*#__PURE__*/dual(2, (self, refinement) => RA.fromIterable(self).every(refinement));
2180
  /**
2181
- * Check if a predicate holds true for some `Chunk` element.
 
 
2182
  *
2183
- * @example
2184
  * ```ts
2185
  * import { Chunk } from "effect"
2186
  *
@@ -2204,7 +2294,8 @@ export const some = /*#__PURE__*/dual(2, (self, predicate) => RA.fromIterable(se
2204
  /**
2205
  * Joins the elements together with "sep" in the middle.
2206
  *
2207
- * @example
 
2208
  * ```ts
2209
  * import { Chunk } from "effect"
2210
  *
@@ -2232,7 +2323,8 @@ export const join = RA.join;
2232
  /**
2233
  * Reduces the elements of a chunk from left to right.
2234
  *
2235
- * @example
 
2236
  * ```ts
2237
  * import { Chunk } from "effect"
2238
  *
@@ -2257,7 +2349,8 @@ export const reduce = RA.reduce;
2257
  /**
2258
  * Reduces the elements of a chunk from right to left.
2259
  *
2260
- * @example
 
2261
  * ```ts
2262
  * import { Chunk } from "effect"
2263
  *
@@ -2287,7 +2380,8 @@ export const reduceRight = RA.reduceRight;
2287
  * Creates a `Chunk` of values not included in the other given `Chunk` using the provided `isEquivalent` function.
2288
  * The order and references of result values are determined by the first `Chunk`.
2289
  *
2290
- * @example
 
2291
  * ```ts
2292
  * import { Chunk } from "effect"
2293
  *
@@ -2321,7 +2415,8 @@ export const differenceWith = isEquivalent => {
2321
  * Creates a `Chunk` of values not included in the other given `Chunk`.
2322
  * The order and references of result values are determined by the first `Chunk`.
2323
  *
2324
- * @example
 
2325
  * ```ts
2326
  * import { Chunk } from "effect"
2327
  *
 
1
  /**
2
+ * Stores many values in an immutable ordered collection.
 
 
3
  *
4
+ * A `Chunk<A>` is useful when you need to build or transform collections
5
+ * without changing the original collection. It is designed for efficient
6
+ * append, prepend, and concatenation. This module includes helpers for
7
+ * creating, reading, slicing, mapping, filtering, sorting, zipping, combining,
8
+ * and converting chunks to and from arrays and iterables.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  *
10
  * @since 2.0.0
11
  */
 
30
  }
31
  const emptyArray = [];
32
  /**
33
+ * Creates an `Equivalence` for chunks that compares chunk lengths and then
34
+ * compares corresponding elements with the provided element equivalence.
35
+ *
36
+ * **Example** (Comparing chunks for equivalence)
37
  *
 
38
  * ```ts
39
+ * import { Chunk, Equivalence } from "effect"
 
40
  *
41
  * const chunk1 = Chunk.make(1, 2, 3)
42
  * const chunk2 = Chunk.make(1, 2, 3)
 
47
  * console.log(eq(chunk1, chunk3)) // false
48
  * ```
49
  *
50
+ * @category instances
51
+ * @since 4.0.0
52
  */
53
  export const makeEquivalence = isEquivalent => Equivalence.make((self, that) => self.length === that.length && toReadonlyArray(self).every((value, i) => isEquivalent(value, getUnsafe(that, i))));
54
  const _equivalence = /*#__PURE__*/makeEquivalence(Equal.equals);
 
142
  return chunk;
143
  };
144
  /**
145
+ * Checks whether `u` is a `Chunk<unknown>`
146
+ *
147
+ * **Example** (Checking for chunks)
148
  *
 
149
  * ```ts
150
  * import { Chunk } from "effect"
151
  *
 
167
  /**
168
  * Creates an empty `Chunk`.
169
  *
170
+ * **Example** (Creating an empty chunk)
171
+ *
172
  * ```ts
173
  * import { Chunk } from "effect"
174
  *
 
183
  /**
184
  * Builds a `NonEmptyChunk` from an non-empty collection of elements.
185
  *
186
+ * **Example** (Creating a non-empty chunk)
187
+ *
188
  * ```ts
189
  * import { Chunk } from "effect"
190
  *
191
  * const chunk = Chunk.make(1, 2, 3, 4)
192
+ * console.log(Chunk.toArray(chunk)) // [1, 2, 3, 4]
 
193
  * ```
194
  *
195
  * @category constructors
 
199
  /**
200
  * Builds a `NonEmptyChunk` from a single element.
201
  *
202
+ * **Example** (Creating a single-element chunk)
203
+ *
204
  * ```ts
205
  * import { Chunk } from "effect"
206
  *
207
  * const chunk = Chunk.of("hello")
208
+ * console.log(Chunk.toArray(chunk)) // ["hello"]
 
209
  * ```
210
  *
211
  * @category constructors
 
218
  /**
219
  * Creates a new `Chunk` from an iterable collection of values.
220
  *
221
+ * **Example** (Creating chunks from iterables)
222
+ *
223
  * ```ts
224
  * import { Chunk } from "effect"
225
  *
226
  * const chunk = Chunk.fromIterable([1, 2, 3])
227
+ * console.log(Chunk.toArray(chunk)) // [1, 2, 3]
 
228
  * ```
229
  *
230
  * @category constructors
 
268
  * (`NonEmptyChunk`), the function will return a `NonEmptyArray`, ensuring the
269
  * non-empty property is preserved.
270
  *
271
+ * **Example** (Converting chunks to mutable arrays)
272
+ *
273
  * ```ts
274
  * import { Chunk } from "effect"
275
  *
 
283
  * console.log(Chunk.toArray(emptyChunk)) // []
284
  * ```
285
  *
286
+ * @category converting
287
  * @since 2.0.0
288
  */
289
  export const toArray = toArray_;
 
317
  * non-empty (`NonEmptyChunk`), the function will return a
318
  * `NonEmptyReadonlyArray`, ensuring the non-empty property is preserved.
319
  *
320
+ * **Example** (Converting chunks to readonly arrays)
321
+ *
322
  * ```ts
323
  * import { Chunk } from "effect"
324
  *
 
334
  * console.log(Chunk.toReadonlyArray(emptyChunk)) // []
335
  * ```
336
  *
337
+ * @category converting
338
  * @since 2.0.0
339
  */
340
  export const toReadonlyArray = toReadonlyArray_;
 
364
  };
365
  /**
366
  * Reverses the order of elements in a `Chunk`.
 
367
  *
368
+ * **When to use**
369
+ *
370
+ * Use to read or process chunk elements in reverse order.
371
+ *
372
+ * **Details**
373
+ *
374
+ * If the input chunk is a `NonEmptyChunk`, the reversed chunk is also a
375
+ * `NonEmptyChunk`.
376
+ *
377
+ * **Example** (Reversing chunks)
378
  *
379
  * ```ts
380
  * import { Chunk } from "effect"
 
382
  * const chunk = Chunk.make(1, 2, 3)
383
  * const result = Chunk.reverse(chunk)
384
  *
385
+ * console.log(Chunk.toArray(result)) // [3, 2, 1]
 
386
  * ```
387
  *
 
388
  * @category elements
389
+ * @since 2.0.0
390
  */
391
  export const reverse = reverseChunk;
392
  /**
393
+ * Gets the value at an index in a `Chunk` safely, returning `None` when the index is
394
+ * out of bounds.
395
+ *
396
+ * **Example** (Accessing elements safely)
397
  *
 
398
  * ```ts
399
  * import { Chunk } from "effect"
400
  *
 
414
  */
415
  export const get = /*#__PURE__*/dual(2, (self, index) => index < 0 || index >= self.length ? O.none() : O.some(getUnsafe(self, index)));
416
  /**
417
+ * Wraps an array into a chunk without copying.
418
+ *
419
+ * **When to use**
420
+ *
421
+ * Use when the input array can be shared with the resulting `Chunk` and avoiding
422
+ * a copy matters.
423
+ *
424
+ * **Gotchas**
425
+ *
426
+ * Mutating the source array after wrapping can mutate the resulting `Chunk`.
427
+ *
428
+ * **Example** (Creating chunks without copying arrays)
429
  *
 
430
  * ```ts
431
  * import { Chunk } from "effect"
432
  *
 
439
  * console.log(Chunk.toArray(chunk)) // [999, 2, 3, 4, 5]
440
  * ```
441
  *
 
442
  * @category unsafe
443
+ * @since 4.0.0
444
  */
445
  export const fromArrayUnsafe = self => self.length === 0 ? empty() : self.length === 1 ? of(self[0]) : makeChunk({
446
  _tag: "IArray",
447
  array: self
448
  });
449
  /**
450
+ * Wraps a non-empty array into a non-empty chunk without copying.
451
+ *
452
+ * **When to use**
453
+ *
454
+ * Use when the input array is already known to be non-empty, can be shared with
455
+ * the resulting `Chunk`, and avoiding a copy matters.
456
+ *
457
+ * **Gotchas**
458
+ *
459
+ * Mutating the source array after wrapping can mutate the resulting `Chunk`.
460
+ *
461
+ * **Example** (Creating non-empty chunks without copying arrays)
462
  *
 
463
  * ```ts
464
+ * import { Array, Chunk } from "effect"
 
465
  *
466
  * const nonEmptyArray = Array.make(1, 2, 3, 4, 5)
467
  * const chunk = Chunk.fromNonEmptyArrayUnsafe(nonEmptyArray)
 
471
  * console.log(Chunk.isNonEmpty(chunk)) // true
472
  * ```
473
  *
 
474
  * @category unsafe
475
+ * @since 4.0.0
476
  */
477
  export const fromNonEmptyArrayUnsafe = self => fromArrayUnsafe(self);
478
  /**
479
+ * Gets an element at the specified index without returning an `Option`.
480
+ *
481
+ * **When to use**
482
+ *
483
+ * Use when reading from a `Chunk` at an index known to be in bounds and direct
484
+ * element access is preferred over handling `Option.none`.
485
+ *
486
+ * **Gotchas**
487
+ *
488
+ * Throws if the index is out of bounds.
489
+ *
490
+ * **Example** (Accessing elements unsafely)
491
  *
 
492
  * ```ts
493
+ * import { Chunk, Option } from "effect"
494
  *
495
  * const chunk = Chunk.make("a", "b", "c", "d")
496
  *
497
  * console.log(Chunk.getUnsafe(chunk, 1)) // "b"
498
  * console.log(Chunk.getUnsafe(chunk, 3)) // "d"
499
  *
500
+ * // Use Chunk.get when the index may be out of bounds
501
+ * console.log(Option.isNone(Chunk.get(chunk, 10))) // true
 
 
 
 
502
  * ```
503
  *
 
504
  * @category unsafe
505
+ * @since 4.0.0
506
  */
507
  export const getUnsafe = /*#__PURE__*/dual(2, (self, index) => {
508
  const i = Math.floor(index);
 
538
  /**
539
  * Appends the specified element to the end of the `Chunk`.
540
  *
541
+ * **When to use**
542
+ *
543
+ * Use to add one element after the existing chunk elements and return a
544
+ * `NonEmptyChunk`.
545
+ *
546
+ * **Example** (Appending an element)
547
+ *
548
  * ```ts
549
  * import { Chunk } from "effect"
550
  *
 
558
  * console.log(Chunk.toArray(singleElement)) // [42]
559
  * ```
560
  *
561
+ * @see {@link prepend} for adding one element before the existing elements
562
+ * @see {@link appendAll} for appending all elements from another chunk
563
+ *
564
+ * @category combining
565
  * @since 2.0.0
566
  */
567
  export const append = /*#__PURE__*/dual(2, (self, a) => appendAll(self, of(a)));
568
  /**
569
+ * Prepends an element to the front of a `Chunk`, creating a new `NonEmptyChunk`.
570
+ *
571
+ * **Example** (Prepending an element)
572
  *
 
573
  * ```ts
574
  * import { Chunk } from "effect"
575
  *
 
583
  * console.log(Chunk.toArray(singleElement)) // ["first"]
584
  * ```
585
  *
586
+ * @category combining
587
  * @since 2.0.0
588
  */
589
  export const prepend = /*#__PURE__*/dual(2, (self, elem) => appendAll(of(elem), self));
590
  /**
591
  * Takes the first up to `n` elements from the chunk.
592
  *
593
+ * **Example** (Taking elements from the start)
594
+ *
595
  * ```ts
596
  * import { Chunk } from "effect"
597
  *
598
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
599
  * const result = Chunk.take(chunk, 3)
600
+ * console.log(Chunk.toArray(result)) // [1, 2, 3]
 
601
  * ```
602
  *
603
  * @category elements
 
645
  /**
646
  * Drops the first up to `n` elements from the chunk.
647
  *
648
+ * **Example** (Dropping elements from the start)
649
+ *
650
  * ```ts
651
  * import { Chunk } from "effect"
652
  *
653
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
654
  * const result = Chunk.drop(chunk, 2)
655
+ * console.log(Chunk.toArray(result)) // [3, 4, 5]
 
656
  * ```
657
  *
658
  * @category elements
 
700
  /**
701
  * Drops the last `n` elements.
702
  *
703
+ * **Example** (Dropping elements from the end)
704
+ *
705
  * ```ts
706
  * import { Chunk } from "effect"
707
  *
708
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
709
  * const result = Chunk.dropRight(chunk, 2)
710
+ * console.log(Chunk.toArray(result)) // [1, 2, 3]
 
711
  * ```
712
  *
713
  * @category elements
 
717
  /**
718
  * Drops all elements so long as the predicate returns true.
719
  *
720
+ * **Example** (Dropping elements while a predicate matches)
721
+ *
722
  * ```ts
723
  * import { Chunk } from "effect"
724
  *
725
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
726
  * const result = Chunk.dropWhile(chunk, (n) => n < 3)
727
+ * console.log(Chunk.toArray(result)) // [3, 4, 5]
 
728
  * ```
729
  *
730
  * @category elements
 
743
  * Prepends the specified prefix chunk to the beginning of the specified chunk.
744
  * If either chunk is non-empty, the result is also a non-empty chunk.
745
  *
746
+ * **Example** (Prepending all elements)
747
  *
748
  * ```ts
749
  * import { Chunk } from "effect"
 
757
  * // [ "a", "b", 1, 2 ]
758
  * ```
759
  *
760
+ * @category combining
761
  * @since 2.0.0
762
  */
763
  export const prependAll = /*#__PURE__*/dual(2, (self, that) => appendAll(that, self));
 
765
  * Concatenates two chunks, combining their elements.
766
  * If either chunk is non-empty, the result is also a non-empty chunk.
767
  *
768
+ * **When to use**
769
+ *
770
+ * Use to concatenate two chunks when the second chunk's elements should come
771
+ * after the first.
772
+ *
773
+ * **Example** (Appending all elements)
774
  *
775
  * ```ts
776
  * import { Chunk } from "effect"
 
784
  * // [ 1, 2, "a", "b" ]
785
  * ```
786
  *
787
+ * @see {@link prependAll} for concatenating chunks in the opposite order
788
+ * @see {@link append} for adding a single element to the end
789
+ *
790
+ * @category combining
791
  * @since 2.0.0
792
  */
793
  export const appendAll = /*#__PURE__*/dual(2, (self, that) => {
 
877
  /**
878
  * Returns a filtered and mapped subset of the elements.
879
  *
880
+ * **Example** (Filtering and mapping values)
881
+ *
882
  * ```ts
883
+ * import { Chunk, Result } from "effect"
 
884
  *
885
  * const chunk = Chunk.make("1", "2", "hello", "3", "world")
886
  * const numbers = Chunk.filterMap(chunk, (str) => {
 
897
  * console.log(Chunk.toArray(evenIndexNumbers)) // [1]
898
  * ```
899
  *
 
900
  * @category filtering
901
+ * @since 2.0.0
902
  */
903
  export const filterMap = /*#__PURE__*/dual(2, (self, f) => {
904
  const as = RA.fromIterable(self);
 
914
  /**
915
  * Returns a filtered subset of the elements.
916
  *
917
+ * **Example** (Filtering values)
918
+ *
919
  * ```ts
920
  * import { Chunk } from "effect"
921
  *
 
929
  * console.log(Chunk.toArray(numbers)) // [42, 100]
930
  * ```
931
  *
 
932
  * @category filtering
933
+ * @since 2.0.0
934
  */
935
  export const filter = /*#__PURE__*/dual(2, (self, predicate) => fromArrayUnsafe(RA.filter(self, predicate)));
936
  /**
937
  * Transforms all elements of the chunk for as long as the specified function succeeds.
938
  *
939
+ * **Example** (Filtering and mapping while values match)
940
+ *
941
  * ```ts
942
+ * import { Chunk, Result } from "effect"
 
943
  *
944
  * const chunk = Chunk.make("1", "2", "hello", "3", "4")
945
  * const result = Chunk.filterMapWhile(chunk, (s) => {
 
957
  * console.log(Chunk.toArray(allNumbers)) // [1, 2, 3, 4]
958
  * ```
959
  *
 
960
  * @category filtering
961
+ * @since 2.0.0
962
  */
963
  export const filterMapWhile = /*#__PURE__*/dual(2, (self, f) => {
964
  const out = [];
 
973
  return fromArrayUnsafe(out);
974
  });
975
  /**
976
+ * Filters out optional values
977
+ *
978
+ * **Example** (Compacting optional values)
979
  *
 
980
  * ```ts
981
+ * import { Chunk, Option } from "effect"
 
982
  *
983
  * const chunk = Chunk.make(Option.some(1), Option.none(), Option.some(3))
984
  * const result = Chunk.compact(chunk)
985
+ * console.log(Chunk.toArray(result)) // [1, 3]
 
986
  * ```
987
  *
988
  * @category filtering
 
1000
  /**
1001
  * Applies a function to each element in a chunk and returns a new chunk containing the concatenated mapped elements.
1002
  *
1003
+ * **Example** (Flat mapping chunks)
1004
+ *
1005
  * ```ts
1006
  * import { Chunk } from "effect"
1007
  *
 
1022
  * console.log(Chunk.toArray(indexed)) // [1, 3, 5]
1023
  * ```
1024
  *
 
1025
  * @category sequencing
1026
+ * @since 2.0.0
1027
  */
1028
  export const flatMap = /*#__PURE__*/dual(2, (self, f) => {
1029
  if (self.backing._tag === "ISingleton") {
 
1046
  * instead, it is primarily used for side effects, such as logging or
1047
  * accumulating data in an external variable.
1048
  *
1049
+ * **Example** (Iterating over chunk values)
1050
+ *
1051
  * ```ts
1052
  * import { Chunk } from "effect"
1053
  *
 
1070
  * // Index 3: 4
1071
  * ```
1072
  *
 
1073
  * @category combinators
1074
+ * @since 2.0.0
1075
  */
1076
  export const forEach = /*#__PURE__*/dual(2, (self, f) => toReadonlyArray(self).forEach(f));
1077
  /**
1078
  * Flattens a chunk of chunks into a single chunk by concatenating all chunks.
1079
  *
1080
+ * **Example** (Flattening nested chunks)
1081
+ *
1082
  * ```ts
1083
  * import { Chunk } from "effect"
1084
  *
 
1099
  * console.log(Chunk.toArray(Chunk.flatten(withEmpty))) // [1, 2, 3, 4]
1100
  * ```
1101
  *
 
1102
  * @category sequencing
1103
+ * @since 2.0.0
1104
  */
1105
  export const flatten = /*#__PURE__*/flatMap(identity);
1106
  /**
1107
  * Groups elements in chunks of up to `n` elements.
1108
  *
1109
+ * **When to use**
1110
+ *
1111
+ * Use to divide a chunk into ordered, non-overlapping chunks with at most `n`
1112
+ * elements each.
1113
+ *
1114
+ * **Details**
1115
+ *
1116
+ * The final chunk may contain fewer than `n` elements. Empty input produces an
1117
+ * empty chunk of chunks.
1118
+ *
1119
+ * **Gotchas**
1120
+ *
1121
+ * Values of `n` less than or equal to zero produce singleton chunks.
1122
+ *
1123
+ * **Example** (Splitting into fixed-size chunks)
1124
+ *
1125
  * ```ts
1126
  * import { Chunk } from "effect"
1127
  *
 
1138
  * // [[1, 2], [3, 4], [5]]
1139
  * ```
1140
  *
1141
+ * @see {@link split} for splitting into a target number of chunks instead of a fixed chunk size
1142
+ *
1143
  * @category elements
1144
+ * @since 2.0.0
1145
  */
1146
  export const chunksOf = /*#__PURE__*/dual(2, (self, n) => {
1147
  const gr = [];
 
1159
  return fromArrayUnsafe(gr);
1160
  });
1161
  /**
1162
+ * Creates a `Chunk` of values that are included in both chunks.
1163
+ *
1164
+ * **Details**
1165
  *
1166
+ * The order and references of result values are determined by the first chunk.
1167
+ *
1168
+ * **Example** (Intersecting chunks)
1169
  *
 
1170
  * ```ts
1171
  * import { Chunk } from "effect"
1172
  *
 
1186
  * console.log(Chunk.toArray(Chunk.intersection(chunk3, chunk4))) // []
1187
  * ```
1188
  *
 
1189
  * @category elements
1190
+ * @since 2.0.0
1191
  */
1192
  export const intersection = /*#__PURE__*/dual(2, (self, that) => fromArrayUnsafe(RA.intersection(toReadonlyArray(self), toReadonlyArray(that))));
1193
  /**
1194
  * Determines if the chunk is empty.
1195
  *
1196
+ * **Example** (Checking for empty chunks)
1197
+ *
1198
  * ```ts
1199
  * import { Chunk } from "effect"
1200
  *
 
1209
  /**
1210
  * Determines if the chunk is not empty.
1211
  *
1212
+ * **Example** (Checking for non-empty chunks)
1213
+ *
1214
  * ```ts
1215
  * import { Chunk } from "effect"
1216
  *
 
1223
  */
1224
  export const isNonEmpty = self => self.length > 0;
1225
  /**
1226
+ * Returns the first element of this chunk safely if it exists.
1227
+ *
1228
+ * **Example** (Getting the first element)
1229
  *
 
1230
  * ```ts
1231
  * import { Chunk } from "effect"
1232
  *
 
1241
  /**
1242
  * Returns the first element of this chunk.
1243
  *
1244
+ * **When to use**
1245
+ *
1246
+ * Use when you know the chunk is non-empty and need the first element directly
1247
+ * without handling `Option.none`.
1248
+ *
1249
+ * **Gotchas**
1250
+ *
1251
+ * Throws an error if the chunk is empty.
1252
+ *
1253
+ * **Example** (Getting the first element unsafely)
1254
  *
 
1255
  * ```ts
1256
+ * import { Chunk, Option } from "effect"
1257
  *
1258
  * const chunk = Chunk.make(1, 2, 3, 4)
1259
  * console.log(Chunk.headUnsafe(chunk)) // 1
 
1261
  * const singleElement = Chunk.make("hello")
1262
  * console.log(Chunk.headUnsafe(singleElement)) // "hello"
1263
  *
1264
+ * // Use Chunk.head when the chunk may be empty
1265
+ * console.log(Option.isNone(Chunk.head(Chunk.empty()))) // true
 
 
 
 
1266
  * ```
1267
  *
 
1268
  * @category unsafe
1269
+ * @since 4.0.0
1270
  */
1271
  export const headUnsafe = self => getUnsafe(self, 0);
1272
  /**
1273
  * Returns the first element of this non empty chunk.
1274
  *
1275
+ * **Example** (Getting the first element of a non-empty chunk)
1276
+ *
1277
  * ```ts
1278
  * import { Chunk } from "effect"
1279
  *
 
1287
  * // Chunk.headNonEmpty(Chunk.empty()) // TypeScript error
1288
  * ```
1289
  *
 
1290
  * @category elements
1291
+ * @since 2.0.0
1292
  */
1293
  export const headNonEmpty = headUnsafe;
1294
  /**
1295
+ * Returns the last element of this chunk safely if it exists.
1296
+ *
1297
+ * **Example** (Getting the last element)
1298
  *
 
1299
  * ```ts
1300
  * import { Chunk } from "effect"
1301
  *
 
1310
  /**
1311
  * Returns the last element of this chunk.
1312
  *
1313
+ * **When to use**
1314
+ *
1315
+ * Use when you know the chunk is non-empty and need the last element directly
1316
+ * without handling `Option.none`.
1317
+ *
1318
+ * **Gotchas**
1319
+ *
1320
+ * Throws an error if the chunk is empty.
1321
+ *
1322
+ * **Example** (Getting the last element unsafely)
1323
  *
 
1324
  * ```ts
1325
+ * import { Chunk, Option } from "effect"
1326
  *
1327
  * const chunk = Chunk.make(1, 2, 3, 4)
1328
  * console.log(Chunk.lastUnsafe(chunk)) // 4
 
1330
  * const singleElement = Chunk.make("hello")
1331
  * console.log(Chunk.lastUnsafe(singleElement)) // "hello"
1332
  *
1333
+ * // Use Chunk.last when the chunk may be empty
1334
+ * console.log(Option.isNone(Chunk.last(Chunk.empty()))) // true
 
 
 
 
1335
  * ```
1336
  *
 
1337
  * @category unsafe
1338
+ * @since 4.0.0
1339
  */
1340
  export const lastUnsafe = self => getUnsafe(self, self.length - 1);
1341
  /**
1342
  * Returns the last element of this non empty chunk.
1343
  *
1344
+ * **Example** (Getting the last element of a non-empty chunk)
1345
+ *
1346
  * ```ts
1347
  * import { Chunk } from "effect"
1348
  *
 
1356
  * // Chunk.lastNonEmpty(Chunk.empty()) // TypeScript error
1357
  * ```
1358
  *
 
1359
  * @category elements
1360
+ * @since 3.4.0
1361
  */
1362
  export const lastNonEmpty = lastUnsafe;
1363
  /**
1364
  * Transforms the elements of a chunk using the specified mapping function.
1365
  * If the input chunk is non-empty, the resulting chunk will also be non-empty.
1366
  *
1367
+ * **Example** (Mapping values)
1368
  *
1369
  * ```ts
1370
  * import { Chunk } from "effect"
1371
  *
1372
  * const result = Chunk.map(Chunk.make(1, 2), (n) => n + 1)
1373
  *
1374
+ * console.log(Chunk.toArray(result)) // [2, 3]
 
1375
  * ```
1376
  *
 
1377
  * @category mapping
1378
+ * @since 2.0.0
1379
  */
1380
  export const map = /*#__PURE__*/dual(2, (self, f) => self.backing._tag === "ISingleton" ? of(f(self.backing.a, 0)) : fromArrayUnsafe(pipe(toReadonlyArray(self), RA.map((a, i) => f(a, i)))));
1381
  /**
1382
+ * Maps over the chunk statefully, producing new elements of type `B`.
1383
+ *
1384
+ * **Example** (Mapping with accumulated state)
1385
  *
 
1386
  * ```ts
1387
  * import { Chunk } from "effect"
1388
  *
 
1405
  * console.log(Chunk.toArray(indexed)) // ["0: hello", "1: world", "2: effect"]
1406
  * ```
1407
  *
 
1408
  * @category folding
1409
+ * @since 2.0.0
1410
  */
1411
  export const mapAccum = /*#__PURE__*/dual(3, (self, s, f) => {
1412
  const [s1, as] = RA.mapAccum(self, s, f);
 
1415
  /**
1416
  * Splits a chunk using a `Filter` into failures and successes.
1417
  *
1418
+ * **Details**
1419
+ *
1420
+ * Returns `[excluded, satisfying]`. The filter receives `(element, index)`.
1421
+ *
1422
+ * **Example** (Partitioning with a Result)
1423
  *
 
1424
  * ```ts
1425
  * import { Chunk, Result } from "effect"
1426
  *
 
1440
  return [fromArrayUnsafe(excluded), fromArrayUnsafe(satisfying)];
1441
  });
1442
  /**
1443
+ * Separates a chunk of `Result` values into a chunk of failures and a chunk of
1444
+ * successes.
1445
+ *
1446
+ * **Details**
1447
+ *
1448
+ * The returned tuple is `[failures, successes]`, preserving the original order
1449
+ * within each side.
1450
+ *
1451
+ * **Example** (Separating failures and successes)
1452
  *
 
1453
  * ```ts
1454
+ * import { Chunk, Result } from "effect"
 
1455
  *
1456
  * const chunk = Chunk.make(
1457
  * Result.succeed(1),
 
1479
  /**
1480
  * Retrieves the size of the chunk.
1481
  *
1482
+ * **Example** (Getting chunk size)
1483
+ *
1484
  * ```ts
1485
  * import { Chunk } from "effect"
1486
  *
 
1493
  */
1494
  export const size = self => self.length;
1495
  /**
1496
+ * Sorts the elements of a `Chunk` in increasing order, creating a new `Chunk`.
1497
+ *
1498
+ * **Example** (Sorting chunks)
1499
  *
 
1500
  * ```ts
1501
+ * import { Chunk, Order } from "effect"
 
1502
  *
1503
  * const numbers = Chunk.make(3, 1, 4, 1, 5, 9, 2, 6)
1504
  * const sorted = Chunk.sort(numbers, Order.Number)
 
1514
  * console.log(Chunk.toArray(sortedWords)) // ["apple", "banana", "cherry"]
1515
  * ```
1516
  *
 
1517
  * @category sorting
1518
+ * @since 2.0.0
1519
  */
1520
  export const sort = /*#__PURE__*/dual(2, (self, O) => fromArrayUnsafe(RA.sort(toReadonlyArray(self), O)));
1521
  /**
1522
+ * Sorts the elements of a `Chunk` based on a projection function.
1523
+ *
1524
+ * **Example** (Sorting chunks by a derived value)
1525
  *
 
1526
  * ```ts
1527
+ * import { Chunk, Order } from "effect"
 
1528
  *
1529
  * const people = Chunk.make(
1530
  * { name: "Alice", age: 30 },
 
1548
  * console.log(Chunk.toArray(byLength)) // ["a", "ab", "abc"]
1549
  * ```
1550
  *
 
1551
  * @category sorting
1552
+ * @since 2.0.0
1553
  */
1554
  export const sortWith = /*#__PURE__*/dual(3, (self, f, order) => sort(self, Order.mapInput(order, f)));
1555
  /**
1556
  * Returns two splits of this chunk at the specified index.
1557
  *
1558
+ * **Example** (Splitting at an index)
1559
+ *
1560
  * ```ts
1561
  * import { Chunk } from "effect"
1562
  *
 
1576
  * console.log(Chunk.toArray(empty2)) // []
1577
  * ```
1578
  *
 
1579
  * @category splitting
1580
+ * @since 2.0.0
1581
  */
1582
  export const splitAt = /*#__PURE__*/dual(2, (self, n) => [take(self, n), drop(self, n)]);
1583
  /**
1584
+ * Splits a `NonEmptyChunk` at `n`, returning a non-empty prefix and the
1585
+ * remaining suffix.
1586
+ *
1587
+ * **Details**
1588
+ *
1589
+ * `n` is floored and normalized to at least `1`. If `n` is greater than or
1590
+ * equal to the chunk length, the first result is the original chunk and the
1591
+ * second result is empty.
1592
+ *
1593
+ * **Example** (Splitting non-empty chunks at an index)
1594
  *
 
1595
  * ```ts
1596
  * import { Chunk } from "effect"
1597
  *
 
1617
  return _n >= self.length ? [self, empty()] : [take(self, _n), drop(self, _n)];
1618
  });
1619
  /**
1620
+ * Splits a chunk into up to `n` chunks, distributing elements in order.
1621
+ *
1622
+ * **Details**
1623
+ *
1624
+ * The chunk size is derived from the input length and `n`; the final chunk may
1625
+ * contain fewer elements than the others.
1626
+ *
1627
+ * **Example** (Splitting chunks into groups)
1628
  *
 
1629
  * ```ts
1630
  * import { Chunk } from "effect"
1631
  *
 
1646
  * // [[1, 2, 3, 4, 5, 6, 7, 8, 9]]
1647
  * ```
1648
  *
 
1649
  * @category splitting
1650
+ * @since 2.0.0
1651
  */
1652
  export const split = /*#__PURE__*/dual(2, (self, n) => chunksOf(self, Math.ceil(self.length / Math.floor(n))));
1653
  /**
1654
  * Splits this chunk on the first element that matches this predicate.
1655
  * Returns a tuple containing two chunks: the first one is before the match, and the second one is from the match onward.
1656
  *
1657
+ * **Example** (Splitting at a matching element)
1658
+ *
1659
  * ```ts
1660
  * import { Chunk } from "effect"
1661
  *
 
1690
  return splitAt(self, i);
1691
  });
1692
  /**
1693
+ * Returns every element after the first safely, or `None` when the chunk is empty.
1694
+ *
1695
+ * **Example** (Getting the tail safely)
1696
  *
 
1697
  * ```ts
1698
  * import { Chunk } from "effect"
1699
  *
 
1707
  * console.log(Chunk.tail(empty)) // Option.none()
1708
  * ```
1709
  *
 
1710
  * @category elements
1711
+ * @since 2.0.0
1712
  */
1713
  export const tail = self => self.length > 0 ? O.some(drop(self, 1)) : O.none();
1714
  /**
1715
+ * Returns every element after the first from a non-empty chunk.
1716
+ *
1717
+ * **Example** (Getting the tail of a non-empty chunk)
1718
  *
 
1719
  * ```ts
1720
  * import { Chunk } from "effect"
1721
  *
 
1731
  * // Chunk.tailNonEmpty(Chunk.empty()) // TypeScript error
1732
  * ```
1733
  *
 
1734
  * @category elements
1735
+ * @since 2.0.0
1736
  */
1737
  export const tailNonEmpty = self => drop(self, 1);
1738
  /**
1739
  * Takes the last `n` elements.
1740
  *
1741
+ * **Example** (Taking elements from the end)
1742
+ *
1743
  * ```ts
1744
  * import { Chunk } from "effect"
1745
  *
 
1756
  * console.log(Chunk.toArray(none)) // []
1757
  * ```
1758
  *
 
1759
  * @category elements
1760
+ * @since 2.0.0
1761
  */
1762
  export const takeRight = /*#__PURE__*/dual(2, (self, n) => drop(self, self.length - n));
1763
  /**
1764
  * Takes all elements so long as the predicate returns true.
1765
  *
1766
+ * **Example** (Taking elements while a predicate matches)
1767
+ *
1768
  * ```ts
1769
  * import { Chunk } from "effect"
1770
  *
 
1782
  * console.log(Chunk.toArray(all)) // [1, 2, 3]
1783
  * ```
1784
  *
 
1785
  * @category elements
1786
+ * @since 2.0.0
1787
  */
1788
  export const takeWhile = /*#__PURE__*/dual(2, (self, predicate) => {
1789
  const out = [];
 
1799
  /**
1800
  * Creates a Chunks of unique values, in order, from all given Chunks.
1801
  *
1802
+ * **Example** (Unioning chunks)
1803
+ *
1804
  * ```ts
1805
  * import { Chunk } from "effect"
1806
  *
 
1816
  * console.log(Chunk.toArray(unified)) // [1, 2, 3]
1817
  * ```
1818
  *
 
1819
  * @category elements
1820
+ * @since 2.0.0
1821
  */
1822
  export const union = /*#__PURE__*/dual(2, (self, that) => fromArrayUnsafe(RA.union(toReadonlyArray(self), toReadonlyArray(that))));
1823
  /**
1824
+ * Removes duplicate elements from a `Chunk`, preserving the first occurrence
1825
+ * of each value.
1826
+ *
1827
+ * **Example** (Removing duplicate values)
1828
  *
 
1829
  * ```ts
1830
  * import { Chunk } from "effect"
1831
  *
 
1844
  * console.log(Chunk.toArray(uniqueDeduped)) // [1, 2, 3]
1845
  * ```
1846
  *
 
1847
  * @category elements
1848
+ * @since 2.0.0
1849
  */
1850
  export const dedupe = self => fromArrayUnsafe(RA.dedupe(toReadonlyArray(self)));
1851
  /**
1852
  * Deduplicates adjacent elements that are identical.
1853
  *
1854
+ * **Example** (Removing adjacent duplicates)
1855
+ *
1856
  * ```ts
1857
  * import { Chunk } from "effect"
1858
  *
 
1866
  * console.log(Chunk.toArray(mixedResult)) // ["a", "b", "a"]
1867
  * ```
1868
  *
 
1869
  * @category filtering
1870
+ * @since 2.0.0
1871
  */
1872
  export const dedupeAdjacent = self => fromArrayUnsafe(RA.dedupeAdjacent(self));
1873
  /**
1874
+ * Takes a `Chunk` of pairs and returns two corresponding `Chunk`s.
1875
  *
1876
+ * **Details**
1877
+ *
1878
+ * This function is the reverse of `zip`.
1879
+ *
1880
+ * **Example** (Unzipping pairs)
1881
  *
 
1882
  * ```ts
1883
  * import { Chunk } from "effect"
1884
  *
 
1898
  * console.log(Chunk.toArray(emptyStrs)) // []
1899
  * ```
1900
  *
 
1901
  * @category elements
1902
+ * @since 2.0.0
1903
  */
1904
  export const unzip = self => {
1905
  const [left, right] = RA.unzip(self);
 
1908
  /**
1909
  * Zips this chunk pointwise with the specified chunk using the specified combiner.
1910
  *
1911
+ * **Example** (Zipping chunks with a function)
1912
+ *
1913
  * ```ts
1914
  * import { Chunk } from "effect"
1915
  *
 
1925
  * console.log(Chunk.toArray(mixed)) // [[1, "a"], [2, "b"]]
1926
  * ```
1927
  *
 
1928
  * @category zipping
1929
+ * @since 2.0.0
1930
  */
1931
  export const zipWith = /*#__PURE__*/dual(3, (self, that, f) => fromArrayUnsafe(RA.zipWith(self, that, f)));
1932
  /**
1933
  * Zips this chunk pointwise with the specified chunk.
1934
  *
1935
+ * **Example** (Zipping chunks)
1936
+ *
1937
  * ```ts
1938
  * import { Chunk } from "effect"
1939
  *
 
1949
  * console.log(Chunk.toArray(zipped)) // [[1, "a"], [2, "b"]]
1950
  * ```
1951
  *
 
1952
  * @category zipping
1953
+ * @since 2.0.0
1954
  */
1955
  export const zip = /*#__PURE__*/dual(2, (self, that) => zipWith(self, that, (a, b) => [a, b]));
1956
  /**
1957
+ * Deletes the element at the specified index, creating a new `Chunk`.
1958
+ *
1959
+ * **Example** (Removing an element)
1960
  *
 
1961
  * ```ts
1962
  * import { Chunk } from "effect"
1963
  *
 
1979
  */
1980
  export const remove = /*#__PURE__*/dual(2, (self, i) => fromArrayUnsafe(RA.remove(toReadonlyArray(self), i)));
1981
  /**
1982
+ * Applies a function to the element at the specified index safely, creating a new `Chunk`,
1983
  * or returns `None` if the index is out of bounds.
1984
  *
1985
+ * **Example** (Modifying an element)
1986
+ *
1987
  * ```ts
1988
  * import { Chunk } from "effect"
1989
  *
 
2005
  */
2006
  export const modify = /*#__PURE__*/dual(3, (self, i, f) => pipe(RA.modify(toReadonlyArray(self), i, f), O.map(fromArrayUnsafe)));
2007
  /**
2008
+ * Changes the element at the specified index safely, creating a new `Chunk`,
2009
  * or returns `None` if the index is out of bounds.
2010
  *
2011
+ * **Example** (Replacing an element)
2012
+ *
2013
  * ```ts
2014
  * import { Chunk } from "effect"
2015
  *
 
2031
  */
2032
  export const replace = /*#__PURE__*/dual(3, (self, i, b) => modify(self, i, () => b));
2033
  /**
2034
+ * Returns a non-empty `Chunk` of length `n` with element `i` initialized by `f(i)`.
2035
  *
2036
+ * **Details**
2037
+ *
2038
+ * `n` is normalized to an integer greater than or equal to `1`.
2039
+ *
2040
+ * **Example** (Generating chunks from indices)
2041
  *
 
2042
  * ```ts
2043
  * import { Chunk } from "effect"
2044
  *
2045
  * const chunk = Chunk.makeBy(5, (i) => i * 2)
2046
+ * console.log(Chunk.toArray(chunk)) // [0, 2, 4, 6, 8]
 
2047
  * ```
2048
  *
2049
  * @category constructors
 
2051
  */
2052
  export const makeBy = /*#__PURE__*/dual(2, (n, f) => fromIterable(RA.makeBy(n, f)));
2053
  /**
2054
+ * Creates a non-empty `Chunk` of consecutive integers from `start` through
2055
+ * `end`, inclusive.
2056
+ *
2057
+ * **Details**
2058
+ *
2059
+ * If `start` is greater than `end`, returns a single-element chunk containing
2060
+ * `start`.
2061
+ *
2062
+ * **Example** (Creating a range)
2063
  *
 
2064
  * ```ts
2065
  * import { Chunk } from "effect"
2066
  *
2067
  * const chunk = Chunk.range(1, 5)
2068
+ * console.log(Chunk.toArray(chunk)) // [1, 2, 3, 4, 5]
 
2069
  * ```
2070
  *
2071
  * @category constructors
 
2078
  /**
2079
  * Returns a function that checks if a `Chunk` contains a given value using the default `Equivalence`.
2080
  *
2081
+ * **Example** (Checking membership)
2082
+ *
2083
  * ```ts
2084
  * import { Chunk } from "effect"
2085
  *
 
2104
  /**
2105
  * Returns a function that checks if a `Chunk` contains a given value using a provided `isEquivalent` function.
2106
  *
2107
+ * **Example** (Checking membership with custom equivalence)
2108
+ *
2109
  * ```ts
2110
  * import { Chunk } from "effect"
2111
  *
 
2135
  * Returns the first element that satisfies the specified
2136
  * predicate, or `None` if no such element exists.
2137
  *
2138
+ * **Example** (Finding the first matching element)
2139
+ *
2140
  * ```ts
2141
  * import { Chunk, Option } from "effect"
2142
  *
 
2163
  */
2164
  export const findFirst = RA.findFirst;
2165
  /**
2166
+ * Returns the first index for which a predicate holds.
2167
+ *
2168
+ * **Example** (Finding the first matching index)
2169
  *
 
2170
  * ```ts
2171
  * import { Chunk } from "effect"
2172
  *
 
2188
  */
2189
  export const findFirstIndex = /*#__PURE__*/dual(2, (self, predicate) => RA.findFirstIndex(self, predicate));
2190
  /**
2191
+ * Finds the last element for which a predicate holds.
2192
+ *
2193
+ * **Example** (Finding the last matching element)
2194
  *
 
2195
  * ```ts
2196
+ * import { Chunk, Option } from "effect"
 
2197
  *
2198
  * const chunk = Chunk.make(1, 2, 3, 4, 5)
2199
  * const result = Chunk.findLast(chunk, (n) => n < 4)
 
2214
  */
2215
  export const findLast = RA.findLast;
2216
  /**
2217
+ * Returns the last index for which a predicate holds.
2218
+ *
2219
+ * **Example** (Finding the last matching index)
2220
  *
 
2221
  * ```ts
2222
  * import { Chunk } from "effect"
2223
  *
 
2239
  */
2240
  export const findLastIndex = /*#__PURE__*/dual(2, (self, predicate) => RA.findLastIndex(self, predicate));
2241
  /**
2242
+ * Checks whether a predicate holds true for every `Chunk` element.
2243
+ *
2244
+ * **Example** (Checking every element)
2245
  *
 
2246
  * ```ts
2247
  * import { Chunk } from "effect"
2248
  *
 
2267
  */
2268
  export const every = /*#__PURE__*/dual(2, (self, refinement) => RA.fromIterable(self).every(refinement));
2269
  /**
2270
+ * Checks whether a predicate holds true for some `Chunk` element.
2271
+ *
2272
+ * **Example** (Checking for some matching element)
2273
  *
 
2274
  * ```ts
2275
  * import { Chunk } from "effect"
2276
  *
 
2294
  /**
2295
  * Joins the elements together with "sep" in the middle.
2296
  *
2297
+ * **Example** (Joining chunks into a string)
2298
+ *
2299
  * ```ts
2300
  * import { Chunk } from "effect"
2301
  *
 
2323
  /**
2324
  * Reduces the elements of a chunk from left to right.
2325
  *
2326
+ * **Example** (Reducing from the left)
2327
+ *
2328
  * ```ts
2329
  * import { Chunk } from "effect"
2330
  *
 
2349
  /**
2350
  * Reduces the elements of a chunk from right to left.
2351
  *
2352
+ * **Example** (Reducing from the right)
2353
+ *
2354
  * ```ts
2355
  * import { Chunk } from "effect"
2356
  *
 
2380
  * Creates a `Chunk` of values not included in the other given `Chunk` using the provided `isEquivalent` function.
2381
  * The order and references of result values are determined by the first `Chunk`.
2382
  *
2383
+ * **Example** (Computing difference with custom equivalence)
2384
+ *
2385
  * ```ts
2386
  * import { Chunk } from "effect"
2387
  *
 
2415
  * Creates a `Chunk` of values not included in the other given `Chunk`.
2416
  * The order and references of result values are determined by the first `Chunk`.
2417
  *
2418
+ * **Example** (Computing chunk difference)
2419
+ *
2420
  * ```ts
2421
  * import { Chunk } from "effect"
2422
  *
.opencode/node_modules/effect/dist/Chunk.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Chunk.js","names":["RA","Equal","Equivalence","format","dual","identity","pipe","Hash","NodeInspectSymbol","toJson","O","Order","pipeArguments","hasProperty","R","TypeId","copy","src","srcPos","dest","destPos","len","i","Math","min","length","emptyArray","makeEquivalence","isEquivalent","make","self","that","toReadonlyArray","every","value","getUnsafe","_equivalence","equals","ChunkProto","_A","_","toString","toJSON","_id","values","symbol","isChunk","array","Symbol","iterator","backing","_tag","arguments","makeChunk","chunk","Object","create","depth","left","right","max","_empty","u","empty","as","fromNonEmptyArrayUnsafe","of","a","fromIterable","fromArrayUnsafe","copyToArray","initial","j","toArray_","slice","toArray","toReadonlyArray_","arr","Array","reverseChunk","reverse","get","index","none","some","floor","Error","offset","append","appendAll","prepend","elem","take","n","drop","dropRight","dropWhile","predicate","prependAll","diff","abs","nr","nrr","nl","nll","filterMap","f","out","result","isSuccess","push","success","filter","filterMapWhile","compact","option","isSome","flatMap","k","forEach","flatten","chunksOf","gr","current","intersection","isEmpty","isNonEmpty","head","headUnsafe","headNonEmpty","last","lastUnsafe","lastNonEmpty","map","mapAccum","s","s1","partition","excluded","satisfying","separate","l","r","size","sort","sortWith","order","mapInput","splitAt","splitNonEmptyAt","_n","split","ceil","splitWhere","tail","tailNonEmpty","takeRight","takeWhile","union","dedupe","dedupeAdjacent","unzip","zipWith","zip","b","remove","modify","replace","makeBy","range","start","end","contains","containsWith","findFirst","findFirstIndex","findLast","findLastIndex","refinement","join","reduce","reduceRight","differenceWith","difference"],"sources":["../src/Chunk.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsEA,OAAO,KAAKA,EAAE,MAAM,YAAY;AAEhC,OAAO,KAAKC,KAAK,MAAM,YAAY;AACnC,OAAO,KAAKC,WAAW,MAAM,kBAAkB;AAE/C,SAASC,MAAM,QAAQ,gBAAgB;AACvC,SAASC,IAAI,EAAEC,QAAQ,EAAEC,IAAI,QAAQ,eAAe;AACpD,OAAO,KAAKC,IAAI,MAAM,WAAW;AAEjC,SAA2BC,iBAAiB,EAAEC,MAAM,QAAQ,kBAAkB;AAG9E,OAAO,KAAKC,CAAC,MAAM,aAAa;AAChC,OAAO,KAAKC,KAAK,MAAM,YAAY;AAEnC,SAASC,aAAa,QAAQ,eAAe;AAC7C,SAASC,WAAW,QAAyC,gBAAgB;AAC7E,OAAO,KAAKC,CAAC,MAAM,aAAa;AAIhC,MAAMC,MAAM,GAAG,2BAA2B;AAmG1C,SAASC,IAAIA,CACXC,GAAqB,EACrBC,MAAc,EACdC,IAAc,EACdC,OAAe,EACfC,GAAW;EAEX,KAAK,IAAIC,CAAC,GAAGJ,MAAM,EAAEI,CAAC,GAAGC,IAAI,CAACC,GAAG,CAACP,GAAG,CAACQ,MAAM,EAAEP,MAAM,GAAGG,GAAG,CAAC,EAAEC,CAAC,EAAE,EAAE;IAChEH,IAAI,CAACC,OAAO,GAAGE,CAAC,GAAGJ,MAAM,CAAC,GAAGD,GAAG,CAACK,CAAC,CAAE;EACtC;EACA,OAAOH,IAAI;AACb;AAEA,MAAMO,UAAU,GAAyB,EAAE;AAE3C;;;;;;;;;;;;;;;;;;;;AAoBA,OAAO,MAAMC,eAAe,GAAOC,YAAwC,IACzE1B,WAAW,CAAC2B,IAAI,CAAC,CAACC,IAAI,EAAEC,IAAI,KAC1BD,IAAI,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E,CAACsL,cAAc,CAAC1J,YAAY,CAAC,CAACE,IAAI,EAAEC,IAAI,CAAC,CAAC,CAC3G;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,OAAO,MAAMwJ,UAAU,gBA2DnBnL,IAAI,CACN,CAAC,EACD,CAAI0B,IAAc,EAAEC,IAAc,KAAesC,eAAe,CAACrE,EAAE,CAACuL,UAAU,CAACzJ,IAAI,EAAEC,IAAI,CAAC,CAAC,CAC5F","ignoreList":[]}
 
1
+ {"version":3,"file":"Chunk.js","names":["RA","Equal","Equivalence","format","dual","identity","pipe","Hash","NodeInspectSymbol","toJson","O","Order","pipeArguments","hasProperty","R","TypeId","copy","src","srcPos","dest","destPos","len","i","Math","min","length","emptyArray","makeEquivalence","isEquivalent","make","self","that","toReadonlyArray","every","value","getUnsafe","_equivalence","equals","ChunkProto","_A","_","toString","toJSON","_id","values","symbol","isChunk","array","Symbol","iterator","backing","_tag","arguments","makeChunk","chunk","Object","create","depth","left","right","max","_empty","u","empty","as","fromNonEmptyArrayUnsafe","of","a","fromIterable","fromArrayUnsafe","copyToArray","initial","j","toArray_","slice","toArray","toReadonlyArray_","arr","Array","reverseChunk","reverse","get","index","none","some","floor","Error","offset","append","appendAll","prepend","elem","take","n","drop","dropRight","dropWhile","predicate","prependAll","diff","abs","nr","nrr","nl","nll","filterMap","f","out","result","isSuccess","push","success","filter","filterMapWhile","compact","option","isSome","flatMap","k","forEach","flatten","chunksOf","gr","current","intersection","isEmpty","isNonEmpty","head","headUnsafe","headNonEmpty","last","lastUnsafe","lastNonEmpty","map","mapAccum","s","s1","partition","excluded","satisfying","separate","l","r","size","sort","sortWith","order","mapInput","splitAt","splitNonEmptyAt","_n","split","ceil","splitWhere","tail","tailNonEmpty","takeRight","takeWhile","union","dedupe","dedupeAdjacent","unzip","zipWith","zip","b","remove","modify","replace","makeBy","range","start","end","contains","containsWith","findFirst","findFirstIndex","findLast","findLastIndex","refinement","join","reduce","reduceRight","differen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B,IAAI,CACT,CAAC,EACD,CAAC0B,IAAc,EAAEC,IAAc,KAAesC,eAAe,CAACrE,EAAE,CAACsL,cAAc,CAAC1J,YAAY,CAAC,CAACE,IAAI,EAAEC,IAAI,CAAC,CAAC,CAC3G;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,OAAO,MAAMwJ,UAAU,gBA6DnBnL,IAAI,CACN,CAAC,EACD,CAAI0B,IAAc,EAAEC,IAAc,KAAesC,eAAe,CAACrE,EAAE,CAACuL,UAAU,CAACzJ,IAAI,EAAEC,IAAI,CAAC,CAAC,CAC5F","ignoreList":[]}
.opencode/node_modules/effect/dist/Clock.d.ts CHANGED
@@ -1,58 +1,8 @@
1
  /**
2
- * The `Clock` module provides functionality for time-based operations in Effect applications.
3
- * It offers precise time measurements, scheduling capabilities, and controlled time management
4
- * for testing scenarios.
5
- *
6
- * The Clock service is a core component of the Effect runtime, providing:
7
- * - Current time access in milliseconds and nanoseconds
8
- * - Sleep operations for delaying execution
9
- * - Time-based scheduling primitives
10
- * - Testable time control through `TestClock`
11
- *
12
- * ## Key Features
13
- *
14
- * - **Precise timing**: Access to both millisecond and nanosecond precision
15
- * - **Sleep operations**: Non-blocking sleep with proper interruption handling
16
- * - **Service integration**: Seamless integration with Effect's dependency injection
17
- * - **Testable**: Mock time control for deterministic testing
18
- * - **Resource-safe**: Automatic cleanup of time-based resources
19
- *
20
- * @example
21
- * ```ts
22
- * import { Clock, Effect } from "effect"
23
- *
24
- * // Get current time in milliseconds
25
- * const getCurrentTime = Clock.currentTimeMillis
26
- *
27
- * // Sleep for 1 second
28
- * const sleep1Second = Effect.sleep("1 seconds")
29
- *
30
- * // Measure execution time
31
- * const measureTime = Effect.gen(function*() {
32
- * const start = yield* Clock.currentTimeMillis
33
- * yield* Effect.sleep("100 millis")
34
- * const end = yield* Clock.currentTimeMillis
35
- * return end - start
36
- * })
37
- * ```
38
- *
39
- * @example
40
- * ```ts
41
- * import { Clock, Effect } from "effect"
42
- *
43
- * // Using Clock service directly
44
- * const program = Effect.gen(function*() {
45
- * const clock = yield* Clock.Clock
46
- * const currentTime = yield* clock.currentTimeMillis
47
- * console.log(`Current time: ${currentTime}`)
48
- *
49
- * // Sleep for 500ms
50
- * yield* Effect.sleep("500 millis")
51
- *
52
- * const afterSleep = yield* clock.currentTimeMillis
53
- * console.log(`After sleep: ${afterSleep}`)
54
- * })
55
- * ```
56
  *
57
  * @since 2.0.0
58
  */
@@ -63,7 +13,13 @@ import type { Effect } from "./Effect.ts";
63
  * Represents a time-based clock which provides functionality related to time
64
  * and scheduling.
65
  *
66
- * @example
 
 
 
 
 
 
67
  * ```ts
68
  * import { Clock, Effect } from "effect"
69
  *
@@ -76,35 +32,63 @@ import type { Effect } from "./Effect.ts";
76
  * })
77
  * ```
78
  *
79
- * @since 2.0.0
80
  * @category models
 
81
  */
82
  export interface Clock {
83
  /**
84
- * Unsafely returns the current time in milliseconds.
 
 
 
 
 
85
  */
86
  currentTimeMillisUnsafe(): number;
87
  /**
88
  * Returns the current time in milliseconds.
 
 
 
 
89
  */
90
  readonly currentTimeMillis: Effect<number>;
91
  /**
92
- * Unsafely returns the current time in nanoseconds.
 
 
 
 
 
93
  */
94
  currentTimeNanosUnsafe(): bigint;
95
  /**
96
  * Returns the current time in nanoseconds.
 
 
 
 
97
  */
98
  readonly currentTimeNanos: Effect<bigint>;
99
  /**
100
  * Asynchronously sleeps for the specified duration.
 
 
 
 
101
  */
102
  sleep(duration: Duration.Duration): Effect<void>;
103
  }
104
  /**
105
- * A reference to the current Clock service in the environment.
 
 
 
 
 
 
 
106
  *
107
- * @example
108
  * ```ts
109
  * import { Clock, Effect } from "effect"
110
  *
@@ -114,14 +98,24 @@ export interface Clock {
114
  * })
115
  * ```
116
  *
 
 
 
 
117
  * @category references
118
- * @since 4.0.0
119
  */
120
  export declare const Clock: Context.Reference<Clock>;
121
  /**
122
  * Accesses the current Clock service and uses it to run the provided function.
123
  *
124
- * @example
 
 
 
 
 
 
125
  * ```ts
126
  * import { Clock, Effect } from "effect"
127
  *
@@ -134,6 +128,9 @@ export declare const Clock: Context.Reference<Clock>;
134
  * )
135
  * ```
136
  *
 
 
 
137
  * @category constructors
138
  * @since 2.0.0
139
  */
@@ -141,7 +138,13 @@ export declare const clockWith: <A, E, R>(f: (clock: Clock) => Effect<A, E, R>)
141
  /**
142
  * Returns an Effect that succeeds with the current time in milliseconds.
143
  *
144
- * @example
 
 
 
 
 
 
145
  * ```ts
146
  * import { Clock, Effect } from "effect"
147
  *
@@ -152,6 +155,9 @@ export declare const clockWith: <A, E, R>(f: (clock: Clock) => Effect<A, E, R>)
152
  * })
153
  * ```
154
  *
 
 
 
155
  * @category constructors
156
  * @since 2.0.0
157
  */
@@ -159,7 +165,13 @@ export declare const currentTimeMillis: Effect<number>;
159
  /**
160
  * Returns an Effect that succeeds with the current time in nanoseconds.
161
  *
162
- * @example
 
 
 
 
 
 
163
  * ```ts
164
  * import { Clock, Effect } from "effect"
165
  *
 
1
  /**
2
+ * Service and helpers for reading time and sleeping inside Effect programs.
3
+ * The active `Clock` provides current time in milliseconds or nanoseconds and a
4
+ * `sleep` operation for delaying work. Because time is accessed through a
5
+ * service, tests can replace the clock with a controlled implementation.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  *
7
  * @since 2.0.0
8
  */
 
13
  * Represents a time-based clock which provides functionality related to time
14
  * and scheduling.
15
  *
16
+ * **When to use**
17
+ *
18
+ * Use to define or provide a clock service for current-time and sleep
19
+ * operations.
20
+ *
21
+ * **Example** (Reading current time)
22
+ *
23
  * ```ts
24
  * import { Clock, Effect } from "effect"
25
  *
 
32
  * })
33
  * ```
34
  *
 
35
  * @category models
36
+ * @since 2.0.0
37
  */
38
  export interface Clock {
39
  /**
40
+ * Returns the current time in milliseconds unsafely.
41
+ *
42
+ * **When to use**
43
+ *
44
+ * Use to read millisecond time synchronously when you already have a `Clock`
45
+ * service and can accept non-effectful access.
46
  */
47
  currentTimeMillisUnsafe(): number;
48
  /**
49
  * Returns the current time in milliseconds.
50
+ *
51
+ * **When to use**
52
+ *
53
+ * Use to read millisecond time through this `Clock` service in `Effect`.
54
  */
55
  readonly currentTimeMillis: Effect<number>;
56
  /**
57
+ * Returns the current time in nanoseconds unsafely.
58
+ *
59
+ * **When to use**
60
+ *
61
+ * Use to read nanosecond time synchronously when you already have a `Clock`
62
+ * service and can accept non-effectful access.
63
  */
64
  currentTimeNanosUnsafe(): bigint;
65
  /**
66
  * Returns the current time in nanoseconds.
67
+ *
68
+ * **When to use**
69
+ *
70
+ * Use to read nanosecond time through this `Clock` service in `Effect`.
71
  */
72
  readonly currentTimeNanos: Effect<bigint>;
73
  /**
74
  * Asynchronously sleeps for the specified duration.
75
+ *
76
+ * **When to use**
77
+ *
78
+ * Use to delay an `Effect` workflow by a duration through this `Clock` service.
79
  */
80
  sleep(duration: Duration.Duration): Effect<void>;
81
  }
82
  /**
83
+ * Context reference for the active time service in the environment.
84
+ *
85
+ * **When to use**
86
+ *
87
+ * Use when you need to access or provide the full time service, including sleep
88
+ * operations, rather than a single timestamp accessor.
89
+ *
90
+ * **Example** (Accessing the Clock service)
91
  *
 
92
  * ```ts
93
  * import { Clock, Effect } from "effect"
94
  *
 
98
  * })
99
  * ```
100
  *
101
+ * @see {@link clockWith} for using the current Clock service inside an effect
102
+ * @see {@link currentTimeMillis} for reading the current time in milliseconds
103
+ * @see {@link currentTimeNanos} for reading the current time in nanoseconds
104
+ *
105
  * @category references
106
+ * @since 2.0.0
107
  */
108
  export declare const Clock: Context.Reference<Clock>;
109
  /**
110
  * Accesses the current Clock service and uses it to run the provided function.
111
  *
112
+ * **When to use**
113
+ *
114
+ * Use when you need the full Clock service interface to perform multiple time
115
+ * operations or call unsafe variants within a single effect.
116
+ *
117
+ * **Example** (Using the current Clock service)
118
+ *
119
  * ```ts
120
  * import { Clock, Effect } from "effect"
121
  *
 
128
  * )
129
  * ```
130
  *
131
+ * @see {@link Clock} for the service reference
132
+ * @see {@link currentTimeMillis} for convenience accessor that returns milliseconds
133
+ * @see {@link currentTimeNanos} for convenience accessor that returns nanoseconds
134
  * @category constructors
135
  * @since 2.0.0
136
  */
 
138
  /**
139
  * Returns an Effect that succeeds with the current time in milliseconds.
140
  *
141
+ * **When to use**
142
+ *
143
+ * Use to read wall-clock time from the active Clock service with millisecond
144
+ * precision.
145
+ *
146
+ * **Example** (Reading milliseconds)
147
+ *
148
  * ```ts
149
  * import { Clock, Effect } from "effect"
150
  *
 
155
  * })
156
  * ```
157
  *
158
+ * @see {@link currentTimeNanos} for nanosecond precision
159
+ * @see {@link clockWith} for accessing the full Clock service
160
+ *
161
  * @category constructors
162
  * @since 2.0.0
163
  */
 
165
  /**
166
  * Returns an Effect that succeeds with the current time in nanoseconds.
167
  *
168
+ * **When to use**
169
+ *
170
+ * Use to read wall-clock time from the active `Clock` service with nanosecond
171
+ * precision.
172
+ *
173
+ * **Example** (Reading nanoseconds)
174
+ *
175
  * ```ts
176
  * import { Clock, Effect } from "effect"
177
  *
.opencode/node_modules/effect/dist/Clock.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Clock.d.ts","sourceRoot":"","sources":["../src/Clock.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,OAAO,KAAK,KAAK,OAAO,MAAM,cAAc,CAAA;AAC5C,OAAO,KAAK,KAAK,QAAQ,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAGzC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,KAAK;IACpB;;OAEG;IACH,uBAAuB,IAAI,MAAM,CAAA;IACjC;;OAEG;IACH,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC,MAAM,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AC1C;;;;;;;OAOG;IACH,sBAAsB,IAAI,MAAM,CAAA;IAChC;;;;;;OAMG;IACH,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;IACzC;;;;;;OAMG;IACH,KAAK,CAAC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA;CACjD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC,KAAK,CAAmB,CAAA;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAoB,CAAA;AAE7G;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,CAA4B,CAAA;AAEzE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,CAA2B,CAAA"}
.opencode/node_modules/effect/dist/Clock.js CHANGED
@@ -1,8 +1,14 @@
1
  import * as effect from "./internal/effect.js";
2
  /**
3
- * A reference to the current Clock service in the environment.
 
 
 
 
 
 
 
4
  *
5
- * @example
6
  * ```ts
7
  * import { Clock, Effect } from "effect"
8
  *
@@ -12,14 +18,24 @@ import * as effect from "./internal/effect.js";
12
  * })
13
  * ```
14
  *
 
 
 
 
15
  * @category references
16
- * @since 4.0.0
17
  */
18
  export const Clock = effect.ClockRef;
19
  /**
20
  * Accesses the current Clock service and uses it to run the provided function.
21
  *
22
- * @example
 
 
 
 
 
 
23
  * ```ts
24
  * import { Clock, Effect } from "effect"
25
  *
@@ -32,6 +48,9 @@ export const Clock = effect.ClockRef;
32
  * )
33
  * ```
34
  *
 
 
 
35
  * @category constructors
36
  * @since 2.0.0
37
  */
@@ -39,7 +58,13 @@ export const clockWith = effect.clockWith;
39
  /**
40
  * Returns an Effect that succeeds with the current time in milliseconds.
41
  *
42
- * @example
 
 
 
 
 
 
43
  * ```ts
44
  * import { Clock, Effect } from "effect"
45
  *
@@ -50,6 +75,9 @@ export const clockWith = effect.clockWith;
50
  * })
51
  * ```
52
  *
 
 
 
53
  * @category constructors
54
  * @since 2.0.0
55
  */
@@ -57,7 +85,13 @@ export const currentTimeMillis = effect.currentTimeMillis;
57
  /**
58
  * Returns an Effect that succeeds with the current time in nanoseconds.
59
  *
60
- * @example
 
 
 
 
 
 
61
  * ```ts
62
  * import { Clock, Effect } from "effect"
63
  *
 
1
  import * as effect from "./internal/effect.js";
2
  /**
3
+ * Context reference for the active time service in the environment.
4
+ *
5
+ * **When to use**
6
+ *
7
+ * Use when you need to access or provide the full time service, including sleep
8
+ * operations, rather than a single timestamp accessor.
9
+ *
10
+ * **Example** (Accessing the Clock service)
11
  *
 
12
  * ```ts
13
  * import { Clock, Effect } from "effect"
14
  *
 
18
  * })
19
  * ```
20
  *
21
+ * @see {@link clockWith} for using the current Clock service inside an effect
22
+ * @see {@link currentTimeMillis} for reading the current time in milliseconds
23
+ * @see {@link currentTimeNanos} for reading the current time in nanoseconds
24
+ *
25
  * @category references
26
+ * @since 2.0.0
27
  */
28
  export const Clock = effect.ClockRef;
29
  /**
30
  * Accesses the current Clock service and uses it to run the provided function.
31
  *
32
+ * **When to use**
33
+ *
34
+ * Use when you need the full Clock service interface to perform multiple time
35
+ * operations or call unsafe variants within a single effect.
36
+ *
37
+ * **Example** (Using the current Clock service)
38
+ *
39
  * ```ts
40
  * import { Clock, Effect } from "effect"
41
  *
 
48
  * )
49
  * ```
50
  *
51
+ * @see {@link Clock} for the service reference
52
+ * @see {@link currentTimeMillis} for convenience accessor that returns milliseconds
53
+ * @see {@link currentTimeNanos} for convenience accessor that returns nanoseconds
54
  * @category constructors
55
  * @since 2.0.0
56
  */
 
58
  /**
59
  * Returns an Effect that succeeds with the current time in milliseconds.
60
  *
61
+ * **When to use**
62
+ *
63
+ * Use to read wall-clock time from the active Clock service with millisecond
64
+ * precision.
65
+ *
66
+ * **Example** (Reading milliseconds)
67
+ *
68
  * ```ts
69
  * import { Clock, Effect } from "effect"
70
  *
 
75
  * })
76
  * ```
77
  *
78
+ * @see {@link currentTimeNanos} for nanosecond precision
79
+ * @see {@link clockWith} for accessing the full Clock service
80
+ *
81
  * @category constructors
82
  * @since 2.0.0
83
  */
 
85
  /**
86
  * Returns an Effect that succeeds with the current time in nanoseconds.
87
  *
88
+ * **When to use**
89
+ *
90
+ * Use to read wall-clock time from the active `Clock` service with nanosecond
91
+ * precision.
92
+ *
93
+ * **Example** (Reading nanoseconds)
94
+ *
95
  * ```ts
96
  * import { Clock, Effect } from "effect"
97
  *