@rbxts/rotype
Version:
Advanced runtime type checking library
15 lines (14 loc) • 532 B
TypeScript
export type IssueCode = "invalid_type" | "invalid_literal" | "invalid_union" | "too_small" | "too_big" | "not_multiple_of" | "not_integer" | "not_finite" | "empty" | "custom";
export type Path = Array<string | number>;
export interface Issue {
code: IssueCode;
message: string;
path: Path;
}
export declare class RoTypeError {
issues: Issue[];
name: string;
message: string;
constructor(issues: Issue[]);
}
export declare function issueInvalidType(expected: string, recieved: string, path: Path): Issue;