@types/html
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/html

Weekly Downloads

2,554

Version

1.0.4

License

MIT

Unpacked Size

4.33 kB

Total Files

5

Last publish

Collaborators

  • types