| | |
| | | uglifyJsMinify, |
| | | swcMinify, |
| | | esbuildMinify, |
| | | jsonMinify, |
| | | Schema, |
| | | Compiler, |
| | | Compilation, |
| | | Configuration, |
| | | Asset, |
| | | AssetInfo, |
| | | TemplatePath, |
| | | JestWorker, |
| | | RawSourceMap, |
| | | TraceMap, |
| | | Rule, |
| | | Rules, |
| | | EXPECTED_ANY, |
| | | ExtractCommentsFunction, |
| | | ExtractCommentsCondition, |
| | | ExtractCommentsFilename, |
| | |
| | | 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[]; |
| | |
| | | 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"; |
| | |
| | | | "some" |
| | | | RegExp |
| | | | ExtractCommentsFunction; |
| | | type ExtractCommentsFilename = string | ((fileData: any) => string); |
| | | type ExtractCommentsFilename = TemplatePath; |
| | | type ExtractCommentsBanner = |
| | | | boolean |
| | | | string |
| | |
| | | /** |
| | | * 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> = { |
| | |
| | | * 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; |