From 41b2f77106358acb7a9d518b17b30016c3a15872 Mon Sep 17 00:00:00 2001 From: JounQin Date: Tue, 16 May 2023 22:34:56 +0800 Subject: [PATCH] fix(types): `methods` should be string array (#1550) --- src/index.js | 2 +- types/index.d.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index 9f475cb6b..cd6f9b0a3 100644 --- a/src/index.js +++ b/src/index.js @@ -100,7 +100,7 @@ const noop = () => {}; * @property {{[key: string]: string}} [mimeTypes] * @property {string | undefined} [mimeTypeDefault] * @property {boolean | ((targetPath: string) => boolean)} [writeToDisk] - * @property {string} [methods] + * @property {string[]} [methods] * @property {Headers} [headers] * @property {NonNullable["publicPath"]} [publicPath] * @property {Configuration["stats"]} [stats] diff --git a/types/index.d.ts b/types/index.d.ts index 133d49bac..ff067d85d 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -76,7 +76,7 @@ export = wdm; * @property {{[key: string]: string}} [mimeTypes] * @property {string | undefined} [mimeTypeDefault] * @property {boolean | ((targetPath: string) => boolean)} [writeToDisk] - * @property {string} [methods] + * @property {string[]} [methods] * @property {Headers} [headers] * @property {NonNullable["publicPath"]} [publicPath] * @property {Configuration["stats"]} [stats] @@ -187,7 +187,7 @@ type Options< | undefined; mimeTypeDefault?: string | undefined; writeToDisk?: boolean | ((targetPath: string) => boolean) | undefined; - methods?: string | undefined; + methods?: string[] | undefined; headers?: Headers; publicPath?: NonNullable["publicPath"]; stats?: Configuration["stats"];