Skip to main content
Module

x/domain_functions/src/index.ts>cf.all

Decouple your business logic from your framework. With first-class type inference from end to end.
Go to Latest
function cf.all
import { cf } from "https://deno.land/x/domain_functions@v2.6.0/src/index.ts";
const { all } = cf;

Creates a single function out of multiple Composables. It will pass the same input to each provided function. The functions will run in parallel. If all constituent functions are successful, The data field will be a tuple containing each function's output.

Examples

import { cf as C } from 'domain-functions'

const a = C.composable((id: number) => id + 1) const b = C.composable(String) const c = C.composable(Boolean) const cf = C.all(a, b, c) // ^? Composable<(id: number) => [string, number, boolean]>

Parameters

...fns: T & AllArguments<T>