@types/meteor-mdg-validation-error
TypeScript icon, indicating that this package has built-in type declarations

0.5.4 • Public • Published

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

Credits

These definitions were written by ToastHawaii.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/meteor-mdg-validation-error

Weekly Downloads

11

Version

0.5.4

License

MIT

Unpacked Size

4.87 kB

Total Files

5

Last publish

Collaborators

  • types