mobx-keystone-mindreframer
Version:
A MobX powered state management solution based on data trees with first class support for Typescript, snapshots, patches and much more
23 lines (22 loc) • 718 B
TypeScript
import { Path } from "../parent/pathTypes";
/**
* A type checking error.
*/
export declare class TypeCheckError {
readonly path: Path;
readonly expectedTypeName: string;
readonly actualValue: any;
/**
* Creates an instance of TypeError.
* @param path Sub-path where the error occured.
* @param expectedTypeName Name of the expected type.
* @param actualValue Actual value.
*/
constructor(path: Path, expectedTypeName: string, actualValue: any);
/**
* Throws the type check error as an actual error.
*
* @param typeCheckedValue Usually the value where the type check was invoked.
*/
throw(typeCheckedValue: any): never;
}