import { ErrorObject } from "ajv"; import { JSONSchema } from "../types"; /** * Provides an error interface for handling when a function call has invalid parameters. */ export default class ParameterValidationError implements Error { paramIndex: number | string; expectedSchema: JSONSchema; receievedParam: any; name: string; message: string; /** * @param paramIndex The index of the param that for this error (index * of the param in MethodObject.params). * @param expectedSchema The expected JSON Schema for the passed in value. * @param receievedParam The value of the param passed to the method call. * @param errors The errors recieved by ajv */ constructor(paramIndex: number | string, expectedSchema: JSONSchema, receievedParam: any, errors: ErrorObject[]); }