diff --git a/lodash-webpack-plugin/index.d.ts b/lodash-webpack-plugin/index.d.ts new file mode 100644 index 0000000000..26d633e79f --- /dev/null +++ b/lodash-webpack-plugin/index.d.ts @@ -0,0 +1,34 @@ +// Type definitions for lodash-webpack-plugin 0.11 +// Project: https://github.com/lodash/lodash-webpack-plugin#readme +// Definitions by: Benjamin Lim +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { Plugin, Webpack } from 'webpack'; + +export = LodashModuleReplacementPlugin; + +declare class LodashModuleReplacementPlugin implements Plugin { + constructor(options?: LodashModuleReplacementPlugin.Options); + apply(thisArg: Webpack, ...args: any[]): void; +} + +declare namespace LodashModuleReplacementPlugin { + export interface Options { + caching?: boolean; + chaining?: boolean; + cloning?: boolean; + coercions?: boolean; + collections?: boolean; + currying?: boolean; + deburring?: boolean; + exotics?: boolean; + flattening?: boolean; + guards?: boolean; + memoizing?: boolean; + metadata?: boolean; + paths?: boolean; + placeholders?: boolean; + shorthands?: boolean; + unicode?: boolean; + } +} diff --git a/lodash-webpack-plugin/lodash-webpack-plugin-tests.ts b/lodash-webpack-plugin/lodash-webpack-plugin-tests.ts new file mode 100644 index 0000000000..cd893f09f0 --- /dev/null +++ b/lodash-webpack-plugin/lodash-webpack-plugin-tests.ts @@ -0,0 +1,27 @@ +import * as LodashModuleReplacementPlugin from 'lodash-webpack-plugin' + +new LodashModuleReplacementPlugin() + +new LodashModuleReplacementPlugin({ + collections: true, + paths: true, +}) + +new LodashModuleReplacementPlugin({ + caching: true, + chaining: true, + cloning: true, + coercions: true, + collections: true, + currying: true, + deburring: true, + exotics: true, + flattening: true, + guards: true, + memoizing: true, + metadata: true, + paths: true, + placeholders: true, + shorthands: true, + unicode: true, +}) diff --git a/lodash-webpack-plugin/tsconfig.json b/lodash-webpack-plugin/tsconfig.json new file mode 100644 index 0000000000..03e491ef78 --- /dev/null +++ b/lodash-webpack-plugin/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "lodash-webpack-plugin-tests.ts" + ] +} diff --git a/lodash-webpack-plugin/tslint.json b/lodash-webpack-plugin/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/lodash-webpack-plugin/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" }