@@ -129,7 +129,7 @@ declare enum EnumToken {
129
129
* @param nestingContent
130
130
* @param context
131
131
*/
132
- declare function minify ( ast : AstNode , options ?: ParserOptions | MinifyOptions , recursive ?: boolean , errors ?: ErrorDescription [ ] , nestingContent ?: boolean , context ?: {
132
+ declare function minify ( ast : AstNode , options ?: ParserOptions | MinifyFeatureOptions , recursive ?: boolean , errors ?: ErrorDescription [ ] , nestingContent ?: boolean , context ?: {
133
133
[ key : string ] : any ;
134
134
} ) : AstNode ;
135
135
@@ -1035,24 +1035,29 @@ interface ValidationOptions {
1035
1035
lenient ?: boolean ;
1036
1036
}
1037
1037
1038
- export declare interface ParserOptions extends ValidationOptions , PropertyListOptions {
1038
+ interface MinifyOptions {
1039
1039
1040
1040
minify ?: boolean ;
1041
- src ?: string ;
1042
- sourcemap ?: boolean ;
1043
1041
nestingRules ?: boolean ;
1044
1042
expandNestingRules ?: boolean ;
1045
- removeCharset ?: boolean ;
1043
+ removeDuplicateDeclarations ?: boolean ;
1044
+ computeShorthand ?: boolean ;
1045
+ computeCalcExpression ?: boolean ;
1046
+ inlineCssVariables ?: boolean ;
1046
1047
removeEmpty ?: boolean ;
1048
+ pass ?: number ;
1049
+ }
1050
+
1051
+ export declare interface ParserOptions extends MinifyOptions , ValidationOptions , PropertyListOptions {
1052
+
1053
+ src ?: string ;
1054
+ sourcemap ?: boolean ;
1055
+ removeCharset ?: boolean ;
1047
1056
resolveUrls ?: boolean ;
1048
1057
resolveImport ?: boolean ;
1049
1058
cwd ?: string ;
1050
1059
parseColor ?: boolean ;
1051
- removeDuplicateDeclarations ?: boolean ;
1052
- computeShorthand ?: boolean ;
1053
1060
removePrefix ?: boolean ;
1054
- inlineCssVariables ?: boolean ;
1055
- computeCalcExpression ?: boolean ;
1056
1061
load ?: ( url : string , currentUrl : string ) => Promise < string > ;
1057
1062
dirname ?: ( path : string ) => string ;
1058
1063
resolve ?: ( url : string , currentUrl : string , currentWorkingDirectory ?: string ) => {
@@ -1064,7 +1069,7 @@ export declare interface ParserOptions extends ValidationOptions, PropertyListOp
1064
1069
setParent ?: boolean ;
1065
1070
}
1066
1071
1067
- export declare interface MinifyOptions extends ParserOptions {
1072
+ export declare interface MinifyFeatureOptions extends ParserOptions {
1068
1073
1069
1074
features : MinifyFeature [ ] ;
1070
1075
}
@@ -1073,7 +1078,7 @@ export declare interface MinifyFeature {
1073
1078
1074
1079
ordering : number ;
1075
1080
1076
- register ( options : MinifyOptions | ParserOptions ) : void ;
1081
+ register ( options : MinifyFeatureOptions | ParserOptions ) : void ;
1077
1082
1078
1083
// run(ast: AstRule | AstAtRule, options: ParserOptions = {}, parent: AstRule | AstAtRule | AstRuleStyleSheet, context: { [key: string]: any }): void;
1079
1084
@@ -1083,7 +1088,7 @@ export declare interface MinifyFeature {
1083
1088
export declare interface MinifyFeature {
1084
1089
1085
1090
ordering : number ;
1086
- register : ( options : MinifyOptions | ParserOptions ) => void ;
1091
+ register : ( options : MinifyFeatureOptions | ParserOptions ) => void ;
1087
1092
run : ( ast : AstRule | AstAtRule , options : ParserOptions , parent : AstRule | AstAtRule | AstRuleStyleSheet , context : {
1088
1093
[ key : string ] : any
1089
1094
} ) => void ;
0 commit comments