1.0.4 • Published 6 months ago

@types/html v1.0.4

Weekly downloads
3,604
License
MIT
Repository
github
Last release
6 months ago

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

// Type definitions for html 1.0
// Project: https://github.com/maxogden/commonjs-html-prettyprinter
// Definitions by: Florian Keller <https://github.com/ffflorian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

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: Thu, 08 Jul 2021 14:22:54 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Florian Keller.

1.0.2

8 months ago

1.0.4

6 months ago

1.0.3

7 months ago

1.0.1

3 years ago

1.0.0

4 years ago