import { Actions, Schema, StrictSchema } from './types'; export declare enum NodeKind { Root = "Root", Property = "Property", ActionFunction = "ActionFunction", ActionAggregator = "ActionAggregator", ActionString = "ActionString", ActionSelector = "ActionSelector" } declare type PreparedAction = (params: { object: any; items: any; objectToCompute: any; }) => any; interface SchemaNodeData { propertyName: string; action: Actions | null; preparedAction?: PreparedAction | null; kind: NodeKind; targetPropertyPath: string; } export interface SchemaNode { data: SchemaNodeData; parent: SchemaNode | null; children: SchemaNode[]; } declare type Overwrite = { [P in Exclude]: T1[P]; } & T2; declare type AddNode = Overwrite, { kind?: NodeKind; targetPropertyPath?: string; preparedAction?: (...args: any) => any; }>; export interface SchemaOptions { class?: { automapping: boolean; }; undefinedValues?: { strip: boolean; default?: (target: Target, propertyPath: string) => any; }; } /** * A utility function that allows defining a `StrictSchema` with extra-options e.g: how to handle `undefinedValues` * * @param {StrictSchema} schema * @param {SchemaOptions} [options] */ export declare function createSchema(schema: StrictSchema, options?: SchemaOptions): StrictSchema; export declare class MorphismSchemaTree { schemaOptions: SchemaOptions; root: SchemaNode; schema: Schema | StrictSchema | null; constructor(schema: Schema | StrictSchema | null); static getSchemaOptions(schema: Schema | StrictSchema | null): SchemaOptions; private parseSchema; traverseBFS(): IterableIterator>; add(data: AddNode, targetPropertyPath?: string): void; getActionKind(action: Actions | null): NodeKind.Property | NodeKind.ActionFunction | NodeKind.ActionAggregator | NodeKind.ActionString | NodeKind.ActionSelector | undefined; getPreparedAction(nodeData: SchemaNodeData): PreparedAction | null; } export {};