Typings for schema-utils (#36656)

This commit is contained in:
Dmitry Guketlev 2019-07-11 02:19:46 +03:00 committed by Armando Aguirre
parent ae6aa49a5f
commit 967abf43b6
4 changed files with 40 additions and 0 deletions

12
types/schema-utils/index.d.ts vendored Normal file
View File

@ -0,0 +1,12 @@
// Type definitions for schema-utils 1.0
// Project: https://github.com/webpack-contrib/schema-utils
// Definitions by: Dmitry Guketlev <https://github.com/yavanosta>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
declare function validate(
schema: object | string | boolean,
options: any,
name: string): true;
export = validate;

View File

@ -0,0 +1,4 @@
import validate = require('schema-utils');
validate('path/to/file.json', {loader: 'options'}, 'Demo loader');
validate({type: 'object'}, {loader: 'options'}, 'Demo loader');

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",
"schema-utils-tests.ts"
]
}

View File

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