import type { Path as PathArray, PathItem } from 'pathington'; import type { CreateSelectorFunction, CreateSelectorOptions } from 'reselect'; import type { weakMapMemoize } from 'reselect'; import type { AnyFn, ComputeValue, ManualSelectInput, Path, PathObject, PathStructured, SelectStructuredInputs, StructuredValues, } from './internalTypes.d.cts'; /** * Whether the path is a functon */ export declare function isManualSelector( path: Path, ): path is ManualSelectInput; /** * Whether the path is an object. */ export declare function isObjectPath(path: any): path is PathObject; export declare function isPathItem(path: any): path is PathItem; /** * Create the identity selector function based on the path passed. If the path item is a function then it is used directly, * otherwise the function is created based on its type. */ export declare function createIdentitySelector(path: Path): (...args: any[]) => any; /** * Get the value at the deep location expected from the path. If no match is found, return `undefined`. */ export declare function getDeep(path: PathArray, state: State): any; /** * Get the creator function to use when generating the selector. */ export declare function getSelectorCreator({ argsMemoize, argsMemoizeOptions, devModeChecks, memoize, memoizeOptions, }: CreateSelectorOptions): CreateSelectorFunction; /** * Get a standard selector based on the paths and getComputedValue provided. */ export declare function getStandardSelector< const Params extends unknown[], const Paths extends Array>, GetComputedValue extends ComputeValue, >( paths: Paths, selectorCreator: CreateSelectorFunction, getComputedValue: GetComputedValue, ): ((state: any) => any) & { clearCache: () => void; resultsCount: () => number; resetResultsCount: () => void; } & { resultFunc: (...resultFuncArgs: any[]) => any; memoizedResultFunc: ((...resultFuncArgs: any[]) => any) & { clearCache: () => void; resultsCount: () => number; resetResultsCount: () => void; }; lastResult: () => any; dependencies: ((...args: any[]) => any)[]; recomputations: () => number; resetRecomputations: () => void; dependencyRecomputations: () => number; resetDependencyRecomputations: () => void; } & { argsMemoize: typeof weakMapMemoize; memoize: typeof weakMapMemoize; }; /** * Get the structured object based on the computed selector values. */ export declare function getStructuredObject(properties: string[]): AnyFn; /** * Get an object of property => selected value pairs based on paths. */ export declare function getStructuredSelector( paths: PathStructured, selectorCreator: CreateSelectorFunction, getComputedValue: AnyFn, ): ((state: any) => any) & { clearCache: () => void; resultsCount: () => number; resetResultsCount: () => void; } & { resultFunc: (...resultFuncArgs: any[]) => any; memoizedResultFunc: ((...resultFuncArgs: any[]) => any) & { clearCache: () => void; resultsCount: () => number; resetResultsCount: () => void; }; lastResult: () => any; dependencies: ((...args: any[]) => any)[]; recomputations: () => number; resetRecomputations: () => void; dependencyRecomputations: () => number; resetDependencyRecomputations: () => void; } & { argsMemoize: typeof weakMapMemoize; memoize: typeof weakMapMemoize; }; /** * Get an object of property => selected value pairs based on paths. */ export declare function getStructuredIdentitySelector< const Params extends unknown[], const Paths extends PathStructured, >(paths: Paths): (...values: StructuredValues) => SelectStructuredInputs;