@types/webpack
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -1,2 +0,2 @@ | ||
// Type definitions for webpack 2.0.0 | ||
// Type definitions for webpack 2.1 | ||
// Project: https://github.com/webpack/webpack | ||
@@ -7,4 +7,6 @@ // Definitions by: Qubo <https://github.com/tkqubo> | ||
/// <reference types="uglify-js" /> | ||
/// <reference types="tapable" /> | ||
import * as UglifyJS from 'uglify-js'; | ||
import * as tapable from 'tapable'; | ||
@@ -65,3 +67,3 @@ declare namespace webpack { | ||
/** Add additional plugins to the compiler. */ | ||
plugins?: (Plugin | Function)[]; | ||
plugins?: Plugin[]; | ||
/** Stats options for logging */ | ||
@@ -158,3 +160,88 @@ stats?: compiler.StatsToStringOptions; | ||
interface Resolve { | ||
interface NewResolve { | ||
/** | ||
* A list of directories to resolve modules from. | ||
* | ||
* Absolute paths will be searched once. | ||
* | ||
* If an entry is relative, will be resolved using node's resolution algorithm | ||
* relative to the requested file. | ||
* | ||
* Defaults to `["node_modules"]` | ||
*/ | ||
modules?: string[]; | ||
/** | ||
* A list of package description files to search for. | ||
* | ||
* Defaults to `["package.json"]` | ||
*/ | ||
descriptionFiles?: string[]; | ||
/** | ||
* A list of fields in a package description object to use for finding | ||
* the entry point. | ||
* | ||
* Defaults to `["browser", "module", "main"]` or `["module", "main"]`, | ||
* depending on the value of the `target` `Configuration` value. | ||
*/ | ||
mainFields?: string[]; | ||
/** | ||
* A list of fields in a package description object to try to parse | ||
* in the same format as the `alias` resolve option. | ||
* | ||
* Defaults to `["browser"]` or `[]`, depending on the value of the | ||
* `target` `Configuration` value. | ||
* | ||
* @see alias | ||
*/ | ||
aliasFields?: string[]; | ||
/** | ||
* A list of file names to search for when requiring directories that | ||
* don't contain a package description file. | ||
* | ||
* Defaults to `["index"]`. | ||
*/ | ||
mainFiles?: string[]; | ||
/** | ||
* A list of file extensions to try when requesting files. | ||
* | ||
* An empty string is considered invalid. | ||
*/ | ||
extensions?: string[]; | ||
/** | ||
* If true, requires that all requested paths must use an extension | ||
* from `extensions`. | ||
*/ | ||
enforceExtension?: boolean; | ||
/** | ||
* Replace the given module requests with other modules or paths. | ||
* | ||
* @see aliasFields | ||
*/ | ||
alias?: { [key: string]: string; }; | ||
/** | ||
* Whether to use a cache for resolving, or the specific object | ||
* to use for caching. Sharing objects may be useful when running | ||
* multiple webpack compilers. | ||
* | ||
* Defaults to `true`. | ||
*/ | ||
unsafeCache?: {} | boolean; | ||
/** | ||
* A function used to decide whether to cache the given resolve request. | ||
* | ||
* Defaults to `() => true`. | ||
*/ | ||
cachePredicate?: (data: { path: string, request: string }) => boolean; | ||
} | ||
interface OldResolve { | ||
/** Replace modules by other modules or paths. */ | ||
@@ -165,3 +252,6 @@ alias?: { [key: string]: string; }; | ||
* May also be an array of directories. | ||
* This setting should be used to add individual directories to the search path. */ | ||
* This setting should be used to add individual directories to the search path. | ||
* | ||
* @deprecated Replaced by `modules` in webpack 2. | ||
*/ | ||
root?: string | string[]; | ||
@@ -172,2 +262,4 @@ /** | ||
* For example, if the value is ["mydir"], webpack will look in “./mydir”, “../mydir”, “../../mydir”, etc. | ||
* | ||
* @deprecated Replaced by `modules` in webpack 2. | ||
*/ | ||
@@ -178,2 +270,4 @@ modulesDirectories?: string[]; | ||
* in which webpack should look for modules that weren’t found in resolve.root or resolve.modulesDirectories. | ||
* | ||
* @deprecated Replaced by `modules` in webpack 2. | ||
*/ | ||
@@ -186,6 +280,16 @@ fallback?: string | string[]; | ||
extensions?: string[]; | ||
/** Check these fields in the package.json for suitable files. */ | ||
/** | ||
* Check these fields in the package.json for suitable files. | ||
* | ||
* @deprecated Replaced by `mainFields` in webpack 2. | ||
*/ | ||
packageMains?: (string | string[])[]; | ||
/** Check this field in the package.json for an object. Key-value-pairs are threaded as aliasing according to this spec */ | ||
/** | ||
* Check this field in the package.json for an object. Key-value-pairs are threaded as aliasing according to this spec | ||
* | ||
* @deprecated Replaced by `aliasFields` in webpack 2. | ||
*/ | ||
packageAlias?: (string | string[])[]; | ||
/** | ||
@@ -195,2 +299,4 @@ * Enable aggressive but unsafe caching for the resolving of a part of your files. | ||
* If the resolved path matches, it’ll be cached. | ||
* | ||
* @deprecated Split into `unsafeCache` and `cachePredicate` in webpack 2. | ||
*/ | ||
@@ -200,7 +306,22 @@ unsafeCache?: RegExp | RegExp[] | boolean; | ||
interface ResolveLoader extends Resolve { | ||
/** It describes alternatives for the module name that are tried. */ | ||
type Resolve = OldResolve | NewResolve; | ||
interface OldResolveLoader extends OldResolve { | ||
/** It describes alternatives for the module name that are tried. | ||
* @deprecated Replaced by `moduleExtensions` in webpack 2. | ||
*/ | ||
moduleTemplates?: string[]; | ||
} | ||
interface NewResolveLoader extends NewResolve { | ||
/** | ||
* List of strings to append to a loader's name when trying to resolve it. | ||
*/ | ||
moduleExtensions?: string[]; | ||
enforceModuleExtension?: boolean; | ||
} | ||
type ResolveLoader = OldResolveLoader | NewResolveLoader; | ||
type ExternalsElement = string | RegExp | ExternalsObjectElement | ExternalsFunctionElement; | ||
@@ -257,3 +378,3 @@ | ||
interface ConditionArray extends Array<Condition> {} | ||
interface ConditionArray extends Array<Condition> {} | ||
type Condition = string | RegExp | ((absPath: string) => boolean) | ConditionSpec | ConditionArray; | ||
@@ -271,6 +392,6 @@ | ||
/** | ||
/** | ||
* There are direct and delegate rules. Direct Rules need a test, Delegate rules delegate to subrules bringing their own. | ||
* Direct rules can optionally contain delegate keys (oneOf, rules). | ||
* | ||
* | ||
* These types exist to enforce that a rule has the keys `((loader XOR loaders) AND test) OR oneOf OR rules` | ||
@@ -281,13 +402,13 @@ */ | ||
* Specifies the category of the loader. No value means normal loader. | ||
* | ||
* | ||
* There is also an additional category "inlined loader" which are loaders applied inline of the import/require. | ||
* | ||
* | ||
* All loaders are sorted in the order post, inline, normal, pre and used in this order. | ||
* | ||
* | ||
* All normal loaders can be omitted (overridden) by prefixing ! in the request. | ||
* | ||
* | ||
* All normal and pre loaders can be omitted (overridden) by prefixing -! in the request. | ||
* | ||
* | ||
* All normal, post and pre loaders can be omitted (overridden) by prefixing !! in the request. | ||
* | ||
* | ||
* Inline loaders and ! prefixes should not be used as they are non-standard. They may be use by loader generated code. | ||
@@ -308,3 +429,3 @@ */ | ||
* An object with parser options. All applied parser options are merged. | ||
* | ||
* | ||
* For each different parser options object a new parser is created and plugins can apply plugins depending on the parser options. Many of the default plugins apply their parser plugins only if a property in the parser options is not set or true. | ||
@@ -350,3 +471,3 @@ */ | ||
type UseRule = OldUseRule | NewUseRule; | ||
// Delegate Rules | ||
@@ -362,3 +483,5 @@ interface RulesRule extends BaseRule { | ||
interface Plugin { } | ||
interface Plugin extends tapable.Plugin { | ||
apply (thisArg: Webpack, ...args: any[]): void | ||
} | ||
@@ -420,2 +543,7 @@ interface Webpack { | ||
/** | ||
* Adds SourceMaps for assets, but wrapped inside eval statements. | ||
* Much faster incremental build speed, but harder to debug. | ||
*/ | ||
EvalSourceMapDevToolPlugin: EvalSourceMapDevToolPluginStatic; | ||
/** | ||
* Enables Hot Module Replacement. (This requires records data if not in dev-server mode, recordsPath) | ||
@@ -439,2 +567,7 @@ * Generates Hot Update Chunks of each chunk in the records. | ||
WatchIgnorePlugin: WatchIgnorePluginStatic; | ||
/** | ||
* Uses the module name as the module id inside the bundle, instead of a number. | ||
* Helps with debugging, but increases bundle size. | ||
*/ | ||
NamedModulesPlugin: NamedModulesPluginStatic; | ||
} | ||
@@ -526,13 +659,61 @@ | ||
interface DefinePluginStatic { | ||
new (definitions: any): Plugin; | ||
new (definitions: {[key: string]: any}): Plugin; | ||
} | ||
interface ProvidePluginStatic { | ||
new (definitions: any): Plugin; | ||
new (definitions: {[key: string]: any}): Plugin; | ||
} | ||
interface SourceMapDevToolPluginStatic { | ||
new (options: any): Plugin; | ||
// if string | false | null, maps to the filename option | ||
new (options?: string | false | null | SourceMapDevToolPluginOptions): Plugin; | ||
} | ||
interface SourceMapDevToolPluginOptions { | ||
// output filename pattern (false/null to append) | ||
filename?: string | false | null, | ||
// source map comment pattern (false to not append) | ||
append?: false | string, | ||
// template for the module filename inside the source map | ||
moduleFilenameTemplate?: string, | ||
// fallback used when the moduleFilenameTemplate produces a collision | ||
fallbackModuleFilenameTemplate?: string, | ||
// test/include/exclude files | ||
test?: Condition | Condition[], | ||
include?: Condition | Condition[], | ||
exclude?: Condition | Condition[] | ||
// whether to include the footer comment with source information | ||
noSources?: boolean, | ||
// the source map sourceRoot ("The URL root from which all sources are relative.") | ||
sourceRoot?: string | null, | ||
// whether to generate per-module source map | ||
module?: boolean, | ||
// whether to include column information in the source map | ||
columns?: boolean, | ||
// whether to preserve line numbers between source and source map | ||
lineToLine?: boolean | { | ||
test?: Condition | Condition[], | ||
include?: Condition | Condition[], | ||
exclude?: Condition | Condition[] | ||
} | ||
} | ||
interface EvalSourceMapDevToolPluginStatic { | ||
// if string | false, maps to the append option | ||
new (options?: string | false | EvalSourceMapDevToolPluginOptions): Plugin; | ||
} | ||
interface EvalSourceMapDevToolPluginOptions { | ||
append?: false | string, | ||
moduleFilenameTemplate?: string, | ||
sourceRoot?: string, | ||
module?: boolean, | ||
columns?: boolean, | ||
lineToLine?: boolean | { | ||
test?: Condition | Condition[], | ||
include?: Condition | Condition[], | ||
exclude?: Condition | Condition[] | ||
} | ||
} | ||
interface HotModuleReplacementPluginStatic { | ||
@@ -554,2 +735,6 @@ new (options?: any): Plugin; | ||
interface NamedModulesPluginStatic { | ||
new (): Plugin; | ||
} | ||
namespace optimize { | ||
@@ -556,0 +741,0 @@ interface DedupePluginStatic { |
{ | ||
"name": "@types/webpack", | ||
"version": "2.0.0", | ||
"description": "TypeScript definitions for webpack 2.0.0", | ||
"version": "2.1.0", | ||
"description": "TypeScript definitions for webpack", | ||
"license": "MIT", | ||
@@ -14,7 +14,8 @@ "author": "Qubo <https://github.com/tkqubo>", | ||
"dependencies": { | ||
"@types/tapable": "*", | ||
"@types/uglify-js": "*" | ||
}, | ||
"peerDependencies": {}, | ||
"typings": "index.d.ts", | ||
"typesPublisherContentHash": "c2152d62a1737be1e8d6bb49c6739cb0df7cf7d437fc9f2fdf1fae5305637c5a" | ||
"typesPublisherContentHash": "a4252e6549a6209d95b5b84eb833ccde97f6f43b6013780ddc2f2bf625368888", | ||
"typeScriptVersion": "2.0" | ||
} |
@@ -5,15 +5,14 @@ # Installation | ||
# Summary | ||
This package contains type definitions for webpack 2.0.0 (https://github.com/webpack/webpack). | ||
This package contains type definitions for webpack (https://github.com/webpack/webpack). | ||
# Details | ||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/webpack | ||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/webpack | ||
Additional Details | ||
* Last updated: Tue, 15 Nov 2016 14:55:32 GMT | ||
* File structure: ProperModule | ||
* Library Dependencies: uglify-js | ||
* Module Dependencies: uglify-js | ||
* Global values: webpack | ||
* Last updated: Thu, 29 Dec 2016 23:09:25 GMT | ||
* Library Dependencies: tapable, uglify-js | ||
* Module Dependencies: tapable, uglify-js | ||
* Global values: none | ||
# Credits | ||
These definitions were written by Qubo <https://github.com/tkqubo>. |
{ | ||
"authors": "Qubo <https://github.com/tkqubo>", | ||
"definitionFilename": "index.d.ts", | ||
"libraryDependencies": [ | ||
"tapable", | ||
"uglify-js" | ||
], | ||
"moduleDependencies": [ | ||
"tapable", | ||
"uglify-js" | ||
], | ||
"libraryMajorVersion": 2, | ||
"libraryMinorVersion": 0, | ||
"libraryName": "webpack 2.0.0", | ||
"libraryMinorVersion": 1, | ||
"typeScriptVersion": "2.0", | ||
"libraryName": "webpack", | ||
"typingsPackageName": "webpack", | ||
"projectName": "https://github.com/webpack/webpack", | ||
"sourceRepoURL": "https://www.github.com/DefinitelyTyped/DefinitelyTyped", | ||
"sourceBranch": "types-2.0", | ||
"kind": "ProperModule", | ||
"globals": [ | ||
"webpack" | ||
], | ||
"sourceBranch": "master", | ||
"globals": [], | ||
"declaredModules": [ | ||
@@ -28,3 +27,3 @@ "webpack" | ||
"hasPackageJson": false, | ||
"contentHash": "c2152d62a1737be1e8d6bb49c6739cb0df7cf7d437fc9f2fdf1fae5305637c5a" | ||
"contentHash": "a4252e6549a6209d95b5b84eb833ccde97f6f43b6013780ddc2f2bf625368888" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36491
797
2
18
+ Added@types/tapable@*
+ Added@types/tapable@2.2.7(transitive)
+ Addedtapable@2.2.1(transitive)