forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjs-beautify.d.ts
74 lines (66 loc) · 2.33 KB
/
js-beautify.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// 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: https://github.com/DefinitelyTyped/DefinitelyTyped
interface JsBeautifyOptions {
indent_size?: number;
indent_char?: string;
eol?: string;
indent_level?: number;
indent_with_tabs?: boolean;
preserve_newlines?: boolean;
max_preserve_newlines?: number;
jslint_happy?: boolean;
space_after_anon_function?: boolean;
brace_style?: 'collapse-preserve-inline'|'collapse'|'expand'|'end-expand'|'none';
keep_array_indentation?: boolean;
keep_function_indentation?: boolean;
space_before_conditional?: boolean;
break_chained_methods?: boolean;
eval_code?: boolean;
unescape_strings?: boolean;
wrap_line_length?: number;
wrap_attributes?: 'auto'|'force' ;
wrap_attributes_indent_size?: number;
end_with_newline?: boolean;
}
interface HTMLBeautifyOptions {
indent_size?: number;
indent_char?: string;
indent_with_tabs?: 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;
wrap_line_length?: number;
wrap_attributes?: 'auto'|'force' ;
wrap_attributes_indent_size?: number;
unformatted?: string;
extra_liners?: string;
}
interface CSSBeautifyOptions {
indent_size?: number;
indent_char?: string;
indent_with_tabs?: boolean;
eol?: string;
end_with_newline?: boolean;
selector_separator_newline?: boolean;
newline_between_rules?: boolean;
}
interface jsb{
(js_source_text: string, options?: JsBeautifyOptions) : string ;
js:(js_source_text: string, options?: JsBeautifyOptions) => string ;
beautify_js:(js_source_text: string, options?: JsBeautifyOptions) => string ;
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 ;
}
declare var js_beautify:jsb;
declare module "js-beautify"
{
export = js_beautify;
}