@fjell/core
Version:
Core Item and Key Framework for Fjell
27 lines (26 loc) • 1.21 kB
TypeScript
/**
* Wrapper for allAction() operation
*
* Provides automatic validation for allAction() operation parameters.
*/
import { AllActionOperationMethod, Coordinate, Item } from "@fjell/types";
import type { WrapperOptions } from "./types";
/**
* Creates a wrapped allAction() method with automatic parameter validation.
*
* @param coordinate - The coordinate defining the item hierarchy
* @param implementation - The core logic for the operation
* @param options - Optional configuration
* @returns A fully validated allAction() method
*
* @example
* ```typescript
* const allAction = createAllActionWrapper(
* coordinate,
* async (action, params, locations) => {
* return await database.executeAllAction(action, params, locations);
* }
* );
* ```
*/
export declare function createAllActionWrapper<V extends Item<S, L1, L2, L3, L4, L5>, S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never>(coordinate: Coordinate<S, L1, L2, L3, L4, L5>, implementation: AllActionOperationMethod<V, S, L1, L2, L3, L4, L5>, options?: WrapperOptions): AllActionOperationMethod<V, S, L1, L2, L3, L4, L5>;