File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ declare namespace TerserPlugin {
7171 uglifyJsMinify ,
7272 swcMinify ,
7373 esbuildMinify ,
74+ jsonMinify ,
7475 Schema ,
7576 Compiler ,
7677 Compilation ,
@@ -112,6 +113,7 @@ import { terserMinify } from "./utils";
112113import { uglifyJsMinify } from "./utils" ;
113114import { swcMinify } from "./utils" ;
114115import { esbuildMinify } from "./utils" ;
116+ import { jsonMinify } from "./utils" ;
115117type Schema = import ( "schema-utils/declarations/validate" ) . Schema ;
116118type Compiler = import ( "webpack" ) . Compiler ;
117119type Compilation = import ( "webpack" ) . Compilation ;
@@ -250,6 +252,10 @@ type MinimizeFunctionHelpers = {
250252 * true when minimizer support worker threads, otherwise false
251253 */
252254 supportsWorkerThreads ?: ( ( ) => boolean | undefined ) | undefined ;
255+ /**
256+ * true when minimizer support worker, otherwise false
257+ */
258+ supportsWorker ?: ( ( ) => boolean | undefined ) | undefined ;
253259} ;
254260type MinimizerImplementation < T > = BasicMinimizerImplementation < T > &
255261 MinimizeFunctionHelpers ;
Original file line number Diff line number Diff line change @@ -33,6 +33,22 @@ export namespace esbuildMinify {
3333 */
3434 function supportsWorkerThreads ( ) : boolean | undefined ;
3535}
36+ /**
37+ * @param {Input } input input
38+ * @param {RawSourceMap= } sourceMap source map
39+ * @param {CustomOptions= } minimizerOptions options
40+ * @returns {Promise<MinimizedResult> } minimized result
41+ */
42+ export function jsonMinify (
43+ input : Input ,
44+ sourceMap ?: RawSourceMap | undefined ,
45+ minimizerOptions ?: CustomOptions | undefined ,
46+ ) : Promise < MinimizedResult > ;
47+ export namespace jsonMinify {
48+ function getMinimizerVersion ( ) : string ;
49+ function supportsWorker ( ) : boolean ;
50+ function supportsWorkerThreads ( ) : boolean ;
51+ }
3652/**
3753 * @template T
3854 * @typedef {() => T } FunctionReturning
You can’t perform that action at this time.
0 commit comments