Installation
npm install --save @types/meteor-mdg-validation-error
Summary
This package contains type definitions for meteor-mdg-validation-error (https://github.com/meteor/validation-error).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/meteor-mdg-validation-error.
index.d.ts
/// <reference types="meteor"/>
// eslint-disable-next-line @definitelytyped/no-single-declare-module
declare module "meteor/mdg:validation-error" {
interface ValidationErrorDetail {
name: string;
type: string;
[name: string]: any;
}
class ValidationError extends Meteor.Error {
/**
* @param errors The "details" property of the ValidationError must be an array of objects containing at least two properties. The "name" and "type" properties are required.
*/
constructor(errors: ValidationErrorDetail[], message?: string);
/** Static method checking if a given Meteor.Error is an instance of ValidationError. */
static is(err: any): err is ValidationError;
/** Universal validation error code to be use in applications and packages. */
static ERROR_CODE: string;
/** Default validation error message that can be changed globally. */
static DEFAULT_MESSAGE: string;
}
}
Additional Details
- Last updated: Tue, 07 Nov 2023 09:09:39 GMT
- Dependencies: @types/meteor, @types/node
Credits
These definitions were written by ToastHawaii.