From db539fc62fc3de9749d1feed2f343575709d1e0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bazyli=20Brzo=CC=81ska?= Date: Sat, 29 Oct 2016 02:18:50 +0200 Subject: [PATCH] fix(typings): make all config parameters optional --- src/index.ts | 2 +- src/webpack.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index ae71597..a69cd24 100644 --- a/src/index.ts +++ b/src/index.ts @@ -8,7 +8,7 @@ function hasProcessFlag(flag) { return process.argv.join('').indexOf(flag) > -1 } -export type WebpackConfigWithMetadata = WebpackConfig & { metadata: any } +export type WebpackConfigWithMetadata = WebpackConfig & { metadata?: any } export type EasyWebpackConfig = WebpackConfigWithMetadata | ((this: WebpackConfigWithMetadata) => WebpackConfigWithMetadata) export function generateConfig(...configs: Array) { diff --git a/src/webpack.ts b/src/webpack.ts index ef3cb41..c50984f 100644 --- a/src/webpack.ts +++ b/src/webpack.ts @@ -281,7 +281,7 @@ export interface Webpack { * Object: Multiple entry bundles are created. The key is the chunk name. The value can be a string or an array. If its' array all modules are loaded upon startup. The last one is exported. If it's a string look at the definition for string. * String: The entry point for one output file. The string is resolved to a module which is loaded upon startup. */ - entry: WebpackType.EntryItem | {[key: string]: WebpackType.EntryItem}; + entry?: WebpackType.EntryItem | {[key: string]: WebpackType.EntryItem}; /** * Specify dependencies that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`.