mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
Merge pull request #24513 from alan-agius4/patch-6
fix: `shebang` should be optional in `ParseOptions`
This commit is contained in:
Vendored
+2
-1
@@ -10,7 +10,7 @@ export interface ParseOptions {
|
||||
bare_returns?: boolean;
|
||||
html5_comments?: boolean;
|
||||
/** Support `#!command` as the first line */
|
||||
shebang: boolean;
|
||||
shebang?: boolean;
|
||||
}
|
||||
|
||||
export interface CompressOptions {
|
||||
@@ -198,6 +198,7 @@ export interface MinifyOptions {
|
||||
|
||||
export interface MinifyOutput {
|
||||
error?: Error;
|
||||
warnings?: string[];
|
||||
code: string;
|
||||
map: string;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ minify(code, {
|
||||
}
|
||||
});
|
||||
|
||||
minify(code, {
|
||||
const output = minify(code, {
|
||||
warnings: 'verbose',
|
||||
mangle: {
|
||||
properties: {
|
||||
@@ -34,3 +34,7 @@ minify(code, {
|
||||
arguments: true
|
||||
}
|
||||
});
|
||||
|
||||
if (output.warnings) {
|
||||
output.warnings.filter(x => x === 'Dropping unused variable');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user