Skip to content

Commit

Permalink
fix: types (#512)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait authored Aug 16, 2022
1 parent 9ebedf2 commit 5c13ba7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 1 addition & 3 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
/** @typedef {import("terser").MinifyOptions} TerserOptions */
/** @typedef {import("terser").CompressOptions} TerserCompressOptions */
/** @typedef {import("terser").ECMA} TerserECMA */
/** @typedef {import("@swc/core").JsMinifyOptions} SwcMinifyOptions */
/** @typedef {import("@swc/core").TerserCompressOptions} SwcCompressOptions */
/** @typedef {import("./index.js").ExtractCommentsOptions} ExtractCommentsOptions */
/** @typedef {import("./index.js").ExtractCommentsFunction} ExtractCommentsFunction */
/** @typedef {import("./index.js").ExtractCommentsCondition} ExtractCommentsCondition */
Expand Down Expand Up @@ -552,7 +550,7 @@ uglifyJsMinify.getMinimizerVersion = () => {
async function swcMinify(input, sourceMap, minimizerOptions) {
/**
* @param {PredefinedOptions & import("@swc/core").JsMinifyOptions} [swcOptions={}]
* @returns {SwcMinifyOptions & { sourceMap: undefined } & { compress: SwcCompressOptions }}
* @returns {import("@swc/core").JsMinifyOptions & { sourceMap: undefined } & { compress: import("@swc/core").TerserCompressOptions }}
*/
const buildSwcOptions = (swcOptions = {}) => {
// Need deep copy objects to avoid https://github.com/terser/terser/issues/366
Expand Down
2 changes: 0 additions & 2 deletions types/utils.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ export type TerserFormatOptions = import("terser").FormatOptions;
export type TerserOptions = import("terser").MinifyOptions;
export type TerserCompressOptions = import("terser").CompressOptions;
export type TerserECMA = import("terser").ECMA;
export type SwcMinifyOptions = import("@swc/core").JsMinifyOptions;
export type SwcCompressOptions = import("@swc/core").TerserCompressOptions;
export type ExtractCommentsOptions =
import("./index.js").ExtractCommentsOptions;
export type ExtractCommentsFunction =
Expand Down

0 comments on commit 5c13ba7

Please sign in to comment.