UNPKG

@zedux/atoms

Version:

A Molecular State Engine for React

11 lines (10 loc) 474 B
import { PartialAtomInstance } from '../types/index.js'; export declare const createInjector: <A extends any[], T extends { cleanup?: (() => void) | undefined; result?: any; type: string; } | { cleanup?: (() => void) | undefined; result: any; type: string; }>(operation: string, first: (instance: PartialAtomInstance, ...args: A) => T, next?: ((prevDescriptor: T, instance: PartialAtomInstance, ...args: A) => T) | undefined) => (...args: A) => any;