| 1864 | // === all |
| 1865 | |
| 1866 | const allResolveInput = ( |
| 1867 | input: Iterable<Effect.Effect<any, any, any>> | Record<string, Effect.Effect<any, any, any>> |
| 1868 | ): [Iterable<Effect.Effect<any, any, any>>, Option.Option<(as: ReadonlyArray<any>) => any>] => { |
| 1869 | if (Array.isArray(input) || Predicate.isIterable(input)) { |
| 1870 | return [input, Option.none()] |
| 1871 | } |
| 1872 | const keys = Object.keys(input) |
| 1873 | const size = keys.length |
| 1874 | return [ |
| 1875 | keys.map((k) => input[k]), |
| 1876 | Option.some((values: ReadonlyArray<any>) => { |
| 1877 | const res = {} |
| 1878 | for (let i = 0; i < size; i++) { |
| 1879 | ;(res as any)[keys[i]] = values[i] |
| 1880 | } |
| 1881 | return res |
| 1882 | }) |
| 1883 | ] |
| 1884 | } |
| 1885 | |
| 1886 | const allValidate = ( |
| 1887 | effects: Iterable<Effect.Effect<any, any, any>>, |