UNPKG

@modern-js/plugin

Version:

A Progressive React Framework for modern web development.

12 lines (11 loc) 558 B
/** * modified from https://github.com/farrow-js/farrow/tree/master/packages/farrow-pipeline * license at https://github.com/farrow-js/farrow/blob/master/LICENSE */ export type Next<I = unknown, O = unknown> = (input?: I) => O; export type CounterCallback<I = unknown, O = unknown> = (index: number, input: I, next: Next<I, O>) => O; export type Counter<I = unknown, O = unknown> = { start: (input: I) => O; dispatch: (index: number, input: I) => O; }; export declare const createCounter: <I, O>(callback: CounterCallback<I, O>) => Counter<I, O>;