@types/prettier

  • Version 2.6.3
  • Published
  • 48.9 kB
  • No dependencies
  • MIT license

Install

npm i @types/prettier
yarn add @types/prettier
pnpm add @types/prettier

Overview

TypeScript definitions for prettier

Index

Variables

Functions

Classes

Interfaces

Type Aliases

Namespaces

Variables

variable version

const version: string;
  • version field in package.json

Functions

function check

check: (source: string, options?: Options) => boolean;
  • check checks to see if the file has been formatted with Prettier given those options and returns a Boolean. This is similar to the --list-different parameter in the CLI and is useful for running Prettier in CI scenarios.

function clearConfigCache

clearConfigCache: () => void;
  • As you repeatedly call resolveConfig, the file system structure will be cached for performance. This function will clear the cache. Generally this is only needed for editor integrations that know that the file system has changed since the last format took place.

function format

format: (source: string, options?: Options) => string;
  • format is used to format text using Prettier. [Options](https://prettier.io/docs/en/options.html) may be provided to override the defaults.

function formatWithCursor

formatWithCursor: (source: string, options: CursorOptions) => CursorResult;
  • formatWithCursor both formats the code, and translates a cursor position from unformatted code to formatted code. This is useful for editor integrations, to prevent the cursor from moving when code is formatted.

    The cursorOffset option should be provided, to specify where the cursor is. This option cannot be used with rangeStart and rangeEnd.

function getFileInfo

getFileInfo: typeof getFileInfo;

    function getSupportInfo

    getSupportInfo: () => SupportInfo;
    • Returns an object representing the parsers, languages and file types Prettier supports for the current version.

    function resolveConfig

    resolveConfig: typeof resolveConfig;
    • resolveConfig can be used to resolve configuration for a given source file, passing its path as the first argument. The config search will start at the file path and continue to search up the directory. (You can use process.cwd() to start searching from the current directory).

      A promise is returned which will resolve to:

      - An options object, providing a [config file](https://prettier.io/docs/en/configuration.html) was found. - null, if no file was found.

      The promise will be rejected if there was an error parsing the configuration file.

    function resolveConfigFile

    resolveConfigFile: typeof resolveConfigFile;
    • resolveConfigFile can be used to find the path of the Prettier configuration file, that will be used when resolving the config (i.e. when calling resolveConfig).

      A promise is returned which will resolve to:

      - The path of the configuration file. - null, if no file was found.

      The promise will be rejected if there was an error parsing the configuration file.

    Classes

    class AstPath

    class AstPath<T = any> {}

      constructor

      constructor(value: {});

        property stack

        stack: T[];

          method call

          call: {
          <U>(callback: CallCallback<T, U>): U;
          <U, P1 extends CallProperties<T>>(
          callback: CallCallback<IndexValue<T, P1>, U>,
          prop1: P1
          ): U;
          <U, P1 extends keyof T, P2 extends CallProperties<T[P1]>>(
          callback: CallCallback<IndexValue<IndexValue<T, P1>, P2>, U>,
          prop1: P1,
          prop2: P2
          ): U;
          <
          U,
          P1 extends keyof T,
          P2 extends CallProperties<T[P1]>,
          P3 extends CallProperties<IndexValue<T[P1], P2>>
          >(
          callback: CallCallback<
          IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>,
          U
          >,
          prop1: P1,
          prop2: P2,
          prop3: P3
          ): U;
          <
          U,
          P1 extends keyof T,
          P2 extends CallProperties<T[P1]>,
          P3 extends CallProperties<IndexValue<T[P1], P2>>,
          P4 extends CallProperties<IndexValue<IndexValue<T[P1], P2>, P3>>
          >(
          callback: CallCallback<
          IndexValue<IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>, P4>,
          U
          >,
          prop1: P1,
          prop2: P2,
          prop3: P3,
          prop4: P4
          ): U;
          <U, P extends PropertyKey>(
          callback: CallCallback<any, U>,
          prop1: P,
          prop2: P,
          prop3: P,
          prop4: P,
          ...props: P[]
          ): U;
          };

            method callParent

            callParent: <U>(callback: (path: this) => U, count?: number) => U;

              method each

              each: {
              (callback: EachCallback<T>): void;
              <P1 extends IterProperties<T>>(
              callback: EachCallback<IndexValue<T, P1>>,
              prop1: P1
              ): void;
              <P1 extends keyof T, P2 extends IterProperties<T[P1]>>(
              callback: EachCallback<IndexValue<IndexValue<T, P1>, P2>>,
              prop1: P1,
              prop2: P2
              ): void;
              <
              P1 extends keyof T,
              P2 extends IterProperties<T[P1]>,
              P3 extends IterProperties<IndexValue<T[P1], P2>>
              >(
              callback: EachCallback<
              IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>
              >,
              prop1: P1,
              prop2: P2,
              prop3: P3
              ): void;
              <
              P1 extends keyof T,
              P2 extends IterProperties<T[P1]>,
              P3 extends IterProperties<IndexValue<T[P1], P2>>,
              P4 extends IterProperties<IndexValue<IndexValue<T[P1], P2>, P3>>
              >(
              callback: EachCallback<
              IndexValue<IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>, P4>
              >,
              prop1: P1,
              prop2: P2,
              prop3: P3,
              prop4: P4
              ): void;
              (
              callback: EachCallback<any[]>,
              prop1: PropertyKey,
              prop2: PropertyKey,
              prop3: PropertyKey,
              prop4: PropertyKey,
              ...props: PropertyKey[]
              ): void;
              };

                method getName

                getName: () => PropertyKey | null;

                  method getNode

                  getNode: (count?: number) => T | null;

                    method getParentNode

                    getParentNode: (count?: number) => T | null;

                      method getValue

                      getValue: () => T;

                        method map

                        map: {
                        <U>(callback: MapCallback<T, U>): U[];
                        <U, P1 extends IterProperties<T>>(
                        callback: MapCallback<IndexValue<T, P1>, U>,
                        prop1: P1
                        ): U[];
                        <U, P1 extends keyof T, P2 extends IterProperties<T[P1]>>(
                        callback: MapCallback<IndexValue<IndexValue<T, P1>, P2>, U>,
                        prop1: P1,
                        prop2: P2
                        ): U[];
                        <
                        U,
                        P1 extends keyof T,
                        P2 extends IterProperties<T[P1]>,
                        P3 extends IterProperties<IndexValue<T[P1], P2>>
                        >(
                        callback: MapCallback<
                        IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>,
                        U
                        >,
                        prop1: P1,
                        prop2: P2,
                        prop3: P3
                        ): U[];
                        <
                        U,
                        P1 extends keyof T,
                        P2 extends IterProperties<T[P1]>,
                        P3 extends IterProperties<IndexValue<T[P1], P2>>,
                        P4 extends IterProperties<IndexValue<IndexValue<T[P1], P2>, P3>>
                        >(
                        callback: MapCallback<
                        IndexValue<IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>, P4>,
                        U
                        >,
                        prop1: P1,
                        prop2: P2,
                        prop3: P3,
                        prop4: P4
                        ): U[];
                        <U>(
                        callback: MapCallback<any[], U>,
                        prop1: PropertyKey,
                        prop2: PropertyKey,
                        prop3: PropertyKey,
                        prop4: PropertyKey,
                        ...props: PropertyKey[]
                        ): U[];
                        };

                          method match

                          match: (
                          ...predicates: ((
                          node: any,
                          name: string | null,
                          number: number | null
                          ) => boolean)[]
                          ) => boolean;

                            Interfaces

                            interface BaseSupportOption

                            interface BaseSupportOption<Type extends SupportOptionType> {}

                              property category

                              category: string;

                              property deprecated

                              deprecated?: true | string | undefined;
                              • Indicate that the option is deprecated.

                                Use a string to add an extra message to --help for the option, for example to suggest a replacement option.

                              property description

                              description?: string | undefined;
                              • Description to be displayed in --help. If omitted, the option won't be shown at all in --help.

                              property name

                              readonly name?: string | undefined;

                                property since

                                since: string;

                                  property type

                                  type: Type;
                                  • The type of the option.

                                    When passing a type other than the ones listed below, the option is treated as taking any string as argument, and --option <${type}> will be displayed in --help.

                                  interface BooleanArraySupportOption

                                  interface BooleanArraySupportOption extends BaseSupportOption<'boolean'> {}

                                    property array

                                    array: true;

                                      property default

                                      default?: Array<{ value: boolean[] }> | undefined;

                                        interface BooleanSupportOption

                                        interface BooleanSupportOption extends BaseSupportOption<'boolean'> {}

                                          property array

                                          array?: false | undefined;

                                            property default

                                            default?: boolean | undefined;

                                              property description

                                              description: string;

                                                property oppositeDescription

                                                oppositeDescription?: string | undefined;

                                                  interface ChoiceSupportOption

                                                  interface ChoiceSupportOption<Value = any> extends BaseSupportOption<'choice'> {}

                                                    property choices

                                                    choices: Array<{
                                                    since?: string | undefined;
                                                    value: Value;
                                                    description: string;
                                                    }>;

                                                      property default

                                                      default?: Value | Array<{ since: string; value: Value }> | undefined;

                                                        property description

                                                        description: string;

                                                          interface Config

                                                          interface Config extends Options {}
                                                          • For use in .prettierrc.js, .prettierrc.cjs, prettier.config.js or prettier.config.cjs.

                                                          property overrides

                                                          overrides?: Array<{
                                                          files: string | string[];
                                                          excludeFiles?: string | string[];
                                                          options?: Options;
                                                          }>;

                                                            interface CursorOptions

                                                            interface CursorOptions extends Options {}

                                                              property cursorOffset

                                                              cursorOffset: number;
                                                              • Specify where the cursor is.

                                                              property rangeEnd

                                                              rangeEnd?: never;

                                                                property rangeStart

                                                                rangeStart?: never;

                                                                  interface CursorResult

                                                                  interface CursorResult {}

                                                                    property cursorOffset

                                                                    cursorOffset: number;

                                                                      property formatted

                                                                      formatted: string;

                                                                        interface FileInfoOptions

                                                                        interface FileInfoOptions {}

                                                                          property ignorePath

                                                                          ignorePath?: string | undefined;

                                                                            property plugins

                                                                            plugins?: string[] | undefined;

                                                                              property resolveConfig

                                                                              resolveConfig?: boolean | undefined;

                                                                                property withNodeModules

                                                                                withNodeModules?: boolean | undefined;

                                                                                  interface FileInfoResult

                                                                                  interface FileInfoResult {}

                                                                                    property ignored

                                                                                    ignored: boolean;

                                                                                      property inferredParser

                                                                                      inferredParser: string | null;

                                                                                        interface IntArraySupportOption

                                                                                        interface IntArraySupportOption extends BaseSupportOption<'int'> {}

                                                                                          property array

                                                                                          array: true;

                                                                                            property default

                                                                                            default?: Array<{ value: number[] }> | undefined;

                                                                                              interface IntSupportOption

                                                                                              interface IntSupportOption extends BaseSupportOption<'int'> {}

                                                                                                property array

                                                                                                array?: false | undefined;

                                                                                                  property default

                                                                                                  default?: number | undefined;

                                                                                                    property range

                                                                                                    range?: SupportOptionRange | undefined;

                                                                                                      interface Options

                                                                                                      interface Options extends Partial<RequiredOptions> {}

                                                                                                        interface Parser

                                                                                                        interface Parser<T = any> {}

                                                                                                          property astFormat

                                                                                                          astFormat: string;

                                                                                                            property hasPragma

                                                                                                            hasPragma?: ((text: string) => boolean) | undefined;

                                                                                                              property locEnd

                                                                                                              locEnd: (node: T) => number;

                                                                                                                property locStart

                                                                                                                locStart: (node: T) => number;

                                                                                                                  property parse

                                                                                                                  parse: (
                                                                                                                  text: string,
                                                                                                                  parsers: { [parserName: string]: Parser },
                                                                                                                  options: ParserOptions<T>
                                                                                                                  ) => T;

                                                                                                                    property preprocess

                                                                                                                    preprocess?: ((text: string, options: ParserOptions<T>) => string) | undefined;

                                                                                                                      interface ParserOptions

                                                                                                                      interface ParserOptions<T = any> extends RequiredOptions {}

                                                                                                                        property locEnd

                                                                                                                        locEnd: (node: T) => number;

                                                                                                                          property locStart

                                                                                                                          locStart: (node: T) => number;

                                                                                                                            property originalText

                                                                                                                            originalText: string;

                                                                                                                              interface PathArraySupportOption

                                                                                                                              interface PathArraySupportOption extends BaseSupportOption<'path'> {}

                                                                                                                                property array

                                                                                                                                array: true;

                                                                                                                                  property default

                                                                                                                                  default?: Array<{ value: string[] }> | undefined;

                                                                                                                                    interface PathSupportOption

                                                                                                                                    interface PathSupportOption extends BaseSupportOption<'path'> {}

                                                                                                                                      property array

                                                                                                                                      array?: false | undefined;

                                                                                                                                        property default

                                                                                                                                        default?: string | undefined;

                                                                                                                                          interface Plugin

                                                                                                                                          interface Plugin<T = any> {}

                                                                                                                                            property defaultOptions

                                                                                                                                            defaultOptions?: Partial<RequiredOptions> | undefined;

                                                                                                                                              property languages

                                                                                                                                              languages?: SupportLanguage[] | undefined;

                                                                                                                                                property options

                                                                                                                                                options?: SupportOptions | undefined;

                                                                                                                                                  property parsers

                                                                                                                                                  parsers?: { [parserName: string]: Parser<T> } | undefined;

                                                                                                                                                    property printers

                                                                                                                                                    printers?: { [astFormat: string]: Printer<T> } | undefined;

                                                                                                                                                      interface Printer

                                                                                                                                                      interface Printer<T = any> {}

                                                                                                                                                        property canAttachComment

                                                                                                                                                        canAttachComment?: ((node: T) => boolean) | undefined;

                                                                                                                                                          property embed

                                                                                                                                                          embed?:
                                                                                                                                                          | ((
                                                                                                                                                          path: AstPath<T>,
                                                                                                                                                          print: (path: AstPath<T>) => Doc,
                                                                                                                                                          textToDoc: (text: string, options: Options) => Doc,
                                                                                                                                                          options: ParserOptions<T>
                                                                                                                                                          ) => Doc | null)
                                                                                                                                                          | undefined;

                                                                                                                                                            property handleComments

                                                                                                                                                            handleComments?:
                                                                                                                                                            | {
                                                                                                                                                            ownLine?:
                                                                                                                                                            | ((
                                                                                                                                                            commentNode: any,
                                                                                                                                                            text: string,
                                                                                                                                                            options: ParserOptions<T>,
                                                                                                                                                            ast: T,
                                                                                                                                                            isLastComment: boolean
                                                                                                                                                            ) => boolean)
                                                                                                                                                            | undefined;
                                                                                                                                                            endOfLine?:
                                                                                                                                                            | ((
                                                                                                                                                            commentNode: any,
                                                                                                                                                            text: string,
                                                                                                                                                            options: ParserOptions<T>,
                                                                                                                                                            ast: T,
                                                                                                                                                            isLastComment: boolean
                                                                                                                                                            ) => boolean)
                                                                                                                                                            | undefined;
                                                                                                                                                            remaining?:
                                                                                                                                                            | ((
                                                                                                                                                            commentNode: any,
                                                                                                                                                            text: string,
                                                                                                                                                            options: ParserOptions<T>,
                                                                                                                                                            ast: T,
                                                                                                                                                            isLastComment: boolean
                                                                                                                                                            ) => boolean)
                                                                                                                                                            | undefined;
                                                                                                                                                            }
                                                                                                                                                            | undefined;

                                                                                                                                                              property hasPrettierIgnore

                                                                                                                                                              hasPrettierIgnore?: ((path: AstPath<T>) => boolean) | undefined;

                                                                                                                                                                property insertPragma

                                                                                                                                                                insertPragma?: ((text: string) => string) | undefined;

                                                                                                                                                                  property isBlockComment

                                                                                                                                                                  isBlockComment?: ((node: T) => boolean) | undefined;

                                                                                                                                                                    property massageAstNode

                                                                                                                                                                    massageAstNode?: ((node: any, newNode: any, parent: any) => any) | undefined;
                                                                                                                                                                    • Returns

                                                                                                                                                                      anything if you want to replace the node with it

                                                                                                                                                                    property printComment

                                                                                                                                                                    printComment?:
                                                                                                                                                                    | ((commentPath: AstPath<T>, options: ParserOptions<T>) => Doc)
                                                                                                                                                                    | undefined;

                                                                                                                                                                      property willPrintOwnComments

                                                                                                                                                                      willPrintOwnComments?: ((path: AstPath<T>) => boolean) | undefined;

                                                                                                                                                                        method print

                                                                                                                                                                        print: (
                                                                                                                                                                        path: AstPath<T>,
                                                                                                                                                                        options: ParserOptions<T>,
                                                                                                                                                                        print: (path: AstPath<T>) => Doc
                                                                                                                                                                        ) => Doc;

                                                                                                                                                                          interface RequiredOptions

                                                                                                                                                                          interface RequiredOptions extends doc.printer.Options {}

                                                                                                                                                                            property arrowParens

                                                                                                                                                                            arrowParens: 'avoid' | 'always';
                                                                                                                                                                            • Include parentheses around a sole arrow function parameter. 'always'

                                                                                                                                                                            property bracketSameLine

                                                                                                                                                                            bracketSameLine: boolean;
                                                                                                                                                                            • Put the > of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line instead of being alone on the next line (does not apply to self closing elements). false

                                                                                                                                                                            property bracketSpacing

                                                                                                                                                                            bracketSpacing: boolean;
                                                                                                                                                                            • Print spaces between brackets in object literals. true

                                                                                                                                                                            property embeddedLanguageFormatting

                                                                                                                                                                            embeddedLanguageFormatting: 'auto' | 'off';
                                                                                                                                                                            • Control whether Prettier formats quoted code embedded in the file. 'auto'

                                                                                                                                                                            property endOfLine

                                                                                                                                                                            endOfLine: 'auto' | 'lf' | 'crlf' | 'cr';
                                                                                                                                                                            • Which end of line characters to apply. 'lf'

                                                                                                                                                                            property filepath

                                                                                                                                                                            filepath: string;
                                                                                                                                                                            • Specify the input filepath. This will be used to do parser inference.

                                                                                                                                                                            property htmlWhitespaceSensitivity

                                                                                                                                                                            htmlWhitespaceSensitivity: 'css' | 'strict' | 'ignore';
                                                                                                                                                                            • How to handle whitespaces in HTML. 'css'

                                                                                                                                                                            property insertPragma

                                                                                                                                                                            insertPragma: boolean;
                                                                                                                                                                            • Prettier can insert a special marker at the top of files specifying that the file has been formatted with prettier. This works well when used in tandem with the --require-pragma option. If there is already a docblock at the top of the file then this option will add a newline to it with the marker. false

                                                                                                                                                                            property jsxBracketSameLine

                                                                                                                                                                            jsxBracketSameLine: boolean;
                                                                                                                                                                            • Put the > of a multi-line JSX element at the end of the last line instead of being alone on the next line. false

                                                                                                                                                                              Deprecated

                                                                                                                                                                              use bracketSameLine instead

                                                                                                                                                                            property jsxSingleQuote

                                                                                                                                                                            jsxSingleQuote: boolean;
                                                                                                                                                                            • Use single quotes in JSX. false

                                                                                                                                                                            property parser

                                                                                                                                                                            parser: LiteralUnion<BuiltInParserName> | CustomParser;
                                                                                                                                                                            • Specify which parser to use.

                                                                                                                                                                            property plugins

                                                                                                                                                                            plugins: Array<string | Plugin>;
                                                                                                                                                                            • Provide ability to support new languages to prettier.

                                                                                                                                                                            property pluginSearchDirs

                                                                                                                                                                            pluginSearchDirs: string[] | false;
                                                                                                                                                                            • Specify plugin directory paths to search for plugins if not installed in the same node_modules where prettier is located.

                                                                                                                                                                            property proseWrap

                                                                                                                                                                            proseWrap: 'always' | 'never' | 'preserve';
                                                                                                                                                                            • By default, Prettier will wrap markdown text as-is since some services use a linebreak-sensitive renderer. In some cases you may want to rely on editor/viewer soft wrapping instead, so this option allows you to opt out. 'preserve'

                                                                                                                                                                            property quoteProps

                                                                                                                                                                            quoteProps: 'as-needed' | 'consistent' | 'preserve';
                                                                                                                                                                            • Change when properties in objects are quoted. 'as-needed'

                                                                                                                                                                            property rangeEnd

                                                                                                                                                                            rangeEnd: number;
                                                                                                                                                                            • Format only a segment of a file. Infinity

                                                                                                                                                                            property rangeStart

                                                                                                                                                                            rangeStart: number;
                                                                                                                                                                            • Format only a segment of a file. 0

                                                                                                                                                                            property requirePragma

                                                                                                                                                                            requirePragma: boolean;
                                                                                                                                                                            • Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file. This is very useful when gradually transitioning large, unformatted codebases to prettier. false

                                                                                                                                                                            property semi

                                                                                                                                                                            semi: boolean;
                                                                                                                                                                            • Print semicolons at the ends of statements. true

                                                                                                                                                                            property singleAttributePerLine

                                                                                                                                                                            singleAttributePerLine: boolean;
                                                                                                                                                                            • Enforce single attribute per line in HTML, Vue and JSX. false

                                                                                                                                                                            property singleQuote

                                                                                                                                                                            singleQuote: boolean;
                                                                                                                                                                            • Use single quotes instead of double quotes. false

                                                                                                                                                                            property trailingComma

                                                                                                                                                                            trailingComma: 'none' | 'es5' | 'all';
                                                                                                                                                                            • Print trailing commas wherever possible. 'es5'

                                                                                                                                                                            property vueIndentScriptAndStyle

                                                                                                                                                                            vueIndentScriptAndStyle: boolean;
                                                                                                                                                                            • Whether or not to indent the code inside and tags in Vue files. false

                                                                                                                                                                            interface ResolveConfigOptions

                                                                                                                                                                            interface ResolveConfigOptions {}

                                                                                                                                                                              property config

                                                                                                                                                                              config?: string | undefined;
                                                                                                                                                                              • Pass directly the path of the config file if you don't wish to search for it.

                                                                                                                                                                              property editorconfig

                                                                                                                                                                              editorconfig?: boolean | undefined;
                                                                                                                                                                              • If set to true and an .editorconfig file is in your project, Prettier will parse it and convert its properties to the corresponding prettier configuration. This configuration will be overridden by .prettierrc, etc. Currently, the following EditorConfig properties are supported: - indent_style - indent_size/tab_width - max_line_length

                                                                                                                                                                              property useCache

                                                                                                                                                                              useCache?: boolean | undefined;
                                                                                                                                                                              • If set to false, all caching will be bypassed.

                                                                                                                                                                              interface SupportInfo

                                                                                                                                                                              interface SupportInfo {}

                                                                                                                                                                                property languages

                                                                                                                                                                                languages: SupportLanguage[];

                                                                                                                                                                                  property options

                                                                                                                                                                                  options: SupportOption[];

                                                                                                                                                                                    interface SupportLanguage

                                                                                                                                                                                    interface SupportLanguage {}

                                                                                                                                                                                      property aceMode

                                                                                                                                                                                      aceMode?: string | undefined;

                                                                                                                                                                                        property aliases

                                                                                                                                                                                        aliases?: string[] | undefined;

                                                                                                                                                                                          property codemirrorMimeType

                                                                                                                                                                                          codemirrorMimeType?: string | undefined;

                                                                                                                                                                                            property codemirrorMode

                                                                                                                                                                                            codemirrorMode?: string | undefined;

                                                                                                                                                                                              property extensions

                                                                                                                                                                                              extensions?: string[] | undefined;

                                                                                                                                                                                                property filenames

                                                                                                                                                                                                filenames?: string[] | undefined;

                                                                                                                                                                                                  property group

                                                                                                                                                                                                  group?: string | undefined;

                                                                                                                                                                                                    property linguistLanguageId

                                                                                                                                                                                                    linguistLanguageId?: number | undefined;

                                                                                                                                                                                                      property name

                                                                                                                                                                                                      name: string;

                                                                                                                                                                                                        property parsers

                                                                                                                                                                                                        parsers: BuiltInParserName[] | string[];

                                                                                                                                                                                                          property since

                                                                                                                                                                                                          since?: string | undefined;

                                                                                                                                                                                                            property tmScope

                                                                                                                                                                                                            tmScope?: string | undefined;

                                                                                                                                                                                                              property vscodeLanguageIds

                                                                                                                                                                                                              vscodeLanguageIds?: string[] | undefined;

                                                                                                                                                                                                                interface SupportOptionRange

                                                                                                                                                                                                                interface SupportOptionRange {}

                                                                                                                                                                                                                  property end

                                                                                                                                                                                                                  end: number;

                                                                                                                                                                                                                    property start

                                                                                                                                                                                                                    start: number;

                                                                                                                                                                                                                      property step

                                                                                                                                                                                                                      step: number;

                                                                                                                                                                                                                        interface SupportOptions

                                                                                                                                                                                                                        interface SupportOptions extends Record<string, SupportOption> {}

                                                                                                                                                                                                                          Type Aliases

                                                                                                                                                                                                                          type AST

                                                                                                                                                                                                                          type AST = any;

                                                                                                                                                                                                                            type BuiltInParser

                                                                                                                                                                                                                            type BuiltInParser = (text: string, options?: any) => AST;

                                                                                                                                                                                                                              type BuiltInParserName

                                                                                                                                                                                                                              type BuiltInParserName =
                                                                                                                                                                                                                              | 'angular'
                                                                                                                                                                                                                              | 'babel-flow'
                                                                                                                                                                                                                              | 'babel-ts'
                                                                                                                                                                                                                              | 'babel'
                                                                                                                                                                                                                              | 'css'
                                                                                                                                                                                                                              | 'espree'
                                                                                                                                                                                                                              | 'flow'
                                                                                                                                                                                                                              | 'glimmer'
                                                                                                                                                                                                                              | 'graphql'
                                                                                                                                                                                                                              | 'html'
                                                                                                                                                                                                                              | 'json-stringify'
                                                                                                                                                                                                                              | 'json'
                                                                                                                                                                                                                              | 'json5'
                                                                                                                                                                                                                              | 'less'
                                                                                                                                                                                                                              | 'lwc'
                                                                                                                                                                                                                              | 'markdown'
                                                                                                                                                                                                                              | 'mdx'
                                                                                                                                                                                                                              | 'meriyah'
                                                                                                                                                                                                                              | 'scss'
                                                                                                                                                                                                                              | 'typescript'
                                                                                                                                                                                                                              | 'vue'
                                                                                                                                                                                                                              | 'yaml';

                                                                                                                                                                                                                                type BuiltInParsers

                                                                                                                                                                                                                                type BuiltInParsers = Record<BuiltInParserName, BuiltInParser>;

                                                                                                                                                                                                                                  type CoreCategoryType

                                                                                                                                                                                                                                  type CoreCategoryType =
                                                                                                                                                                                                                                  | 'Config'
                                                                                                                                                                                                                                  | 'Editor'
                                                                                                                                                                                                                                  | 'Format'
                                                                                                                                                                                                                                  | 'Other'
                                                                                                                                                                                                                                  | 'Output'
                                                                                                                                                                                                                                  | 'Global'
                                                                                                                                                                                                                                  | 'Special';

                                                                                                                                                                                                                                    type CustomParser

                                                                                                                                                                                                                                    type CustomParser = (text: string, parsers: BuiltInParsers, options: Options) => AST;

                                                                                                                                                                                                                                      type Doc

                                                                                                                                                                                                                                      type Doc = doc.builders.Doc;

                                                                                                                                                                                                                                        type FastPath

                                                                                                                                                                                                                                        type FastPath<T = any> = AstPath<T>;
                                                                                                                                                                                                                                        • Deprecated

                                                                                                                                                                                                                                          FastPath was renamed to AstPath

                                                                                                                                                                                                                                        type LiteralUnion

                                                                                                                                                                                                                                        type LiteralUnion<T extends U, U = string> =
                                                                                                                                                                                                                                        | T
                                                                                                                                                                                                                                        | (Pick<U, never> & { _?: never | undefined });

                                                                                                                                                                                                                                          type SupportOption

                                                                                                                                                                                                                                          type SupportOption =
                                                                                                                                                                                                                                          | IntSupportOption
                                                                                                                                                                                                                                          | IntArraySupportOption
                                                                                                                                                                                                                                          | BooleanSupportOption
                                                                                                                                                                                                                                          | BooleanArraySupportOption
                                                                                                                                                                                                                                          | ChoiceSupportOption
                                                                                                                                                                                                                                          | PathSupportOption
                                                                                                                                                                                                                                          | PathArraySupportOption;

                                                                                                                                                                                                                                            type SupportOptionType

                                                                                                                                                                                                                                            type SupportOptionType = 'int' | 'boolean' | 'choice' | 'path';

                                                                                                                                                                                                                                              Namespaces

                                                                                                                                                                                                                                              namespace doc

                                                                                                                                                                                                                                              namespace doc {}

                                                                                                                                                                                                                                                namespace doc.builders

                                                                                                                                                                                                                                                namespace doc.builders {}

                                                                                                                                                                                                                                                  variable breakParent

                                                                                                                                                                                                                                                  const breakParent: BreakParent;
                                                                                                                                                                                                                                                  • See Also

                                                                                                                                                                                                                                                    • [breakParent](https://github.com/prettier/prettier/blob/main/commands.md#breakparent)

                                                                                                                                                                                                                                                  variable cursor

                                                                                                                                                                                                                                                  const cursor: Cursor;
                                                                                                                                                                                                                                                  • See Also

                                                                                                                                                                                                                                                    • [cursor](https://github.com/prettier/prettier/blob/main/commands.md#cursor)

                                                                                                                                                                                                                                                  variable hardline

                                                                                                                                                                                                                                                  const hardline: Concat;
                                                                                                                                                                                                                                                  • See Also

                                                                                                                                                                                                                                                    • [hardline](https://github.com/prettier/prettier/blob/main/commands.md#hardline)

                                                                                                                                                                                                                                                  variable hardlineWithoutBreakParent

                                                                                                                                                                                                                                                  const hardlineWithoutBreakParent: HardlineWithoutBreakParent;
                                                                                                                                                                                                                                                  • See Also

                                                                                                                                                                                                                                                    • [hardlineWithoutBreakParent](https://github.com/prettier/prettier/blob/main/commands.md#hardlinewithoutbreakparent-and-literallinewithoutbreakparent)

                                                                                                                                                                                                                                                  variable line

                                                                                                                                                                                                                                                  const line: Line;
                                                                                                                                                                                                                                                  • See Also

                                                                                                                                                                                                                                                    • [line](https://github.com/prettier/prettier/blob/main/commands.md#line)

                                                                                                                                                                                                                                                  variable lineSuffixBoundary

                                                                                                                                                                                                                                                  const lineSuffixBoundary: LineSuffixBoundary;
                                                                                                                                                                                                                                                  • See Also

                                                                                                                                                                                                                                                    • [lineSuffixBoundary](https://github.com/prettier/prettier/blob/main/commands.md#linesuffixboundary)

                                                                                                                                                                                                                                                  variable literalline

                                                                                                                                                                                                                                                  const literalline: Concat;
                                                                                                                                                                                                                                                  • See Also

                                                                                                                                                                                                                                                    • [literalline](https://github.com/prettier/prettier/blob/main/commands.md#literalline)

                                                                                                                                                                                                                                                  variable literallineWithoutBreakParent

                                                                                                                                                                                                                                                  const literallineWithoutBreakParent: LiterallineWithoutBreakParent;
                                                                                                                                                                                                                                                  • See Also

                                                                                                                                                                                                                                                    • [literallineWithoutBreakParent](https://github.com/prettier/prettier/blob/main/commands.md#hardlinewithoutbreakparent-and-literallinewithoutbreakparent)

                                                                                                                                                                                                                                                  variable softline

                                                                                                                                                                                                                                                  const softline: Softline;
                                                                                                                                                                                                                                                  • See Also

                                                                                                                                                                                                                                                    • [softline](https://github.com/prettier/prettier/blob/main/commands.md#softline)

                                                                                                                                                                                                                                                  variable trim

                                                                                                                                                                                                                                                  const trim: Trim;
                                                                                                                                                                                                                                                  • See Also

                                                                                                                                                                                                                                                    • [trim](https://github.com/prettier/prettier/blob/main/commands.md#trim)

                                                                                                                                                                                                                                                  function addAlignmentToDoc

                                                                                                                                                                                                                                                  addAlignmentToDoc: (doc: Doc, size: number, tabWidth: number) => Doc;

                                                                                                                                                                                                                                                    function align

                                                                                                                                                                                                                                                    align: (widthOrString: Align['n'], doc: Doc) => Align;
                                                                                                                                                                                                                                                    • See Also

                                                                                                                                                                                                                                                      • [align](https://github.com/prettier/prettier/blob/main/commands.md#align)

                                                                                                                                                                                                                                                    function concat

                                                                                                                                                                                                                                                    concat: (docs: Doc[]) => Concat;
                                                                                                                                                                                                                                                    • See Also

                                                                                                                                                                                                                                                      • [concat](https://github.com/prettier/prettier/blob/main/commands.md#deprecated-concat)

                                                                                                                                                                                                                                                      Deprecated

                                                                                                                                                                                                                                                      use Doc[] instead

                                                                                                                                                                                                                                                    function conditionalGroup

                                                                                                                                                                                                                                                    conditionalGroup: (alternatives: Doc[], options?: GroupOptions) => Group;
                                                                                                                                                                                                                                                    • See Also

                                                                                                                                                                                                                                                      • [conditionalGroup](https://github.com/prettier/prettier/blob/main/commands.md#conditionalgroup)

                                                                                                                                                                                                                                                    function dedent

                                                                                                                                                                                                                                                    dedent: (doc: Doc) => Align;
                                                                                                                                                                                                                                                    • See Also

                                                                                                                                                                                                                                                      • [dedent](https://github.com/prettier/prettier/blob/main/commands.md#dedent)

                                                                                                                                                                                                                                                    function dedentToRoot

                                                                                                                                                                                                                                                    dedentToRoot: (doc: Doc) => Align;
                                                                                                                                                                                                                                                    • See Also

                                                                                                                                                                                                                                                      • [dedentToRoot](https://github.com/prettier/prettier/blob/main/commands.md#dedenttoroot)

                                                                                                                                                                                                                                                    function fill

                                                                                                                                                                                                                                                    fill: (docs: Doc[]) => Fill;
                                                                                                                                                                                                                                                    • See Also

                                                                                                                                                                                                                                                      • [fill](https://github.com/prettier/prettier/blob/main/commands.md#fill)

                                                                                                                                                                                                                                                    function group

                                                                                                                                                                                                                                                    group: (doc: Doc, opts?: GroupOptions) => Group;
                                                                                                                                                                                                                                                    • See Also

                                                                                                                                                                                                                                                      • [group](https://github.com/prettier/prettier/blob/main/commands.md#group)

                                                                                                                                                                                                                                                    function ifBreak

                                                                                                                                                                                                                                                    ifBreak: (
                                                                                                                                                                                                                                                    ifBreak: Doc,
                                                                                                                                                                                                                                                    noBreak?: Doc,
                                                                                                                                                                                                                                                    options?: { groupId?: symbol | undefined }
                                                                                                                                                                                                                                                    ) => IfBreak;
                                                                                                                                                                                                                                                    • See Also

                                                                                                                                                                                                                                                      • [ifBreak](https://github.com/prettier/prettier/blob/main/commands.md#ifbreak)

                                                                                                                                                                                                                                                    function indent

                                                                                                                                                                                                                                                    indent: (doc: Doc) => Indent;
                                                                                                                                                                                                                                                    • See Also

                                                                                                                                                                                                                                                      • [indent](https://github.com/prettier/prettier/blob/main/commands.md#indent)

                                                                                                                                                                                                                                                    function indentIfBreak

                                                                                                                                                                                                                                                    indentIfBreak: (
                                                                                                                                                                                                                                                    doc: Doc,
                                                                                                                                                                                                                                                    opts: { groupId: symbol; negate?: boolean | undefined }
                                                                                                                                                                                                                                                    ) => IndentIfBreak;
                                                                                                                                                                                                                                                    • See Also

                                                                                                                                                                                                                                                      • [indentIfBreak](https://github.com/prettier/prettier/blob/main/commands.md#indentifbreak)

                                                                                                                                                                                                                                                    function join

                                                                                                                                                                                                                                                    join: (sep: Doc, docs: Doc[]) => Concat;
                                                                                                                                                                                                                                                    • See Also

                                                                                                                                                                                                                                                      • [join](https://github.com/prettier/prettier/blob/main/commands.md#join)

                                                                                                                                                                                                                                                    function label

                                                                                                                                                                                                                                                    label: (label: string, doc: Doc) => Label;
                                                                                                                                                                                                                                                    • See Also

                                                                                                                                                                                                                                                      • [label](https://github.com/prettier/prettier/blob/main/commands.md#label)

                                                                                                                                                                                                                                                    function lineSuffix

                                                                                                                                                                                                                                                    lineSuffix: (suffix: Doc) => LineSuffix;
                                                                                                                                                                                                                                                    • See Also

                                                                                                                                                                                                                                                      • [lineSuffix](https://github.com/prettier/prettier/blob/main/commands.md#linesuffix)

                                                                                                                                                                                                                                                    function markAsRoot

                                                                                                                                                                                                                                                    markAsRoot: (doc: Doc) => Align;
                                                                                                                                                                                                                                                    • See Also

                                                                                                                                                                                                                                                      • [markAsRoot](https://github.com/prettier/prettier/blob/main/commands.md#markasroot)

                                                                                                                                                                                                                                                    interface Align

                                                                                                                                                                                                                                                    interface Align {}

                                                                                                                                                                                                                                                      property contents

                                                                                                                                                                                                                                                      contents: Doc;

                                                                                                                                                                                                                                                        property n

                                                                                                                                                                                                                                                        n: number | string | { type: 'root' };

                                                                                                                                                                                                                                                          property type

                                                                                                                                                                                                                                                          type: 'align';

                                                                                                                                                                                                                                                            interface BreakParent

                                                                                                                                                                                                                                                            interface BreakParent {}

                                                                                                                                                                                                                                                              property type

                                                                                                                                                                                                                                                              type: 'break-parent';

                                                                                                                                                                                                                                                                interface Concat

                                                                                                                                                                                                                                                                interface Concat {}

                                                                                                                                                                                                                                                                  property parts

                                                                                                                                                                                                                                                                  parts: Doc[];

                                                                                                                                                                                                                                                                    property type

                                                                                                                                                                                                                                                                    type: 'concat';

                                                                                                                                                                                                                                                                      interface Cursor

                                                                                                                                                                                                                                                                      interface Cursor {}

                                                                                                                                                                                                                                                                        property placeholder

                                                                                                                                                                                                                                                                        placeholder: symbol;

                                                                                                                                                                                                                                                                          property type

                                                                                                                                                                                                                                                                          type: 'cursor';

                                                                                                                                                                                                                                                                            interface Fill

                                                                                                                                                                                                                                                                            interface Fill {}

                                                                                                                                                                                                                                                                              property parts

                                                                                                                                                                                                                                                                              parts: Doc[];

                                                                                                                                                                                                                                                                                property type

                                                                                                                                                                                                                                                                                type: 'fill';

                                                                                                                                                                                                                                                                                  interface Group

                                                                                                                                                                                                                                                                                  interface Group {}

                                                                                                                                                                                                                                                                                    property break

                                                                                                                                                                                                                                                                                    break: boolean;

                                                                                                                                                                                                                                                                                      property contents

                                                                                                                                                                                                                                                                                      contents: Doc;

                                                                                                                                                                                                                                                                                        property expandedStates

                                                                                                                                                                                                                                                                                        expandedStates: Doc[];

                                                                                                                                                                                                                                                                                          property type

                                                                                                                                                                                                                                                                                          type: 'group';

                                                                                                                                                                                                                                                                                            interface GroupOptions

                                                                                                                                                                                                                                                                                            interface GroupOptions {}

                                                                                                                                                                                                                                                                                              property id

                                                                                                                                                                                                                                                                                              id?: symbol | undefined;

                                                                                                                                                                                                                                                                                                property shouldBreak

                                                                                                                                                                                                                                                                                                shouldBreak?: boolean | undefined;

                                                                                                                                                                                                                                                                                                  interface HardlineWithoutBreakParent

                                                                                                                                                                                                                                                                                                  interface HardlineWithoutBreakParent extends Line {}

                                                                                                                                                                                                                                                                                                    property hard

                                                                                                                                                                                                                                                                                                    hard: true;

                                                                                                                                                                                                                                                                                                      interface IfBreak

                                                                                                                                                                                                                                                                                                      interface IfBreak {}

                                                                                                                                                                                                                                                                                                        property breakContents

                                                                                                                                                                                                                                                                                                        breakContents: Doc;

                                                                                                                                                                                                                                                                                                          property flatContents

                                                                                                                                                                                                                                                                                                          flatContents: Doc;

                                                                                                                                                                                                                                                                                                            property type

                                                                                                                                                                                                                                                                                                            type: 'if-break';

                                                                                                                                                                                                                                                                                                              interface Indent

                                                                                                                                                                                                                                                                                                              interface Indent {}

                                                                                                                                                                                                                                                                                                                property contents

                                                                                                                                                                                                                                                                                                                contents: Doc;

                                                                                                                                                                                                                                                                                                                  property type

                                                                                                                                                                                                                                                                                                                  type: 'indent';

                                                                                                                                                                                                                                                                                                                    interface IndentIfBreak

                                                                                                                                                                                                                                                                                                                    interface IndentIfBreak {}

                                                                                                                                                                                                                                                                                                                      property type

                                                                                                                                                                                                                                                                                                                      type: 'indent-if-break';

                                                                                                                                                                                                                                                                                                                        interface Label

                                                                                                                                                                                                                                                                                                                        interface Label {}

                                                                                                                                                                                                                                                                                                                          property type

                                                                                                                                                                                                                                                                                                                          type: 'label';

                                                                                                                                                                                                                                                                                                                            interface Line

                                                                                                                                                                                                                                                                                                                            interface Line {}

                                                                                                                                                                                                                                                                                                                              property hard

                                                                                                                                                                                                                                                                                                                              hard?: boolean | undefined;

                                                                                                                                                                                                                                                                                                                                property literal

                                                                                                                                                                                                                                                                                                                                literal?: boolean | undefined;

                                                                                                                                                                                                                                                                                                                                  property soft

                                                                                                                                                                                                                                                                                                                                  soft?: boolean | undefined;

                                                                                                                                                                                                                                                                                                                                    property type

                                                                                                                                                                                                                                                                                                                                    type: 'line';

                                                                                                                                                                                                                                                                                                                                      interface LineSuffix

                                                                                                                                                                                                                                                                                                                                      interface LineSuffix {}

                                                                                                                                                                                                                                                                                                                                        property contents

                                                                                                                                                                                                                                                                                                                                        contents: Doc;

                                                                                                                                                                                                                                                                                                                                          property type

                                                                                                                                                                                                                                                                                                                                          type: 'line-suffix';

                                                                                                                                                                                                                                                                                                                                            interface LineSuffixBoundary

                                                                                                                                                                                                                                                                                                                                            interface LineSuffixBoundary {}

                                                                                                                                                                                                                                                                                                                                              property type

                                                                                                                                                                                                                                                                                                                                              type: 'line-suffix-boundary';

                                                                                                                                                                                                                                                                                                                                                interface LiterallineWithoutBreakParent

                                                                                                                                                                                                                                                                                                                                                interface LiterallineWithoutBreakParent extends Line {}

                                                                                                                                                                                                                                                                                                                                                  property hard

                                                                                                                                                                                                                                                                                                                                                  hard: true;

                                                                                                                                                                                                                                                                                                                                                    property literal

                                                                                                                                                                                                                                                                                                                                                    literal: true;

                                                                                                                                                                                                                                                                                                                                                      interface Softline

                                                                                                                                                                                                                                                                                                                                                      interface Softline extends Line {}

                                                                                                                                                                                                                                                                                                                                                        property soft

                                                                                                                                                                                                                                                                                                                                                        soft: true;

                                                                                                                                                                                                                                                                                                                                                          interface Trim

                                                                                                                                                                                                                                                                                                                                                          interface Trim {}

                                                                                                                                                                                                                                                                                                                                                            property type

                                                                                                                                                                                                                                                                                                                                                            type: 'trim';

                                                                                                                                                                                                                                                                                                                                                              type Doc

                                                                                                                                                                                                                                                                                                                                                              type Doc = string | Doc[] | DocCommand;

                                                                                                                                                                                                                                                                                                                                                                type DocCommand

                                                                                                                                                                                                                                                                                                                                                                type DocCommand =
                                                                                                                                                                                                                                                                                                                                                                | Align
                                                                                                                                                                                                                                                                                                                                                                | BreakParent
                                                                                                                                                                                                                                                                                                                                                                | Concat
                                                                                                                                                                                                                                                                                                                                                                | Cursor
                                                                                                                                                                                                                                                                                                                                                                | Fill
                                                                                                                                                                                                                                                                                                                                                                | Group
                                                                                                                                                                                                                                                                                                                                                                | IfBreak
                                                                                                                                                                                                                                                                                                                                                                | Indent
                                                                                                                                                                                                                                                                                                                                                                | IndentIfBreak
                                                                                                                                                                                                                                                                                                                                                                | Label
                                                                                                                                                                                                                                                                                                                                                                | Line
                                                                                                                                                                                                                                                                                                                                                                | LineSuffix
                                                                                                                                                                                                                                                                                                                                                                | LineSuffixBoundary
                                                                                                                                                                                                                                                                                                                                                                | Trim;

                                                                                                                                                                                                                                                                                                                                                                  namespace doc.debug

                                                                                                                                                                                                                                                                                                                                                                  namespace doc.debug {}

                                                                                                                                                                                                                                                                                                                                                                    function printDocToDebug

                                                                                                                                                                                                                                                                                                                                                                    printDocToDebug: (doc: Doc) => string;

                                                                                                                                                                                                                                                                                                                                                                      namespace doc.printer

                                                                                                                                                                                                                                                                                                                                                                      namespace doc.printer {}

                                                                                                                                                                                                                                                                                                                                                                        function printDocToString

                                                                                                                                                                                                                                                                                                                                                                        printDocToString: (
                                                                                                                                                                                                                                                                                                                                                                        doc: Doc,
                                                                                                                                                                                                                                                                                                                                                                        options: Options
                                                                                                                                                                                                                                                                                                                                                                        ) => {
                                                                                                                                                                                                                                                                                                                                                                        formatted: string;
                                                                                                                                                                                                                                                                                                                                                                        cursorNodeStart?: number | undefined;
                                                                                                                                                                                                                                                                                                                                                                        cursorNodeText?: string | undefined;
                                                                                                                                                                                                                                                                                                                                                                        };

                                                                                                                                                                                                                                                                                                                                                                          interface Options

                                                                                                                                                                                                                                                                                                                                                                          interface Options {}

                                                                                                                                                                                                                                                                                                                                                                            property parentParser

                                                                                                                                                                                                                                                                                                                                                                            parentParser?: string | undefined;

                                                                                                                                                                                                                                                                                                                                                                              property printWidth

                                                                                                                                                                                                                                                                                                                                                                              printWidth: number;
                                                                                                                                                                                                                                                                                                                                                                              • Specify the line length that the printer will wrap on. 80

                                                                                                                                                                                                                                                                                                                                                                              property tabWidth

                                                                                                                                                                                                                                                                                                                                                                              tabWidth: number;
                                                                                                                                                                                                                                                                                                                                                                              • Specify the number of spaces per indentation-level. 2

                                                                                                                                                                                                                                                                                                                                                                              property useTabs

                                                                                                                                                                                                                                                                                                                                                                              useTabs: boolean;
                                                                                                                                                                                                                                                                                                                                                                              • Indent lines with tabs instead of spaces false

                                                                                                                                                                                                                                                                                                                                                                              namespace doc.utils

                                                                                                                                                                                                                                                                                                                                                                              namespace doc.utils {}

                                                                                                                                                                                                                                                                                                                                                                                function cleanDoc

                                                                                                                                                                                                                                                                                                                                                                                cleanDoc: (doc: Doc) => Doc;

                                                                                                                                                                                                                                                                                                                                                                                  function findInDoc

                                                                                                                                                                                                                                                                                                                                                                                  findInDoc: <T = builders.Doc>(
                                                                                                                                                                                                                                                                                                                                                                                  doc: Doc,
                                                                                                                                                                                                                                                                                                                                                                                  callback: (doc: Doc) => T,
                                                                                                                                                                                                                                                                                                                                                                                  defaultValue: T
                                                                                                                                                                                                                                                                                                                                                                                  ) => T;

                                                                                                                                                                                                                                                                                                                                                                                    function getDocParts

                                                                                                                                                                                                                                                                                                                                                                                    getDocParts: (doc: Doc) => Doc;

                                                                                                                                                                                                                                                                                                                                                                                      function isConcat

                                                                                                                                                                                                                                                                                                                                                                                      isConcat: (doc: Doc) => boolean;

                                                                                                                                                                                                                                                                                                                                                                                        function isEmpty

                                                                                                                                                                                                                                                                                                                                                                                        isEmpty: (doc: Doc) => boolean;

                                                                                                                                                                                                                                                                                                                                                                                          function isLineNext

                                                                                                                                                                                                                                                                                                                                                                                          isLineNext: (doc: Doc) => boolean;

                                                                                                                                                                                                                                                                                                                                                                                            function mapDoc

                                                                                                                                                                                                                                                                                                                                                                                            mapDoc: <T = builders.Doc>(doc: Doc, callback: (doc: Doc) => T) => T;

                                                                                                                                                                                                                                                                                                                                                                                              function normalizeDoc

                                                                                                                                                                                                                                                                                                                                                                                              normalizeDoc: (doc: Doc) => Doc;

                                                                                                                                                                                                                                                                                                                                                                                                function normalizeParts

                                                                                                                                                                                                                                                                                                                                                                                                normalizeParts: (parts: Doc[]) => Doc[];

                                                                                                                                                                                                                                                                                                                                                                                                  function propagateBreaks

                                                                                                                                                                                                                                                                                                                                                                                                  propagateBreaks: (doc: Doc) => void;

                                                                                                                                                                                                                                                                                                                                                                                                    function removeLines

                                                                                                                                                                                                                                                                                                                                                                                                    removeLines: (doc: Doc) => Doc;

                                                                                                                                                                                                                                                                                                                                                                                                      function replaceNewlinesWithLiterallines

                                                                                                                                                                                                                                                                                                                                                                                                      replaceNewlinesWithLiterallines: (doc: Doc) => Doc;

                                                                                                                                                                                                                                                                                                                                                                                                        function stripTrailingHardline

                                                                                                                                                                                                                                                                                                                                                                                                        stripTrailingHardline: (doc: Doc) => Doc;

                                                                                                                                                                                                                                                                                                                                                                                                          function traverseDoc

                                                                                                                                                                                                                                                                                                                                                                                                          traverseDoc: (
                                                                                                                                                                                                                                                                                                                                                                                                          doc: Doc,
                                                                                                                                                                                                                                                                                                                                                                                                          onEnter?: (doc: Doc) => void | boolean,
                                                                                                                                                                                                                                                                                                                                                                                                          onExit?: (doc: Doc) => void,
                                                                                                                                                                                                                                                                                                                                                                                                          shouldTraverseConditionalGroups?: boolean
                                                                                                                                                                                                                                                                                                                                                                                                          ) => void;

                                                                                                                                                                                                                                                                                                                                                                                                            function willBreak

                                                                                                                                                                                                                                                                                                                                                                                                            willBreak: (doc: Doc) => boolean;

                                                                                                                                                                                                                                                                                                                                                                                                              namespace getFileInfo

                                                                                                                                                                                                                                                                                                                                                                                                              namespace getFileInfo {}

                                                                                                                                                                                                                                                                                                                                                                                                                function sync

                                                                                                                                                                                                                                                                                                                                                                                                                sync: (filePath: string, options?: FileInfoOptions) => FileInfoResult;

                                                                                                                                                                                                                                                                                                                                                                                                                  namespace resolveConfig

                                                                                                                                                                                                                                                                                                                                                                                                                  namespace resolveConfig {}

                                                                                                                                                                                                                                                                                                                                                                                                                    function sync

                                                                                                                                                                                                                                                                                                                                                                                                                    sync: (filePath: string, options?: ResolveConfigOptions) => Options | null;

                                                                                                                                                                                                                                                                                                                                                                                                                      namespace resolveConfigFile

                                                                                                                                                                                                                                                                                                                                                                                                                      namespace resolveConfigFile {}

                                                                                                                                                                                                                                                                                                                                                                                                                        function sync

                                                                                                                                                                                                                                                                                                                                                                                                                        sync: (filePath?: string) => string | null;

                                                                                                                                                                                                                                                                                                                                                                                                                          namespace util

                                                                                                                                                                                                                                                                                                                                                                                                                          namespace util {}

                                                                                                                                                                                                                                                                                                                                                                                                                            function addDanglingComment

                                                                                                                                                                                                                                                                                                                                                                                                                            addDanglingComment: (node: any, comment: any, marker: any) => void;

                                                                                                                                                                                                                                                                                                                                                                                                                              function addLeadingComment

                                                                                                                                                                                                                                                                                                                                                                                                                              addLeadingComment: (node: any, comment: any) => void;

                                                                                                                                                                                                                                                                                                                                                                                                                                function addTrailingComment

                                                                                                                                                                                                                                                                                                                                                                                                                                addTrailingComment: (node: any, comment: any) => void;

                                                                                                                                                                                                                                                                                                                                                                                                                                  function getAlignmentSize

                                                                                                                                                                                                                                                                                                                                                                                                                                  getAlignmentSize: (
                                                                                                                                                                                                                                                                                                                                                                                                                                  value: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                  tabWidth: number,
                                                                                                                                                                                                                                                                                                                                                                                                                                  startIndex?: number
                                                                                                                                                                                                                                                                                                                                                                                                                                  ) => number;

                                                                                                                                                                                                                                                                                                                                                                                                                                    function getIndentSize

                                                                                                                                                                                                                                                                                                                                                                                                                                    getIndentSize: (value: string, tabWidth: number) => number;

                                                                                                                                                                                                                                                                                                                                                                                                                                      function getMaxContinuousCount

                                                                                                                                                                                                                                                                                                                                                                                                                                      getMaxContinuousCount: (str: string, target: string) => number;

                                                                                                                                                                                                                                                                                                                                                                                                                                        function getNextNonSpaceNonCommentCharacterIndex

                                                                                                                                                                                                                                                                                                                                                                                                                                        getNextNonSpaceNonCommentCharacterIndex: <N>(
                                                                                                                                                                                                                                                                                                                                                                                                                                        text: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                        node: N,
                                                                                                                                                                                                                                                                                                                                                                                                                                        locEnd: (node: N) => number
                                                                                                                                                                                                                                                                                                                                                                                                                                        ) => number | false;

                                                                                                                                                                                                                                                                                                                                                                                                                                          function getStringWidth

                                                                                                                                                                                                                                                                                                                                                                                                                                          getStringWidth: (text: string) => number;

                                                                                                                                                                                                                                                                                                                                                                                                                                            function hasNewline

                                                                                                                                                                                                                                                                                                                                                                                                                                            hasNewline: (text: string, index: number, opts?: SkipOptions) => boolean;

                                                                                                                                                                                                                                                                                                                                                                                                                                              function hasNewlineInRange

                                                                                                                                                                                                                                                                                                                                                                                                                                              hasNewlineInRange: (text: string, start: number, end: number) => boolean;

                                                                                                                                                                                                                                                                                                                                                                                                                                                function hasSpaces

                                                                                                                                                                                                                                                                                                                                                                                                                                                hasSpaces: (text: string, index: number, opts?: SkipOptions) => boolean;

                                                                                                                                                                                                                                                                                                                                                                                                                                                  function isNextLineEmpty

                                                                                                                                                                                                                                                                                                                                                                                                                                                  isNextLineEmpty: <N>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                  text: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  node: N,
                                                                                                                                                                                                                                                                                                                                                                                                                                                  locEnd: (node: N) => number
                                                                                                                                                                                                                                                                                                                                                                                                                                                  ) => boolean;

                                                                                                                                                                                                                                                                                                                                                                                                                                                    function isNextLineEmptyAfterIndex

                                                                                                                                                                                                                                                                                                                                                                                                                                                    isNextLineEmptyAfterIndex: (text: string, index: number) => boolean;

                                                                                                                                                                                                                                                                                                                                                                                                                                                      function isPreviousLineEmpty

                                                                                                                                                                                                                                                                                                                                                                                                                                                      isPreviousLineEmpty: <N>(
                                                                                                                                                                                                                                                                                                                                                                                                                                                      text: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      node: N,
                                                                                                                                                                                                                                                                                                                                                                                                                                                      locStart: (node: N) => number
                                                                                                                                                                                                                                                                                                                                                                                                                                                      ) => boolean;

                                                                                                                                                                                                                                                                                                                                                                                                                                                        function makeString

                                                                                                                                                                                                                                                                                                                                                                                                                                                        makeString: (
                                                                                                                                                                                                                                                                                                                                                                                                                                                        rawContent: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                        enclosingQuote: Quote,
                                                                                                                                                                                                                                                                                                                                                                                                                                                        unescapeUnnecessaryEscapes?: boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                        ) => string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                          function skip

                                                                                                                                                                                                                                                                                                                                                                                                                                                          skip: (
                                                                                                                                                                                                                                                                                                                                                                                                                                                          chars: string | RegExp
                                                                                                                                                                                                                                                                                                                                                                                                                                                          ) => (text: string, index: number | false, opts?: SkipOptions) => number | false;

                                                                                                                                                                                                                                                                                                                                                                                                                                                            function skipEverythingButNewLine

                                                                                                                                                                                                                                                                                                                                                                                                                                                            skipEverythingButNewLine: (
                                                                                                                                                                                                                                                                                                                                                                                                                                                            text: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            index: number | false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                            opts?: SkipOptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                            ) => number | false;

                                                                                                                                                                                                                                                                                                                                                                                                                                                              function skipInlineComment

                                                                                                                                                                                                                                                                                                                                                                                                                                                              skipInlineComment: (text: string, index: number | false) => number | false;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                function skipNewline

                                                                                                                                                                                                                                                                                                                                                                                                                                                                skipNewline: (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                text: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                index: number | false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                opts?: SkipOptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                ) => number | false;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  function skipSpaces

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  skipSpaces: (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  text: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  index: number | false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  opts?: SkipOptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ) => number | false;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    function skipToLineEnd

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    skipToLineEnd: (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    text: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    index: number | false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    opts?: SkipOptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ) => number | false;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      function skipTrailingComment

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      skipTrailingComment: (text: string, index: number | false) => number | false;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        function skipWhitespace

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        skipWhitespace: (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        text: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        index: number | false,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        opts?: SkipOptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ) => number | false;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          interface SkipOptions

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          interface SkipOptions {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property backwards

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            backwards?: boolean | undefined;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              type Quote

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              type Quote = "'" | '"';

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Package Files (1)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Dependencies (0)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No dependencies.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Dev Dependencies (0)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No dev dependencies.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Peer Dependencies (0)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                No peer dependencies.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Badge

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/prettier.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Markdown
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/prettier)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • HTML
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  <a href="https://www.jsdocs.io/package/@types/prettier"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>