Merge pull request #26163 from afshawnlotfi/ajv-errors

Type Defentions for Ajv-Errors
This commit is contained in:
Benjamin Lichtman
2018-06-01 10:25:17 -07:00
committed by GitHub
4 changed files with 47 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
import * as Ajv from "ajv";
import AjvErrors = require("ajv-errors");
const ajv = new Ajv({allErrors: true, jsonPointers: true});
AjvErrors(ajv);

18
types/ajv-errors/index.d.ts vendored Normal file
View File

@@ -0,0 +1,18 @@
// Type definitions for ajv-errors 1.0
// Project: https://github.com/epoberezkin/ajv-errors
// Definitions by: Afshawn Lotfi <https://github.com/afshawnlotfi>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import { Ajv } from "ajv";
/**
*
* @param ajv Ajv Main Class
* https://github.com/epoberezkin/ajv
* @param options Optional options for Ajv Errors
* https://github.com/epoberezkin/ajv-errors#options
*
*/
export = AjvErrors;
declare function AjvErrors(ajv: Ajv, options?: {}): Ajv;

View File

@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"ajv-errors-tests.ts"
]
}

View File

@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }