Herrington Darkholme
2017-05-31 17:14:01 +08:00
parent 83226ba8a7
commit 5f2d685e7b
+8 -6
View File
@@ -1,6 +1,6 @@
// Type definitions for js_beautify
// Project: https://github.com/beautify-web/js-beautify/
// Definitions by: Josh Goldberg <https://github.com/JoshuaKGoldberg/>, Hans Windhoff <https://github.com/hansrwindhoff/>
// Definitions by: Josh Goldberg <https://github.com/JoshuaKGoldberg/>, Hans Windhoff <https://github.com/hansrwindhoff/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface JsBeautifyOptions {
@@ -30,18 +30,20 @@ interface HTMLBeautifyOptions {
indent_size?: number;
indent_char?: string;
indent_with_tabs?: boolean;
indent_handlebars?: boolean;
eol?: string;
end_with_newline?: boolean;
preserve_newlines?: boolean;
max_preserve_newlines?: number;
indent_inner_html?: boolean;
brace_style?: 'collapse-preserve-inline'|'collapse'|'expand'|'end-expand'|'none';
indent_scripts?: boolean;
indent_scripts?: 'keep'|'separate'|'normal';
wrap_line_length?: number;
wrap_attributes?: 'auto'|'force' ;
wrap_attributes_indent_size?: number;
unformatted?: string;
extra_liners?: string;
unformatted?: string[];
content_unformatted?: string[];
extra_liners?: string|string[];
}
interface CSSBeautifyOptions {
@@ -50,7 +52,7 @@ interface CSSBeautifyOptions {
indent_with_tabs?: boolean;
eol?: string;
end_with_newline?: boolean;
selector_separator_newline?: boolean;
selector_separator_newline?: boolean;
newline_between_rules?: boolean;
}
@@ -61,7 +63,7 @@ interface jsb{
css:(js_source_text: string, options?: CSSBeautifyOptions) => string ;
css_beautify:(js_source_text: string, options?: CSSBeautifyOptions) => string ;
html:(js_source_text: string, options?: HTMLBeautifyOptions) => string ;
html_beautify:(js_source_text: string, options?: HTMLBeautifyOptions) => string ;
}