Add more typings to webpack

This commit is contained in:
tkqubo
2015-09-23 19:22:13 +09:00
parent d12ff571bf
commit d0336ac511
2 changed files with 237 additions and 1 deletions
+35 -1
View File
@@ -6,8 +6,21 @@
declare module "webpack" {
namespace webpack {
interface Configuration {
entry?: string|Entry;
output?: Output;
module?: Module;
plugins?: Plugin[];
plugins?: (Plugin|Function)[];
}
interface Entry {
[name: string]: string|string[];
}
interface Output {
path?: string;
filename?: string;
chunkFilename?: string;
publicPath?: string;
}
interface Module {
@@ -43,11 +56,32 @@ declare module "webpack" {
interface Webpack {
ResolverPlugin: ResolverPluginStatic;
optimize: Optimize;
}
interface Optimize {
CommonsChunkPlugin: CommonsChunkPluginStatic;
}
interface CommonsChunkPlugin {
}
interface CommonsChunkPluginStatic {
new(chunkName: string, filenames?: string|string[]): CommonsChunkPlugin;
}
interface UglifyJsPlugin {
}
interface DedupePlugin {
}
}
var webpack: webpack.Webpack;
export default webpack;
//export = webpack;
}