From 39c2f8158c7ca6ef79dda6d8a796fdaca01ae99b Mon Sep 17 00:00:00 2001 From: weixue Date: Mon, 18 Dec 2023 19:34:46 +0800 Subject: [PATCH] fix:fix types --- types/index.d.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/types/index.d.ts b/types/index.d.ts index 247a721..ee22dff 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -1,6 +1,6 @@ +import * as https from 'https'; import { Tapable } from 'tapable'; import * as webpack from 'webpack'; -import * as https from 'https'; export = Config; @@ -133,12 +133,20 @@ declare namespace Config { strictExportPresence(value: boolean): this; } + type FileNameType = string | ((pathData: { + chunk?: { + name?: string + }&Record + hash?: string + contentHash?:any + }&Record)=> string) + class Output extends ChainedMap { auxiliaryComment(value: string | { [comment: string]: string }): this; - chunkFilename(value: string): this; + chunkFilename(value: FileNameType): this; chunkLoadTimeout(value: number): this; crossOriginLoading(value: boolean | string): this; - filename(value: string): this; + filename(value: FileNameType): this; library(value: string): this; libraryExport(value: string | string[]): this; libraryTarget(value: string): this;