| 1854 | // === all |
| 1855 | |
| 1856 | const allResolveInput = ( |
| 1857 | input: Iterable<Effect.Effect<any, any, any>> | Record<string, Effect.Effect<any, any, any>> |
| 1858 | ): [Iterable<Effect.Effect<any, any, any>>, Option.Option<(as: ReadonlyArray<any>) => any>] => { |
| 1859 | if (Array.isArray(input) || Predicate.isIterable(input)) { |
| 1860 | return [input, Option.none()] |
| 1861 | } |
| 1862 | const keys = Object.keys(input) |
| 1863 | const size = keys.length |
| 1864 | return [ |
| 1865 | keys.map((k) => input[k]), |
| 1866 | Option.some((values: ReadonlyArray<any>) => { |
| 1867 | const res = {} |
| 1868 | for (let i = 0; i < size; i++) { |
| 1869 | ;(res as any)[keys[i]] = values[i] |
| 1870 | } |
| 1871 | return res |
| 1872 | }) |
| 1873 | ] |
| 1874 | } |
| 1875 | |
| 1876 | const allValidate = ( |
| 1877 | effects: Iterable<Effect.Effect<any, any, any>>, |