interface Printer < T = any > { canAttachComment ?: ( node : T ) => boolean ; embed ?: ( path : AstPath , options : Options , ) => | Doc | (
( textToDoc : ( text : string , options : Options ) => Promise < Doc > , print : ( selector ?: string | number | (
string | number )
[] | AstPath < any > , ) => Doc , path : AstPath , options : Options , ) => Doc | Promise<Doc | undefined> | undefined
)
| null ; getCommentChildNodes ?: ( node : T , options : ParserOptions < T > , ) => T [] | undefined ; getVisitorKeys ?: ( node : T , nonTraversableKeys : Set < string > ) => string [] ; handleComments ?: { endOfLine ?: ( commentNode : any , text : string , options : ParserOptions < T > , ast : T , isLastComment : boolean , ) => boolean ; ownLine ?: ( commentNode : any , text : string , options : ParserOptions < T > , ast : T , isLastComment : boolean , ) => boolean ; remaining ?: ( commentNode : any , text : string , options : ParserOptions < T > , ast : T , isLastComment : boolean , ) => boolean ; } ; hasPrettierIgnore ?: ( path : AstPath < T > ) => boolean ; insertPragma ?: ( text : string ) => string ; isBlockComment ?: ( node : T ) => boolean ; massageAstNode ?: ( original : any , cloned : any , parent : any ) => any ; preprocess ?: ( ast : T , options : ParserOptions < T > ) => T | Promise < T > ; printComment ?: ( commentPath : AstPath < T > , options : ParserOptions < T > ) => Doc ; willPrintOwnComments ?: ( path : AstPath < T > ) => boolean ; print ( path : AstPath < T > , options : ParserOptions < T > , print : ( path : AstPath < T > ) => Doc , args ?: unknown , ) : Doc ; } Defined in node_modules/.pnpm/prettier@3.6.1/node_modules/prettier/index.d.ts:487 Properties canAttachComment ?: ( node : T ) => boolean Defined in node_modules/.pnpm/prettier@3.6.1/node_modules/prettier/index.d.ts:523 Optionalembed embed ?: ( path : AstPath , options : Options , ) => | Doc | (
( textToDoc : ( text : string , options : Options ) => Promise < Doc > , print : ( selector ?: string | number | (
string | number )
[] | AstPath < any > , ) => Doc , path : AstPath , options : Options , ) => Doc | Promise<Doc | undefined> | undefined
)
| null Defined in node_modules/.pnpm/prettier@3.6.1/node_modules/prettier/index.d.ts:494 Defined in node_modules/.pnpm/prettier@3.6.1/node_modules/prettier/index.d.ts:536 Optionalget Visitor Keys getVisitorKeys ?: ( node : T , nonTraversableKeys : Set < string > ) => string [] Defined in node_modules/.pnpm/prettier@3.6.1/node_modules/prettier/index.d.ts:570 handleComments ?: { endOfLine ?: ( commentNode : any , text : string , options : ParserOptions < T > , ast : T , isLastComment : boolean , ) => boolean ; ownLine ?: ( commentNode : any , text : string , options : ParserOptions < T > , ast : T , isLastComment : boolean , ) => boolean ; remaining ?: ( commentNode : any , text : string , options : ParserOptions < T > , ast : T , isLastComment : boolean , ) => boolean ; } Defined in node_modules/.pnpm/prettier@3.6.1/node_modules/prettier/index.d.ts:539 Optionalhas Prettier Ignore hasPrettierIgnore ?: ( path : AstPath < T > ) => boolean Defined in node_modules/.pnpm/prettier@3.6.1/node_modules/prettier/index.d.ts:522 Optionalinsert Pragma insertPragma ?: ( text : string ) => string
Defined in node_modules/.pnpm/prettier@3.6.1/node_modules/prettier/index.d.ts:513 isBlockComment ?: ( node : T ) => boolean Defined in node_modules/.pnpm/prettier@3.6.1/node_modules/prettier/index.d.ts:524 Optionalmassage Ast Node massageAstNode ?: ( original : any , cloned : any , parent : any ) => any
Defined in node_modules/.pnpm/prettier@3.6.1/node_modules/prettier/index.d.ts:519 Optionalpreprocess Defined in node_modules/.pnpm/prettier@3.6.1/node_modules/prettier/index.d.ts:510 Defined in node_modules/.pnpm/prettier@3.6.1/node_modules/prettier/index.d.ts:526 willPrintOwnComments ?: ( path : AstPath < T > ) => boolean Defined in node_modules/.pnpm/prettier@3.6.1/node_modules/prettier/index.d.ts:525 Methods print Returns Doc Defined in node_modules/.pnpm/prettier@3.6.1/node_modules/prettier/index.d.ts:488
By default, Prettier searches all object properties (except for a few predefined ones) of each node recursively. This function can be provided to override that behavior.