import type { Result } from '../../libs/standard-result'; import type { ResolverSeedData } from './common'; import type { Direction, PipeableScopeWithPathToken } from './types.internal'; /** * Casts an unknown into a string. If it can't be json stringified, it just uses the unknown object's toString * * @param input * @return */ export declare const outputToString: (input: unknown) => string; /** * Normalizes string inputs into a direction * * @param input * @return */ export declare const getDirection: (input: string) => Direction; /** * Like a map, but it ignores the function's input and just returns input. Useful for logging. * * @param fn * @return */ export declare const tap: (fn: (input: T) => unknown) => (input: T) => T; /** * A useful debug function that uses tap and just adds the addition of a console log * * @param tag * @return */ export declare const tapLog: (tag: string) => (input: T) => T; /** * Like a map, but it ignores the function's input and just returns input. Adds a stringified console log. Useful for logging. * * @param tag * @param additionalData * @return */ export declare const tapLogJson: (tag: string, additionalData?: unknown) => (input: T) => T; /** * A tapLogJson that takes in an additional conditional function for logging out a statement * * @param tag * @param conditional * @param additionalData * @return */ export declare const conditionallyTapLogJson: (tag: string, conditional: () => boolean, additionalData?: unknown) => (input: T) => T; /** * String.prototype.replaceAll is pretty new so this is better for compatibility * * @param searchParam * @param replaceString * @return */ export declare const stringReplaceAll: (searchParam: RegExp | string, replaceString: string) => (targetString: string) => string; /** * Given a scope path and data, returns the correct scope from the data * * @param scopeWithPath * @param data * @return */ export declare const selectRootContext: (scopeWithPath: PipeableScopeWithPathToken, data: ResolverSeedData) => Result; /** * A shallow comparison to see if an object has changed * * @param fn * @return */ export declare const memoize: (fn: (...args: P) => T) => (...args: P) => T;