Installation
npm install --save @types/html
Summary
This package contains type definitions for html (https://github.com/maxogden/commonjs-html-prettyprinter).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/html.
index.d.ts
export interface PrintOptions {
/**
* Put braces on the same line as control statements (`collapse`),
* or put braces on own line (Allman / ANSI style, `expand`),
* or just put end braces on own line (`end-expand`). Default: `collapse`.
*/
brace_style?: "collapse" | "expand" | "end-expand" | undefined;
/** Default: `normal`. */
indent_scripts?: "keep" | "separate" | "normal" | undefined;
/** indentation size. Default: 4. */
indent_size?: number | undefined;
/** character to indent with. Default: " " (space). */
indent_char?: string | undefined;
/** Maximum amount of characters per line. Default: 70. */
max_char?: number | undefined;
/** list of tags, that shouldn't be reformatted. Defaults to inline tags. */
unformatted?: string[] | undefined;
}
export function prettyPrint(htmlSource: string, options?: PrintOptions): string;
Additional Details
- Last updated: Tue, 07 Nov 2023 03:09:37 GMT
- Dependencies: none
Credits
These definitions were written by Florian Keller.