/* auto-generated by NAPI-RS */ /* eslint-disable */ export interface CodegenOptions { /** * Remove whitespace. * * @default true */ whitespace?: boolean } export interface CompressOptions { /** * Enables optional catch or nullish-coalescing operator if targeted higher. * * @default 'es2015' */ target?: string /** * Pass true to discard calls to `console.*`. * * @default false */ dropConsole?: boolean /** * Remove `debugger;` statements. * * @default true */ dropDebugger?: boolean } export interface MangleOptions { /** Pass true to mangle names declared in the top level scope. */ toplevel?: boolean /** Debug mangled names. */ debug?: boolean } /** * Minify synchronously. * * # Errors * * * Fails to parse the options. */ export declare function minify(filename: string, sourceText: string, options?: MinifyOptions | undefined | null): MinifyResult export interface MinifyOptions { compress?: boolean | CompressOptions mangle?: boolean | MangleOptions codegen?: boolean | CodegenOptions sourcemap?: boolean } export interface MinifyResult { code: string map?: SourceMap } export interface SourceMap { file?: string mappings: string names: Array sourceRoot?: string sources: Array sourcesContent?: Array version: number x_google_ignoreList?: Array }