import { Context, FunctionsTable, Primitive, StringPaths } from './evaluator'; import { Function, String, Object } from 'ts-toolbelt'; type GetPartType = V extends string ? 'string' : V extends number ? 'number' : V extends boolean ? 'boolean' : V extends Array ? GetPartType : never; interface ExpressionFunctionPart, K extends keyof F, CustomEvaluatorFuncRunOptions> { type: GetPartType[0]>; isArray: Function.Parameters[0] extends Array ? true : false; propertyPath: K; isFunction: true; } type ExpressionFunctionParts, Extra extends object, CustomEvaluatorFuncRunOptions> = { [K in keyof F]: ExpressionFunctionPart & Extra; }; interface ExpressionContextPart { type: GetPartType; isArray: false; propertyPath: P; isFunction: false; } type ExpressionContextParts = { [K in StringPaths]: Object.Path> extends Primitive ? ExpressionContextPart>, K> & Extra : never; }; export type ExpressionParts, Extra extends object, Ignore, CustomEvaluatorFuncRunOptions> = ExpressionFunctionParts & Object.Filter, never, 'equals'>; export {};