Skip to main content

Function: deterministic()

deterministic<TInput, TOutput>(processFn, name?): CallableDeterministic<TInput, TOutput, undefined>

Defined in: packages/core/src/deterministic.ts:541

Helper function to create a simple deterministic processor

Type Parameters

TInput

TInput = any

TOutput

TOutput = unknown

Parameters

processFn

(input, options?) => TOutput | Promise<TOutput>

name?

string

Returns

CallableDeterministic<TInput, TOutput, undefined>

Example

// Old API:
const fn = deterministic((x) => x * 2, 'doubler');

// New API:
const fn = processor((x) => x * 2, { name: 'doubler' });