mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-28 16:45:10 +08:00
Merge pull request #26163 from afshawnlotfi/ajv-errors
Type Defentions for Ajv-Errors
This commit is contained in:
5
types/ajv-errors/ajv-errors-tests.ts
Normal file
5
types/ajv-errors/ajv-errors-tests.ts
Normal 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
18
types/ajv-errors/index.d.ts
vendored
Normal 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;
|
||||
23
types/ajv-errors/tsconfig.json
Normal file
23
types/ajv-errors/tsconfig.json
Normal 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"
|
||||
]
|
||||
}
|
||||
1
types/ajv-errors/tslint.json
Normal file
1
types/ajv-errors/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user