path-value
Version:
Property path-to-value resolver, in TypeScript
24 lines (23 loc) • 728 B
TypeScript
import { IPathOptions, IPathResult } from './types';
/**
* Custom error type, thrown by `validateErrorCode`.
*/
export declare class PathError extends Error {
readonly chain: (string | number)[];
readonly code: number;
readonly codeName: string;
readonly options?: IPathOptions;
readonly idx: number;
readonly scope: any;
constructor(msg: string, res: IPathResult);
}
/**
* Custom error type, thrown by `validateExists`.
*/
export declare class PathExistError extends Error {
readonly chain: (string | number)[];
readonly propName: string | number;
readonly options?: IPathOptions;
readonly scope: any;
constructor(msg: string, res: IPathResult, propName: string | number);
}