@nunofyobiz/effect-extras 2.1.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.md +2 -1
  2. package/dist/ArrayX.d.ts +0 -34
  3. package/dist/ArrayX.d.ts.map +1 -1
  4. package/dist/ArrayX.js +4 -58
  5. package/dist/ArrayX.js.map +1 -1
  6. package/dist/InclusiveOr.d.ts +1123 -0
  7. package/dist/InclusiveOr.d.ts.map +1 -0
  8. package/dist/InclusiveOr.js +1074 -0
  9. package/dist/InclusiveOr.js.map +1 -0
  10. package/dist/NonNullableX.d.ts.map +1 -1
  11. package/dist/NonNullableX.js +5 -0
  12. package/dist/NonNullableX.js.map +1 -1
  13. package/dist/OptionX.d.ts +8 -2
  14. package/dist/OptionX.d.ts.map +1 -1
  15. package/dist/OptionX.js +7 -1
  16. package/dist/OptionX.js.map +1 -1
  17. package/dist/PredicateX.d.ts +32 -0
  18. package/dist/PredicateX.d.ts.map +1 -1
  19. package/dist/PredicateX.js +38 -0
  20. package/dist/PredicateX.js.map +1 -1
  21. package/dist/RecordX.d.ts +128 -1
  22. package/dist/RecordX.d.ts.map +1 -1
  23. package/dist/RecordX.js +162 -1
  24. package/dist/RecordX.js.map +1 -1
  25. package/dist/StringX.d.ts +61 -0
  26. package/dist/StringX.d.ts.map +1 -1
  27. package/dist/StringX.js +68 -0
  28. package/dist/StringX.js.map +1 -1
  29. package/dist/WarnResult.d.ts +115 -70
  30. package/dist/WarnResult.d.ts.map +1 -1
  31. package/dist/WarnResult.js +141 -210
  32. package/dist/WarnResult.js.map +1 -1
  33. package/dist/index.d.ts +1 -0
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +1 -0
  36. package/dist/index.js.map +1 -1
  37. package/package.json +2 -2
  38. package/src/ArrayX.ts +4 -86
  39. package/src/InclusiveOr.ts +1255 -0
  40. package/src/NonNullableX.ts +5 -0
  41. package/src/OptionX.ts +8 -2
  42. package/src/PredicateX.ts +41 -0
  43. package/src/RecordX.ts +183 -1
  44. package/src/StringX.ts +113 -0
  45. package/src/WarnResult.ts +297 -227
  46. package/src/index.ts +1 -0
package/dist/StringX.d.ts CHANGED
@@ -67,4 +67,65 @@ export declare const surround: ((start: string, end: string) => (string_: string
67
67
  * @since 0.0.0
68
68
  */
69
69
  export declare const ensurePrepend: ((start: string) => (string_: string) => string) & ((string_: string, start: string) => string);
70
+ /**
71
+ * Replaces the inclusive line range `[startLine, endLine]` of `content` with
72
+ * `replacement` lines, returning the rejoined string.
73
+ *
74
+ * `content` is split on `\n`; the zero-based lines `startLine` through `endLine`
75
+ * (both inclusive) are dropped and `replacement` is spliced into their place.
76
+ * Pass an empty `replacement` to delete the range. Indices clamp naturally via
77
+ * `Array.take`/`Array.drop`, so out-of-range values don't throw.
78
+ *
79
+ * @example
80
+ * ```ts
81
+ * import { pipe } from "effect"
82
+ * import { StringX } from "@nunofyobiz/effect-extras"
83
+ *
84
+ * // data-first — replace lines 1..2 with a single line
85
+ * assert.deepStrictEqual(
86
+ * StringX.replaceLineRange("a\nb\nc\nd", 1, 2, ["X"]),
87
+ * "a\nX\nd",
88
+ * )
89
+ *
90
+ * // an empty replacement deletes the range
91
+ * assert.deepStrictEqual(StringX.replaceLineRange("a\nb\nc\nd", 1, 2, []), "a\nd")
92
+ *
93
+ * // data-last (piped)
94
+ * assert.deepStrictEqual(
95
+ * pipe("a\nb\nc", StringX.replaceLineRange(1, 1, ["X", "Y"])),
96
+ * "a\nX\nY\nc",
97
+ * )
98
+ * ```
99
+ *
100
+ * @category combinators
101
+ * @since 0.0.0
102
+ */
103
+ export declare const replaceLineRange: ((startLine: number, endLine: number, replacement: readonly string[]) => (content: string) => string) & ((content: string, startLine: number, endLine: number, replacement: readonly string[]) => string);
104
+ /**
105
+ * Inserts `lines` immediately before the line at `anchorIndex`, preserving the
106
+ * anchor line and everything after it; returns the rejoined string.
107
+ *
108
+ * `content` is split on `\n` and `lines` are spliced in just before the
109
+ * zero-based `anchorIndex`. An `anchorIndex` of `0` prepends, and one at or past
110
+ * the end appends.
111
+ *
112
+ * @example
113
+ * ```ts
114
+ * import { pipe } from "effect"
115
+ * import { StringX } from "@nunofyobiz/effect-extras"
116
+ *
117
+ * // data-first — insert before line 1, keeping the anchor and the rest
118
+ * assert.deepStrictEqual(StringX.insertBeforeLine("a\nb\nc", 1, ["X"]), "a\nX\nb\nc")
119
+ *
120
+ * // an anchor at the end appends
121
+ * assert.deepStrictEqual(StringX.insertBeforeLine("a\nb", 2, ["X"]), "a\nb\nX")
122
+ *
123
+ * // data-last (piped)
124
+ * assert.deepStrictEqual(pipe("a\nb", StringX.insertBeforeLine(0, ["X"])), "X\na\nb")
125
+ * ```
126
+ *
127
+ * @category combinators
128
+ * @since 0.0.0
129
+ */
130
+ export declare const insertBeforeLine: ((anchorIndex: number, lines: readonly string[]) => (content: string) => string) & ((content: string, anchorIndex: number, lines: readonly string[]) => string);
70
131
  //# sourceMappingURL=StringX.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StringX.d.ts","sourceRoot":"","sources":["../src/StringX.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,OAAO,WACV,MAAM,KAAK,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,eACpC,MAAM,SAAS,MAAM,KAAK,MAAM,CAC0B,CAAC;AAEvE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,QAAQ,WACX,MAAM,OAAO,MAAM,KAAK,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,eACjD,MAAM,SAAS,MAAM,OAAO,MAAM,KAAK,MAAM,CAKxD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,aAAa,WAChB,MAAM,KAAK,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,eACpC,MAAM,SAAS,MAAM,KAAK,MAAM,CAO1C,CAAC"}
1
+ {"version":3,"file":"StringX.d.ts","sourceRoot":"","sources":["../src/StringX.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,OAAO,WACV,MAAM,KAAK,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,eACpC,MAAM,SAAS,MAAM,KAAK,MAAM,CAC0B,CAAC;AAEvE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,QAAQ,WACX,MAAM,OAAO,MAAM,KAAK,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,eACjD,MAAM,SAAS,MAAM,OAAO,MAAM,KAAK,MAAM,CAKxD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,aAAa,WAChB,MAAM,KAAK,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,eACpC,MAAM,SAAS,MAAM,KAAK,MAAM,CAO1C,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,gBAAgB,eAEd,MAAM,WACR,MAAM,eACF,SAAS,MAAM,EAAE,KAC3B,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,eAErB,MAAM,aACJ,MAAM,WACR,MAAM,eACF,SAAS,MAAM,EAAE,KAC3B,MAAM,CAmBZ,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,gBAAgB,iBAEZ,MAAM,SACZ,SAAS,MAAM,EAAE,KACrB,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,eACtB,MAAM,eAAe,MAAM,SAAS,SAAS,MAAM,EAAE,KAAK,MAAM,CAc3E,CAAC"}
package/dist/StringX.js CHANGED
@@ -3,6 +3,7 @@
3
3
  *
4
4
  * @since 0.0.0
5
5
  */
6
+ import { Array } from "effect";
6
7
  import { dual } from "effect/Function";
7
8
  /**
8
9
  * Prepends `start` to `string_`.
@@ -78,4 +79,71 @@ export const ensurePrepend = /*#__PURE__*/dual(2, (string_, start) => {
78
79
  }
79
80
  return `${start}${string_}`;
80
81
  });
82
+ /**
83
+ * Replaces the inclusive line range `[startLine, endLine]` of `content` with
84
+ * `replacement` lines, returning the rejoined string.
85
+ *
86
+ * `content` is split on `\n`; the zero-based lines `startLine` through `endLine`
87
+ * (both inclusive) are dropped and `replacement` is spliced into their place.
88
+ * Pass an empty `replacement` to delete the range. Indices clamp naturally via
89
+ * `Array.take`/`Array.drop`, so out-of-range values don't throw.
90
+ *
91
+ * @example
92
+ * ```ts
93
+ * import { pipe } from "effect"
94
+ * import { StringX } from "@nunofyobiz/effect-extras"
95
+ *
96
+ * // data-first — replace lines 1..2 with a single line
97
+ * assert.deepStrictEqual(
98
+ * StringX.replaceLineRange("a\nb\nc\nd", 1, 2, ["X"]),
99
+ * "a\nX\nd",
100
+ * )
101
+ *
102
+ * // an empty replacement deletes the range
103
+ * assert.deepStrictEqual(StringX.replaceLineRange("a\nb\nc\nd", 1, 2, []), "a\nd")
104
+ *
105
+ * // data-last (piped)
106
+ * assert.deepStrictEqual(
107
+ * pipe("a\nb\nc", StringX.replaceLineRange(1, 1, ["X", "Y"])),
108
+ * "a\nX\nY\nc",
109
+ * )
110
+ * ```
111
+ *
112
+ * @category combinators
113
+ * @since 0.0.0
114
+ */
115
+ export const replaceLineRange = /*#__PURE__*/dual(4, (content, startLine, endLine, replacement) => {
116
+ const lines = content.split("\n");
117
+ return Array.join([...Array.take(lines, startLine), ...replacement, ...Array.drop(lines, endLine + 1)], "\n");
118
+ });
119
+ /**
120
+ * Inserts `lines` immediately before the line at `anchorIndex`, preserving the
121
+ * anchor line and everything after it; returns the rejoined string.
122
+ *
123
+ * `content` is split on `\n` and `lines` are spliced in just before the
124
+ * zero-based `anchorIndex`. An `anchorIndex` of `0` prepends, and one at or past
125
+ * the end appends.
126
+ *
127
+ * @example
128
+ * ```ts
129
+ * import { pipe } from "effect"
130
+ * import { StringX } from "@nunofyobiz/effect-extras"
131
+ *
132
+ * // data-first — insert before line 1, keeping the anchor and the rest
133
+ * assert.deepStrictEqual(StringX.insertBeforeLine("a\nb\nc", 1, ["X"]), "a\nX\nb\nc")
134
+ *
135
+ * // an anchor at the end appends
136
+ * assert.deepStrictEqual(StringX.insertBeforeLine("a\nb", 2, ["X"]), "a\nb\nX")
137
+ *
138
+ * // data-last (piped)
139
+ * assert.deepStrictEqual(pipe("a\nb", StringX.insertBeforeLine(0, ["X"])), "X\na\nb")
140
+ * ```
141
+ *
142
+ * @category combinators
143
+ * @since 0.0.0
144
+ */
145
+ export const insertBeforeLine = /*#__PURE__*/dual(3, (content, anchorIndex, lines) => {
146
+ const split = content.split("\n");
147
+ return Array.join([...Array.take(split, anchorIndex), ...lines, ...Array.drop(split, anchorIndex)], "\n");
148
+ });
81
149
  //# sourceMappingURL=StringX.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StringX.js","names":["dual","prepend","string_","start","surround","end","ensurePrepend","startsWith"],"sources":["../src/StringX.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;AAKA,SAASA,IAAI,QAAQ,iBAAiB;AAEtC;;;;;;;;;;;;;;;;;;;;;AAqBA,OAAO,MAAMC,OAAO,gBAAGD,IAAI,CAGzB,CAAC,EAAE,CAACE,OAAe,EAAEC,KAAa,KAAa,GAAGA,KAAK,GAAGD,OAAO,EAAE,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;AAoBA,OAAO,MAAME,QAAQ,gBAAGJ,IAAI,CAI1B,CAAC,EACD,CAACE,OAAe,EAAEC,KAAa,EAAEE,GAAW,KAC1C,GAAGF,KAAK,GAAGD,OAAO,GAAGG,GAAG,EAAE,CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,OAAO,MAAMC,aAAa,gBAAGN,IAAI,CAG/B,CAAC,EAAE,CAACE,OAAe,EAAEC,KAAa,KAAY;EAC9C,IAAID,OAAO,CAACK,UAAU,CAACJ,KAAK,CAAC,EAAE;IAC7B,OAAOD,OAAO;EAChB;EAEA,OAAO,GAAGC,KAAK,GAAGD,OAAO,EAAE;AAC7B,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"StringX.js","names":["Array","dual","prepend","string_","start","surround","end","ensurePrepend","startsWith","replaceLineRange","content","startLine","endLine","replacement","lines","split","join","take","drop","insertBeforeLine","anchorIndex"],"sources":["../src/StringX.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;AAKA,SAASA,KAAK,QAAQ,QAAQ;AAC9B,SAASC,IAAI,QAAQ,iBAAiB;AAEtC;;;;;;;;;;;;;;;;;;;;;AAqBA,OAAO,MAAMC,OAAO,gBAAGD,IAAI,CAGzB,CAAC,EAAE,CAACE,OAAe,EAAEC,KAAa,KAAa,GAAGA,KAAK,GAAGD,OAAO,EAAE,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;AAoBA,OAAO,MAAME,QAAQ,gBAAGJ,IAAI,CAI1B,CAAC,EACD,CAACE,OAAe,EAAEC,KAAa,EAAEE,GAAW,KAC1C,GAAGF,KAAK,GAAGD,OAAO,GAAGG,GAAG,EAAE,CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,OAAO,MAAMC,aAAa,gBAAGN,IAAI,CAG/B,CAAC,EAAE,CAACE,OAAe,EAAEC,KAAa,KAAY;EAC9C,IAAID,OAAO,CAACK,UAAU,CAACJ,KAAK,CAAC,EAAE;IAC7B,OAAOD,OAAO;EAChB;EAEA,OAAO,GAAGC,KAAK,GAAGD,OAAO,EAAE;AAC7B,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,OAAO,MAAMM,gBAAgB,gBAAGR,IAAI,CAalC,CAAC,EACD,CACES,OAAe,EACfC,SAAiB,EACjBC,OAAe,EACfC,WAA8B,KACpB;EACV,MAAMC,KAAK,GAAGJ,OAAO,CAACK,KAAK,CAAC,IAAI,CAAC;EACjC,OAAOf,KAAK,CAACgB,IAAI,CACf,CACE,GAAGhB,KAAK,CAACiB,IAAI,CAACH,KAAK,EAAEH,SAAS,CAAC,EAC/B,GAAGE,WAAW,EACd,GAAGb,KAAK,CAACkB,IAAI,CAACJ,KAAK,EAAEF,OAAO,GAAG,CAAC,CAAC,CAClC,EACD,IAAI,CACL;AACH,CAAC,CACF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,OAAO,MAAMO,gBAAgB,gBAAGlB,IAAI,CAOlC,CAAC,EACD,CAACS,OAAe,EAAEU,WAAmB,EAAEN,KAAwB,KAAY;EACzE,MAAMC,KAAK,GAAGL,OAAO,CAACK,KAAK,CAAC,IAAI,CAAC;EACjC,OAAOf,KAAK,CAACgB,IAAI,CACf,CACE,GAAGhB,KAAK,CAACiB,IAAI,CAACF,KAAK,EAAEK,WAAW,CAAC,EACjC,GAAGN,KAAK,EACR,GAAGd,KAAK,CAACkB,IAAI,CAACH,KAAK,EAAEK,WAAW,CAAC,CAClC,EACD,IAAI,CACL;AACH,CAAC,CACF","ignoreList":[]}
@@ -21,7 +21,7 @@ import { Data, Effect, Option } from "effect";
21
21
  * ```ts
22
22
  * import { WarnResult } from "@nunofyobiz/effect-extras"
23
23
  *
24
- * const both: WarnResult.WarnResult<string, number> =
24
+ * const both: WarnResult.WarnResult<number, string> =
25
25
  * WarnResult.SuccessWithWarnings({
26
26
  * warnings: "rounded down",
27
27
  * success: 1
@@ -33,7 +33,7 @@ import { Data, Effect, Option } from "effect";
33
33
  * @category models
34
34
  * @since 0.0.0
35
35
  */
36
- export type WarnResult<W, A> = Data.TaggedEnum<{
36
+ export type WarnResult<A, W> = Data.TaggedEnum<{
37
37
  WarningsOnly: {
38
38
  readonly warnings: W;
39
39
  };
@@ -63,7 +63,7 @@ export type WarnResult<W, A> = Data.TaggedEnum<{
63
63
  * @category models
64
64
  * @since 0.0.0
65
65
  */
66
- export type WarningsOnly<W> = WarnResult<W, never> & {
66
+ export type WarningsOnly<W> = WarnResult<never, W> & {
67
67
  _tag: "WarningsOnly";
68
68
  };
69
69
  /**
@@ -84,7 +84,7 @@ export type WarningsOnly<W> = WarnResult<W, never> & {
84
84
  * @category models
85
85
  * @since 0.0.0
86
86
  */
87
- export type SuccessOnly<A> = WarnResult<never, A> & {
87
+ export type SuccessOnly<A> = WarnResult<A, never> & {
88
88
  _tag: "SuccessOnly";
89
89
  };
90
90
  /**
@@ -95,7 +95,7 @@ export type SuccessOnly<A> = WarnResult<never, A> & {
95
95
  * ```ts
96
96
  * import { WarnResult } from "@nunofyobiz/effect-extras"
97
97
  *
98
- * const value: WarnResult.SuccessWithWarnings<string, number> =
98
+ * const value: WarnResult.SuccessWithWarnings<number, string> =
99
99
  * WarnResult.SuccessWithWarnings({
100
100
  * warnings: "rounded down",
101
101
  * success: 1
@@ -111,7 +111,7 @@ export type SuccessOnly<A> = WarnResult<never, A> & {
111
111
  * @category models
112
112
  * @since 0.0.0
113
113
  */
114
- export type SuccessWithWarnings<W, A> = WarnResult<W, A> & {
114
+ export type SuccessWithWarnings<A, W> = WarnResult<A, W> & {
115
115
  _tag: "SuccessWithWarnings";
116
116
  };
117
117
  /**
@@ -122,7 +122,7 @@ export type SuccessWithWarnings<W, A> = WarnResult<W, A> & {
122
122
  * ```ts
123
123
  * import { WarnResult } from "@nunofyobiz/effect-extras"
124
124
  *
125
- * const value: WarnResult.WithWarnings<string, number> = WarnResult.WarningsOnly({
125
+ * const value: WarnResult.WithWarnings<number, string> = WarnResult.WarningsOnly({
126
126
  * warnings: "skipped 2 rows"
127
127
  * })
128
128
  *
@@ -132,7 +132,7 @@ export type SuccessWithWarnings<W, A> = WarnResult<W, A> & {
132
132
  * @category models
133
133
  * @since 0.0.0
134
134
  */
135
- export type WithWarnings<W, A> = WarningsOnly<W> | SuccessWithWarnings<W, A>;
135
+ export type WithWarnings<A, W> = WarningsOnly<W> | SuccessWithWarnings<A, W>;
136
136
  /**
137
137
  * Any `WarnResult` that is guaranteed to carry a `success` value — either
138
138
  * `SuccessOnly` or `SuccessWithWarnings`.
@@ -141,7 +141,7 @@ export type WithWarnings<W, A> = WarningsOnly<W> | SuccessWithWarnings<W, A>;
141
141
  * ```ts
142
142
  * import { WarnResult } from "@nunofyobiz/effect-extras"
143
143
  *
144
- * const value: WarnResult.WithSuccess<string, number> = WarnResult.SuccessOnly({
144
+ * const value: WarnResult.WithSuccess<number, string> = WarnResult.SuccessOnly({
145
145
  * success: 1
146
146
  * })
147
147
  *
@@ -151,7 +151,7 @@ export type WithWarnings<W, A> = WarningsOnly<W> | SuccessWithWarnings<W, A>;
151
151
  * @category models
152
152
  * @since 0.0.0
153
153
  */
154
- export type WithSuccess<W, A> = SuccessOnly<A> | SuccessWithWarnings<W, A>;
154
+ export type WithSuccess<A, W> = SuccessOnly<A> | SuccessWithWarnings<A, W>;
155
155
  /**
156
156
  * Constructs a `WarningsOnly` — a `WarnResult` that carries only `warnings`.
157
157
  *
@@ -169,10 +169,10 @@ export type WithSuccess<W, A> = SuccessOnly<A> | SuccessWithWarnings<W, A>;
169
169
  * @since 0.0.0
170
170
  */
171
171
  export declare const WarningsOnly: <A, B>(args: {
172
- readonly warnings: A;
172
+ readonly warnings: B;
173
173
  }) => {
174
174
  readonly _tag: "WarningsOnly";
175
- readonly warnings: A;
175
+ readonly warnings: B;
176
176
  };
177
177
  /**
178
178
  * Constructs a `SuccessOnly` — a `WarnResult` that carries only a `success` value.
@@ -191,10 +191,10 @@ export declare const WarningsOnly: <A, B>(args: {
191
191
  * @since 0.0.0
192
192
  */
193
193
  export declare const SuccessOnly: <A, B>(args: {
194
- readonly success: B;
194
+ readonly success: A;
195
195
  }) => {
196
196
  readonly _tag: "SuccessOnly";
197
- readonly success: B;
197
+ readonly success: A;
198
198
  };
199
199
  /**
200
200
  * Constructs a `SuccessWithWarnings` — a `WarnResult` that carries both a
@@ -218,12 +218,12 @@ export declare const SuccessOnly: <A, B>(args: {
218
218
  * @since 0.0.0
219
219
  */
220
220
  export declare const SuccessWithWarnings: <A, B>(args: {
221
- readonly warnings: A;
222
- readonly success: B;
221
+ readonly warnings: B;
222
+ readonly success: A;
223
223
  }) => {
224
224
  readonly _tag: "SuccessWithWarnings";
225
- readonly warnings: A;
226
- readonly success: B;
225
+ readonly warnings: B;
226
+ readonly success: A;
227
227
  };
228
228
  /**
229
229
  * Builds per-tag refinements for `WarnResult`. `is("WarningsOnly")` is a type
@@ -307,52 +307,52 @@ export declare const match: {
307
307
  <A, B, C, D, Cases extends {
308
308
  readonly WarningsOnly: (args: {
309
309
  readonly _tag: "WarningsOnly";
310
- readonly warnings: A;
310
+ readonly warnings: B;
311
311
  }) => any;
312
312
  readonly SuccessOnly: (args: {
313
313
  readonly _tag: "SuccessOnly";
314
- readonly success: B;
314
+ readonly success: A;
315
315
  }) => any;
316
316
  readonly SuccessWithWarnings: (args: {
317
317
  readonly _tag: "SuccessWithWarnings";
318
- readonly warnings: A;
319
- readonly success: B;
318
+ readonly warnings: B;
319
+ readonly success: A;
320
320
  }) => any;
321
321
  }>(cases: Cases): (self: {
322
322
  readonly _tag: "WarningsOnly";
323
- readonly warnings: A;
323
+ readonly warnings: B;
324
324
  } | {
325
325
  readonly _tag: "SuccessOnly";
326
- readonly success: B;
326
+ readonly success: A;
327
327
  } | {
328
328
  readonly _tag: "SuccessWithWarnings";
329
- readonly warnings: A;
330
- readonly success: B;
329
+ readonly warnings: B;
330
+ readonly success: A;
331
331
  }) => import("effect/Unify").Unify<ReturnType<Cases["WarningsOnly" | "SuccessOnly" | "SuccessWithWarnings"]>>;
332
332
  <A, B, C, D, Cases extends {
333
333
  readonly WarningsOnly: (args: {
334
334
  readonly _tag: "WarningsOnly";
335
- readonly warnings: A;
335
+ readonly warnings: B;
336
336
  }) => any;
337
337
  readonly SuccessOnly: (args: {
338
338
  readonly _tag: "SuccessOnly";
339
- readonly success: B;
339
+ readonly success: A;
340
340
  }) => any;
341
341
  readonly SuccessWithWarnings: (args: {
342
342
  readonly _tag: "SuccessWithWarnings";
343
- readonly warnings: A;
344
- readonly success: B;
343
+ readonly warnings: B;
344
+ readonly success: A;
345
345
  }) => any;
346
346
  }>(self: {
347
347
  readonly _tag: "WarningsOnly";
348
- readonly warnings: A;
348
+ readonly warnings: B;
349
349
  } | {
350
350
  readonly _tag: "SuccessOnly";
351
- readonly success: B;
351
+ readonly success: A;
352
352
  } | {
353
353
  readonly _tag: "SuccessWithWarnings";
354
- readonly warnings: A;
355
- readonly success: B;
354
+ readonly warnings: B;
355
+ readonly success: A;
356
356
  }, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["WarningsOnly" | "SuccessOnly" | "SuccessWithWarnings"]>>;
357
357
  };
358
358
  /**
@@ -362,7 +362,7 @@ export declare const match: {
362
362
  * Use it when the `warnings` are mandatory and the `success` value is an optional
363
363
  * companion: pass an absent (`null`/`undefined`) `success` to get a
364
364
  * `WarningsOnly`, or a present one to get a `SuccessWithWarnings`. The return type
365
- * `WithWarnings<W, A>` reflects that `warnings` are always present.
365
+ * `WithWarnings<A, W>` reflects that `warnings` are always present.
366
366
  *
367
367
  * @example
368
368
  * ```ts
@@ -382,10 +382,10 @@ export declare const match: {
382
382
  * @category constructors
383
383
  * @since 0.0.0
384
384
  */
385
- export declare const WithWarnings: <W, A>({ warnings, success, }: {
385
+ export declare const WithWarnings: <A, W>({ warnings, success, }: {
386
386
  warnings: W;
387
387
  success?: A | undefined;
388
- }) => WithWarnings<W, A>;
388
+ }) => WithWarnings<A, W>;
389
389
  /**
390
390
  * Builds a `WarnResult` known to carry a `success` value, choosing
391
391
  * `SuccessWithWarnings` when `warnings` are present and `SuccessOnly` otherwise.
@@ -393,7 +393,7 @@ export declare const WithWarnings: <W, A>({ warnings, success, }: {
393
393
  * The mirror of `WithWarnings`: the `success` value is mandatory and the
394
394
  * `warnings` are an optional companion. Pass absent (`null`/`undefined`)
395
395
  * `warnings` to get a `SuccessOnly`, or present ones to get a
396
- * `SuccessWithWarnings`. The return type `WithSuccess<W, A>` reflects that a
396
+ * `SuccessWithWarnings`. The return type `WithSuccess<A, W>` reflects that a
397
397
  * `success` value is always present.
398
398
  *
399
399
  * @example
@@ -414,10 +414,10 @@ export declare const WithWarnings: <W, A>({ warnings, success, }: {
414
414
  * @category constructors
415
415
  * @since 0.0.0
416
416
  */
417
- export declare const WithSuccess: <W, A>({ warnings, success, }: {
417
+ export declare const WithSuccess: <A, W>({ warnings, success, }: {
418
418
  warnings?: W | undefined;
419
419
  success: A;
420
- }) => WithSuccess<W, A>;
420
+ }) => WithSuccess<A, W>;
421
421
  /**
422
422
  * Builds a `WarnResult` from a pair of possibly-nullish inputs, wrapping the
423
423
  * result in an `Option` so the all-absent case is expressible.
@@ -452,10 +452,10 @@ export declare const WithSuccess: <W, A>({ warnings, success, }: {
452
452
  * @category constructors
453
453
  * @since 0.0.0
454
454
  */
455
- export declare const optionFromNullables: <W, A>({ warnings, success, }: {
455
+ export declare const optionFromNullables: <A, W>({ warnings, success, }: {
456
456
  warnings?: W | null | undefined;
457
457
  success?: A | null | undefined;
458
- }) => Option.Option<WarnResult<W, A>>;
458
+ }) => Option.Option<WarnResult<A, W>>;
459
459
  /**
460
460
  * Builds a `WarnResult` from a pair of possibly-nullish inputs, falling back to
461
461
  * the `orElse` thunk when both are absent.
@@ -488,11 +488,11 @@ export declare const optionFromNullables: <W, A>({ warnings, success, }: {
488
488
  * @category constructors
489
489
  * @since 0.0.0
490
490
  */
491
- export declare const fromNullables: <W, A>({ warnings, success, orElse, }: {
491
+ export declare const fromNullables: <A, W>({ warnings, success, orElse, }: {
492
492
  warnings?: W | null | undefined;
493
493
  success?: A | null | undefined;
494
- orElse?: () => WarnResult<W, A>;
495
- }) => WarnResult<W, A>;
494
+ orElse?: () => WarnResult<A, W>;
495
+ }) => WarnResult<A, W>;
496
496
  /**
497
497
  * Folds a `WarnResult` from the warnings' perspective, collapsing the three tags
498
498
  * into two handlers.
@@ -528,10 +528,10 @@ export declare const fromNullables: <W, A>({ warnings, success, orElse, }: {
528
528
  * @category pattern matching
529
529
  * @since 0.0.0
530
530
  */
531
- export declare const matchWarnings: <W, A, Z>({ Warnings, SuccessOnly, }: {
531
+ export declare const matchWarnings: <A, W, Z>({ Warnings, SuccessOnly, }: {
532
532
  Warnings: (warnings: W) => Z;
533
533
  SuccessOnly: (success: A) => Z;
534
- }) => (warnResult: WarnResult<W, A>) => Z;
534
+ }) => (warnResult: WarnResult<A, W>) => Z;
535
535
  /**
536
536
  * Folds a `WarnResult` from the success value's perspective, collapsing the three
537
537
  * tags into two handlers.
@@ -568,10 +568,10 @@ export declare const matchWarnings: <W, A, Z>({ Warnings, SuccessOnly, }: {
568
568
  * @category pattern matching
569
569
  * @since 0.0.0
570
570
  */
571
- export declare const matchSuccess: <W, A, Z>({ WarningsOnly, Success, }: {
571
+ export declare const matchSuccess: <A, W, Z>({ WarningsOnly, Success, }: {
572
572
  WarningsOnly: (warnings: W) => Z;
573
573
  Success: (success: A) => Z;
574
- }) => (warnResult: WarnResult<W, A>) => Z;
574
+ }) => (warnResult: WarnResult<A, W>) => Z;
575
575
  /**
576
576
  * Completes a `WarnResult` into a guaranteed `SuccessWithWarnings` by filling
577
577
  * whichever side is missing from the matching `orElse` thunk.
@@ -603,10 +603,10 @@ export declare const matchSuccess: <W, A, Z>({ WarningsOnly, Success, }: {
603
603
  * @category getters
604
604
  * @since 0.0.0
605
605
  */
606
- export declare const orElse: <W2, A2>({ orElseWarnings, orElseSuccess, }: {
606
+ export declare const orElse: <A2, W2>({ orElseWarnings, orElseSuccess, }: {
607
607
  orElseWarnings: () => W2;
608
608
  orElseSuccess: () => A2;
609
- }) => (<W, A>(warnResult: WarnResult<W, A>) => SuccessWithWarnings<W | W2, A | A2>);
609
+ }) => (<A, W>(warnResult: WarnResult<A, W>) => SuccessWithWarnings<A | A2, W | W2>);
610
610
  /**
611
611
  * Completes a `WarnResult` into a `SuccessWithWarnings` whose missing side is
612
612
  * filled with `undefined`.
@@ -633,7 +633,7 @@ export declare const orElse: <W2, A2>({ orElseWarnings, orElseSuccess, }: {
633
633
  * @category getters
634
634
  * @since 0.0.0
635
635
  */
636
- export declare const orUndefined: <W, A>(warnResult: {
636
+ export declare const orUndefined: <A, W>(warnResult: {
637
637
  readonly _tag: "WarningsOnly";
638
638
  readonly warnings: W;
639
639
  } | {
@@ -681,7 +681,7 @@ export declare const orUndefined: <W, A>(warnResult: {
681
681
  * @category getters
682
682
  * @since 0.0.0
683
683
  */
684
- export declare const warningsOrElse: <Z>(orElseReturn: () => Z) => <W, A>(warnResult: WarnResult<W, A>) => W | Z;
684
+ export declare const warningsOrElse: <Z>(orElseReturn: () => Z) => <A, W>(warnResult: WarnResult<A, W>) => W | Z;
685
685
  /**
686
686
  * Extracts the `warnings` of a `WarnResult`, returning `undefined` when no
687
687
  * `warnings` are present.
@@ -707,7 +707,7 @@ export declare const warningsOrElse: <Z>(orElseReturn: () => Z) => <W, A>(warnRe
707
707
  * @category getters
708
708
  * @since 0.0.0
709
709
  */
710
- export declare const warningsOrUndefined: <W, A>(warnResult: {
710
+ export declare const warningsOrUndefined: <A, W>(warnResult: {
711
711
  readonly _tag: "WarningsOnly";
712
712
  readonly warnings: W;
713
713
  } | {
@@ -744,7 +744,7 @@ export declare const warningsOrUndefined: <W, A>(warnResult: {
744
744
  * @category getters
745
745
  * @since 0.0.0
746
746
  */
747
- export declare const successOrElse: <Z>(orElseReturn: () => Z) => <W, A>(warnResult: WarnResult<W, A>) => A | Z;
747
+ export declare const successOrElse: <Z>(orElseReturn: () => Z) => <A, W>(warnResult: WarnResult<A, W>) => A | Z;
748
748
  /**
749
749
  * Extracts the `success` value of a `WarnResult`, returning `undefined` when no
750
750
  * `success` value is present.
@@ -770,7 +770,7 @@ export declare const successOrElse: <Z>(orElseReturn: () => Z) => <W, A>(warnRes
770
770
  * @category getters
771
771
  * @since 0.0.0
772
772
  */
773
- export declare const successOrUndefined: <W, A>(warnResult: {
773
+ export declare const successOrUndefined: <A, W>(warnResult: {
774
774
  readonly _tag: "WarningsOnly";
775
775
  readonly warnings: W;
776
776
  } | {
@@ -806,7 +806,7 @@ export declare const successOrUndefined: <W, A>(warnResult: {
806
806
  * @category getters
807
807
  * @since 0.0.0
808
808
  */
809
- export declare const successOption: <W, A>(warnResult: WarnResult<W, A>) => Option.Option<A>;
809
+ export declare const successOption: <A, W>(warnResult: WarnResult<A, W>) => Option.Option<A>;
810
810
  /**
811
811
  * Extracts the `warnings` of a `WarnResult` as an `Option`.
812
812
  *
@@ -831,7 +831,7 @@ export declare const successOption: <W, A>(warnResult: WarnResult<W, A>) => Opti
831
831
  * @category getters
832
832
  * @since 0.0.0
833
833
  */
834
- export declare const warningsOption: <W, A>(warnResult: WarnResult<W, A>) => Option.Option<W>;
834
+ export declare const warningsOption: <A, W>(warnResult: WarnResult<A, W>) => Option.Option<W>;
835
835
  /**
836
836
  * Transforms both sides of a `WarnResult`, applying `mapWarnings` to any
837
837
  * `warnings` and `mapSuccess` to any `success` value.
@@ -863,10 +863,10 @@ export declare const warningsOption: <W, A>(warnResult: WarnResult<W, A>) => Opt
863
863
  * @category mapping
864
864
  * @since 0.0.0
865
865
  */
866
- export declare const mapBoth: <W1, A1, W2, A2>({ mapWarnings, mapSuccess, }: {
866
+ export declare const mapBoth: <A1, W1, A2, W2>({ mapWarnings, mapSuccess, }: {
867
867
  mapWarnings: (warnings: W1) => W2;
868
868
  mapSuccess: (success: A1) => A2;
869
- }) => ((warnResult: WarnResult<W1, A1>) => WarnResult<W2, A2>);
869
+ }) => ((warnResult: WarnResult<A1, W1>) => WarnResult<A2, W2>);
870
870
  /**
871
871
  * Effectful `mapBoth`: transforms each present side through an `Effect`,
872
872
  * reassembling the results into a `WarnResult` inside an `Effect`.
@@ -897,10 +897,10 @@ export declare const mapBoth: <W1, A1, W2, A2>({ mapWarnings, mapSuccess, }: {
897
897
  * @category sequencing
898
898
  * @since 0.0.0
899
899
  */
900
- export declare const mapBothEffect: <W1, A1, W2, A2, EW, EA, RW, RA>({ mapWarnings, mapSuccess, }: {
900
+ export declare const mapBothEffect: <A1, W1, A2, W2, EA, EW, RA, RW>({ mapWarnings, mapSuccess, }: {
901
901
  mapWarnings: (warnings: W1) => Effect.Effect<W2, EW, RW>;
902
902
  mapSuccess: (success: A1) => Effect.Effect<A2, EA, RA>;
903
- }) => ((warnResult: WarnResult<W1, A1>) => Effect.Effect<WarnResult<W2, A2>, EW | EA, RW | RA>);
903
+ }) => ((warnResult: WarnResult<A1, W1>) => Effect.Effect<WarnResult<A2, W2>, EW | EA, RW | RA>);
904
904
  /**
905
905
  * Transforms the `warnings` of a `WarnResult`, leaving any `success` value
906
906
  * untouched.
@@ -930,7 +930,7 @@ export declare const mapBothEffect: <W1, A1, W2, A2, EW, EA, RW, RA>({ mapWarnin
930
930
  * @category mapping
931
931
  * @since 0.0.0
932
932
  */
933
- export declare const mapWarnings: <W1, W2>(mapWarnings: (warnings: W1) => W2) => (<A>(warnResult: WarnResult<W1, A>) => WarnResult<W2, A>);
933
+ export declare const mapWarnings: <W1, W2>(mapWarnings: (warnings: W1) => W2) => (<A>(warnResult: WarnResult<A, W1>) => WarnResult<A, W2>);
934
934
  /**
935
935
  * Chains the `warnings` of a `WarnResult` into a new `WarnResult`, flattening the
936
936
  * result.
@@ -963,7 +963,7 @@ export declare const mapWarnings: <W1, W2>(mapWarnings: (warnings: W1) => W2) =>
963
963
  * @category sequencing
964
964
  * @since 0.0.0
965
965
  */
966
- export declare const flatMapWarnings: <W1, W2, A2>(mapWarnings: (warnings: W1) => WarnResult<W2, A2>) => (<A1>(warnResult: WarnResult<W1, A1>) => WarnResult<W2, A1 | A2>);
966
+ export declare const flatMapWarnings: <A2, W1, W2>(mapWarnings: (warnings: W1) => WarnResult<A2, W2>) => (<A1>(warnResult: WarnResult<A1, W1>) => WarnResult<A1 | A2, W2>);
967
967
  /**
968
968
  * Effectful `mapWarnings`: transforms the `warnings` of a `WarnResult` through an
969
969
  * `Effect`, leaving any `success` value untouched.
@@ -992,7 +992,7 @@ export declare const flatMapWarnings: <W1, W2, A2>(mapWarnings: (warnings: W1) =
992
992
  * @category sequencing
993
993
  * @since 0.0.0
994
994
  */
995
- export declare const mapWarningsEffect: <W1, W2, EW, RW>(mapWarnings: (warnings: W1) => Effect.Effect<W2, EW, RW>) => (<A>(warnResult: WarnResult<W1, A>) => Effect.Effect<WarnResult<W2, A>, EW, RW>);
995
+ export declare const mapWarningsEffect: <W1, W2, EW, RW>(mapWarnings: (warnings: W1) => Effect.Effect<W2, EW, RW>) => (<A>(warnResult: WarnResult<A, W1>) => Effect.Effect<WarnResult<A, W2>, EW, RW>);
996
996
  /**
997
997
  * Effectful `flatMapWarnings`: chains the `warnings` of a `WarnResult` into an
998
998
  * `Effect` that yields a new `WarnResult`, flattening the result.
@@ -1024,7 +1024,7 @@ export declare const mapWarningsEffect: <W1, W2, EW, RW>(mapWarnings: (warnings:
1024
1024
  * @category sequencing
1025
1025
  * @since 0.0.0
1026
1026
  */
1027
- export declare const flatMapWarningsEffect: <W1, W2, A2, EW, RW>(mapWarnings: (warnings: W1) => Effect.Effect<WarnResult<W2, A2>, EW, RW>) => (<A1>(warnResult: WarnResult<W1, A1>) => Effect.Effect<WarnResult<W2, A1 | A2>, EW, RW>);
1027
+ export declare const flatMapWarningsEffect: <A2, W1, W2, EW, RW>(mapWarnings: (warnings: W1) => Effect.Effect<WarnResult<A2, W2>, EW, RW>) => (<A1>(warnResult: WarnResult<A1, W1>) => Effect.Effect<WarnResult<A1 | A2, W2>, EW, RW>);
1028
1028
  /**
1029
1029
  * Transforms the `success` value of a `WarnResult`, leaving any `warnings`
1030
1030
  * untouched.
@@ -1051,7 +1051,7 @@ export declare const flatMapWarningsEffect: <W1, W2, A2, EW, RW>(mapWarnings: (w
1051
1051
  * @category mapping
1052
1052
  * @since 0.0.0
1053
1053
  */
1054
- export declare const mapSuccess: <A1, A2>(mapSuccess: (success: A1) => A2) => (<W>(warnResult: WarnResult<W, A1>) => WarnResult<W, A2>);
1054
+ export declare const mapSuccess: <A1, A2>(mapSuccess: (success: A1) => A2) => (<W>(warnResult: WarnResult<A1, W>) => WarnResult<A2, W>);
1055
1055
  /**
1056
1056
  * Chains the `success` value of a `WarnResult` into a new `WarnResult`, flattening
1057
1057
  * the result.
@@ -1082,7 +1082,7 @@ export declare const mapSuccess: <A1, A2>(mapSuccess: (success: A1) => A2) => (<
1082
1082
  * @category sequencing
1083
1083
  * @since 0.0.0
1084
1084
  */
1085
- export declare const flatMapSuccess: <W2, A1, A2>(mapSuccess: (success: A1) => WarnResult<W2, A2>) => (<W1>(warnResult: WarnResult<W1, A1>) => WarnResult<W1 | W2, A2>);
1085
+ export declare const flatMapSuccess: <A1, A2, W2>(mapSuccess: (success: A1) => WarnResult<A2, W2>) => (<W1>(warnResult: WarnResult<A1, W1>) => WarnResult<A2, W1 | W2>);
1086
1086
  /**
1087
1087
  * Effectful `mapSuccess`: transforms the `success` value of a `WarnResult` through
1088
1088
  * an `Effect`, leaving any `warnings` untouched.
@@ -1111,7 +1111,7 @@ export declare const flatMapSuccess: <W2, A1, A2>(mapSuccess: (success: A1) => W
1111
1111
  * @category sequencing
1112
1112
  * @since 0.0.0
1113
1113
  */
1114
- export declare const mapSuccessEffect: <A1, A2, EA, RA>(mapSuccess: (success: A1) => Effect.Effect<A2, EA, RA>) => (<W>(warnResult: WarnResult<W, A1>) => Effect.Effect<WarnResult<W, A2>, EA, RA>);
1114
+ export declare const mapSuccessEffect: <A1, A2, EA, RA>(mapSuccess: (success: A1) => Effect.Effect<A2, EA, RA>) => (<W>(warnResult: WarnResult<A1, W>) => Effect.Effect<WarnResult<A2, W>, EA, RA>);
1115
1115
  /**
1116
1116
  * Effectful `flatMapSuccess`: chains the `success` value of a `WarnResult` into an
1117
1117
  * `Effect` that yields a new `WarnResult`, flattening the result.
@@ -1142,5 +1142,50 @@ export declare const mapSuccessEffect: <A1, A2, EA, RA>(mapSuccess: (success: A1
1142
1142
  * @category sequencing
1143
1143
  * @since 0.0.0
1144
1144
  */
1145
- export declare const flatMapSuccessEffect: <W2, A1, A2, EA, RA>(mapSuccess: (success: A1) => Effect.Effect<WarnResult<W2, A2>, EA, RA>) => (<W1>(warnResult: WarnResult<W1, A1>) => Effect.Effect<WarnResult<W1 | W2, A2>, EA, RA>);
1145
+ export declare const flatMapSuccessEffect: <A1, A2, W2, EA, RA>(mapSuccess: (success: A1) => Effect.Effect<WarnResult<A2, W2>, EA, RA>) => (<W1>(warnResult: WarnResult<A1, W1>) => Effect.Effect<WarnResult<A2, W1 | W2>, EA, RA>);
1146
+ /**
1147
+ * Zips two arrays into one, calling `f` with a `WarnResult` for each index so
1148
+ * that length mismatches are handled explicitly rather than truncated.
1149
+ *
1150
+ * Unlike `Array.zipWith` (which stops at the shorter array), this walks to the
1151
+ * length of the *longer* array. The first array's element fills the `warnings`
1152
+ * side and the second array's element fills the `success` side, so at each index
1153
+ * `f` receives a `WarnResult.WarnResult<B, A>`: `SuccessWithWarnings` when both
1154
+ * arrays have an element, `WarningsOnly` when only the first does, and
1155
+ * `SuccessOnly` when only the second does. Use it when the "extra" tail of either
1156
+ * array still carries meaning.
1157
+ *
1158
+ * @example
1159
+ * ```ts
1160
+ * import { WarnResult } from "@nunofyobiz/effect-extras"
1161
+ * import { pipe } from "effect"
1162
+ *
1163
+ * const describe = WarnResult.match({
1164
+ * WarningsOnly: ({ warnings }) => `warnings ${warnings}`,
1165
+ * SuccessOnly: ({ success }) => `success ${success}`,
1166
+ * SuccessWithWarnings: ({ warnings, success }) => `both ${warnings}/${success}`
1167
+ * })
1168
+ *
1169
+ * // data-first
1170
+ * assert.deepStrictEqual(WarnResult.zip([1, 2, 3], [10, 20], describe), [
1171
+ * "both 1/10",
1172
+ * "both 2/20",
1173
+ * "warnings 3"
1174
+ * ])
1175
+ *
1176
+ * // data-last (pipeable)
1177
+ * assert.deepStrictEqual(pipe([1, 2, 3], WarnResult.zip([10, 20], describe)), [
1178
+ * "both 1/10",
1179
+ * "both 2/20",
1180
+ * "warnings 3"
1181
+ * ])
1182
+ * ```
1183
+ *
1184
+ * @category combinators
1185
+ * @since 0.0.0
1186
+ */
1187
+ export declare const zip: {
1188
+ <A, B, C>(array2: readonly B[], f: (warnResult: WarnResult<B, A>) => C): (array1: readonly A[]) => C[];
1189
+ <A, B, C>(array1: readonly A[], array2: readonly B[], f: (warnResult: WarnResult<B, A>) => C): C[];
1190
+ };
1146
1191
  //# sourceMappingURL=WarnResult.d.ts.map