mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-03 12:20:04 +02:00
update packages to latest version
This commit is contained in:
46
node_modules/terser/tools/terser.d.ts
generated
vendored
46
node_modules/terser/tools/terser.d.ts
generated
vendored
@@ -1,11 +1,12 @@
|
||||
/// <reference lib="es2015" />
|
||||
|
||||
import { RawSourceMap } from 'source-map';
|
||||
import { SectionedSourceMapInput, EncodedSourceMap, DecodedSourceMap } from '@jridgewell/source-map';
|
||||
|
||||
export type ECMA = 5 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020;
|
||||
|
||||
export interface ParseOptions {
|
||||
bare_returns?: boolean;
|
||||
/** @deprecated legacy option. Currently, all supported EcmaScript is valid to parse. */
|
||||
ecma?: ECMA;
|
||||
html5_comments?: boolean;
|
||||
shebang?: boolean;
|
||||
@@ -80,16 +81,52 @@ export interface MangleOptions {
|
||||
keep_classnames?: boolean | RegExp;
|
||||
keep_fnames?: boolean | RegExp;
|
||||
module?: boolean;
|
||||
nth_identifier?: SimpleIdentifierMangler | WeightedIdentifierMangler;
|
||||
properties?: boolean | ManglePropertiesOptions;
|
||||
reserved?: string[];
|
||||
safari10?: boolean;
|
||||
toplevel?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier mangler for which the output is invariant with respect to the source code.
|
||||
*/
|
||||
export interface SimpleIdentifierMangler {
|
||||
/**
|
||||
* Obtains the nth most favored (usually shortest) identifier to rename a variable to.
|
||||
* The mangler will increment n and retry until the return value is not in use in scope, and is not a reserved word.
|
||||
* This function is expected to be stable; Evaluating get(n) === get(n) should always return true.
|
||||
* @param n The ordinal of the identifier.
|
||||
*/
|
||||
get(n: number): string;
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier mangler that leverages character frequency analysis to determine identifier precedence.
|
||||
*/
|
||||
export interface WeightedIdentifierMangler extends SimpleIdentifierMangler {
|
||||
/**
|
||||
* Modifies the internal weighting of the input characters by the specified delta.
|
||||
* Will be invoked on the entire printed AST, and then deduct mangleable identifiers.
|
||||
* @param chars The characters to modify the weighting of.
|
||||
* @param delta The numeric weight to add to the characters.
|
||||
*/
|
||||
consider(chars: string, delta: number): number;
|
||||
/**
|
||||
* Resets character weights.
|
||||
*/
|
||||
reset(): void;
|
||||
/**
|
||||
* Sorts identifiers by character frequency, in preparation for calls to get(n).
|
||||
*/
|
||||
sort(): void;
|
||||
}
|
||||
|
||||
export interface ManglePropertiesOptions {
|
||||
builtins?: boolean;
|
||||
debug?: boolean;
|
||||
keep_quoted?: boolean | 'strict';
|
||||
nth_identifier?: SimpleIdentifierMangler | WeightedIdentifierMangler;
|
||||
regex?: RegExp | string;
|
||||
reserved?: string[];
|
||||
}
|
||||
@@ -108,6 +145,7 @@ export interface FormatOptions {
|
||||
}) => boolean );
|
||||
ecma?: ECMA;
|
||||
ie8?: boolean;
|
||||
keep_numbers?: boolean;
|
||||
indent_level?: number;
|
||||
indent_start?: number;
|
||||
inline_script?: boolean;
|
||||
@@ -138,6 +176,7 @@ export enum OutputQuoteStyle {
|
||||
export interface MinifyOptions {
|
||||
compress?: boolean | CompressOptions;
|
||||
ecma?: ECMA;
|
||||
enclose?: boolean | string;
|
||||
ie8?: boolean;
|
||||
keep_classnames?: boolean | RegExp;
|
||||
keep_fnames?: boolean | RegExp;
|
||||
@@ -155,12 +194,13 @@ export interface MinifyOptions {
|
||||
|
||||
export interface MinifyOutput {
|
||||
code?: string;
|
||||
map?: RawSourceMap | string;
|
||||
map?: EncodedSourceMap | string;
|
||||
decoded_map?: DecodedSourceMap | null;
|
||||
}
|
||||
|
||||
export interface SourceMapOptions {
|
||||
/** Source map object, 'inline' or source map file content */
|
||||
content?: RawSourceMap | string;
|
||||
content?: SectionedSourceMapInput | string;
|
||||
includeSources?: boolean;
|
||||
filename?: string;
|
||||
root?: string;
|
||||
|
Reference in New Issue
Block a user