import { createValidateTextLengthFunction, createValidateArrayMaxSizeFunction } from './validation';
import { createSaveFlattenFunction } from './array';
import { evalCriteriaParseResult, parseCriteriaExpression } from './criteria';
import { coerceToString, coerceToNumber } from './coerceUtils';
export interface ModuleUtils {
    validateTextLength: ReturnType<typeof createValidateTextLengthFunction>;
    validateArrayMaxSize: ReturnType<typeof createValidateArrayMaxSizeFunction>;
    safeFlatten: ReturnType<typeof createSaveFlattenFunction>;
    validateCriteriaMaxLength: ReturnType<typeof createValidateTextLengthFunction>;
    evalCriteriaParseResult: typeof evalCriteriaParseResult;
    parseCriteriaExpression: typeof parseCriteriaExpression;
    coerceToNumber: typeof coerceToNumber;
    coerceToString: typeof coerceToString;
    coerceToStringWithValidation: (text: unknown, maxTextLengthOverride?: number) => string;
}
export interface IBaseCreateModuleOptions {
    defaultMaxTextLength: number;
    defaultMaxArraySize: number;
    defaultMaxCriteriaLength: number;
}
export declare function createModule<ReturnType>(callback: (utils: ModuleUtils, currentOptions: IBaseCreateModuleOptions) => ReturnType): (options?: Partial<IBaseCreateModuleOptions>) => ReturnType;
export declare function createModule<ModuleOptions, ReturnType>(callback: (utils: ModuleUtils, currentOptions: IBaseCreateModuleOptions & ModuleOptions) => ReturnType, defaultOptions: ModuleOptions & Partial<IBaseCreateModuleOptions>): (options?: Partial<IBaseCreateModuleOptions & ModuleOptions>) => ReturnType;
