Move all packages to a types directory

This commit is contained in:
Andy Hanson
2017-03-24 14:27:52 -07:00
parent f9869dc191
commit 354cec620d
13846 changed files with 0 additions and 0 deletions

27
types/webpack-validator/index.d.ts vendored Normal file
View File

@@ -0,0 +1,27 @@
// Type definitions for webpack-validator v2.2.6
// Project: https://github.com/js-dxtools/webpack-validator
// Definitions by: Simon Hartcher <https://github.com/deevus>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
///<reference types="webpack" />
declare module "webpack-validator" {
import {Configuration} from "webpack";
interface ValidationOptions {
"no-root-files-node-modules-nameclash"?: boolean;
"loader-enforce-include-or-exclude"?: boolean;
"loader-prefer-include"?: boolean;
}
/**
* Validate your webpack configs with joi
*/
function Validate(config: Configuration): Configuration;
/**
* Validate your webpack configs with joi
*/
function Validate(config: Configuration, options: ValidationOptions): Configuration;
export = Validate;
}

View File

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

View File

@@ -0,0 +1,15 @@
import {Configuration} from "webpack";
import validate = require("webpack-validator");
const a: Configuration = {
entry: "test"
}
const b = validate(a);
const c = validate(b, {
"no-root-files-node-modules-nameclash": true
});
const d = validate(b, {
"loader-enforce-include-or-exclude": false,
"loader-prefer-include": true
});