UNPKG

map-transform

Version:

Map and transform objects with mapping definitions

12 lines (11 loc) 1.18 kB
import type { Operation, TransformDefinition, TransformObject, Path, Pipeline, OperationObject, Options, DataMapperWithState, AsyncDataMapperWithState } from '../types.js'; export declare const isOperationType: <T extends OperationObject>(def: TransformObject | OperationObject, prop: string) => def is T; export declare const isPath: (def: unknown) => def is Path; export declare const isTransformObject: (def: unknown) => def is TransformObject; export declare const isPipeline: (def: unknown) => def is Pipeline; export declare const isOperation: (def: unknown) => def is Operation; export declare const isTransformDefinition: (def: unknown) => def is TransformDefinition; export declare const defToOperations: (def: TransformDefinition | undefined, options: Options) => Operation[] | Operation; export declare function defToOperation(def: TransformDefinition | undefined, options: Options): Operation; export declare function operationToDataMapper(operation: Operation, options: Options): DataMapperWithState | AsyncDataMapperWithState; export declare function defToDataMapper(def?: TransformDefinition, options?: Options): DataMapperWithState | AsyncDataMapperWithState;