From 5f2d685e7beacdff66692804471b7c5b9dff41d7 Mon Sep 17 00:00:00 2001 From: Herrington Darkholme Date: Wed, 31 May 2017 17:13:37 +0800 Subject: [PATCH] update js-beautify typing According to https://github.com/beautify-web/js-beautify/blob/895a45d95b36d8e37a2b8ad4dda488c0e1a8f272/tools/template/beautify-html.begin.js --- types/js-beautify/index.d.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/types/js-beautify/index.d.ts b/types/js-beautify/index.d.ts index 47fdd8292e..e73e013325 100644 --- a/types/js-beautify/index.d.ts +++ b/types/js-beautify/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for js_beautify // Project: https://github.com/beautify-web/js-beautify/ -// Definitions by: Josh Goldberg , Hans Windhoff +// Definitions by: Josh Goldberg , Hans Windhoff // 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 ; }