WXL
3 天以前 9bce51f651aad297ef9eb6df832bfdaf1de05d84
node_modules/terser-webpack-plugin/types/index.d.ts
@@ -71,17 +71,20 @@
    uglifyJsMinify,
    swcMinify,
    esbuildMinify,
    jsonMinify,
    Schema,
    Compiler,
    Compilation,
    Configuration,
    Asset,
    AssetInfo,
    TemplatePath,
    JestWorker,
    RawSourceMap,
    TraceMap,
    Rule,
    Rules,
    EXPECTED_ANY,
    ExtractCommentsFunction,
    ExtractCommentsCondition,
    ExtractCommentsFilename,
@@ -110,12 +113,14 @@
import { uglifyJsMinify } from "./utils";
import { swcMinify } from "./utils";
import { esbuildMinify } from "./utils";
import { jsonMinify } from "./utils";
type Schema = import("schema-utils/declarations/validate").Schema;
type Compiler = import("webpack").Compiler;
type Compilation = import("webpack").Compilation;
type Configuration = import("webpack").Configuration;
type Asset = import("webpack").Asset;
type AssetInfo = import("webpack").AssetInfo;
type TemplatePath = import("webpack").TemplatePath;
type JestWorker = import("jest-worker").Worker;
type RawSourceMap = import("@jridgewell/trace-mapping").EncodedSourceMap & {
  sources: string[];
@@ -125,8 +130,9 @@
type TraceMap = import("@jridgewell/trace-mapping").TraceMap;
type Rule = RegExp | string;
type Rules = Rule[] | Rule;
type EXPECTED_ANY = any;
type ExtractCommentsFunction = (
  astNode: any,
  astNode: EXPECTED_ANY,
  comment: {
    value: string;
    type: "comment1" | "comment2" | "comment3" | "comment4";
@@ -141,7 +147,7 @@
  | "some"
  | RegExp
  | ExtractCommentsFunction;
type ExtractCommentsFilename = string | ((fileData: any) => string);
type ExtractCommentsFilename = TemplatePath;
type ExtractCommentsBanner =
  | boolean
  | string
@@ -191,21 +197,21 @@
  /**
   * errors
   */
  errors?: Array<Error | string> | undefined;
  errors?: (Error | string)[] | undefined;
  /**
   * warnings
   */
  warnings?: Array<Error | string> | undefined;
  warnings?: (Error | string)[] | undefined;
  /**
   * extracted comments
   */
  extractedComments?: Array<string> | undefined;
  extractedComments?: string[] | undefined;
};
type Input = {
  [file: string]: string;
};
type CustomOptions = {
  [key: string]: any;
  [key: string]: EXPECTED_ANY;
};
type InferDefaultType<T> = T extends infer U ? U : CustomOptions;
type PredefinedOptions<T> = {
@@ -246,6 +252,10 @@
   * true when minimizer support worker threads, otherwise false
   */
  supportsWorkerThreads?: (() => boolean | undefined) | undefined;
  /**
   * true when minimizer support worker, otherwise false
   */
  supportsWorker?: (() => boolean | undefined) | undefined;
};
type MinimizerImplementation<T> = BasicMinimizerImplementation<T> &
  MinimizeFunctionHelpers;