Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/deno/std/prettier/vendor/index.d.ts>Printer

A modern runtime for JavaScript and TypeScript.
Go to Latest
interface Printer
import { type Printer } from "https://deno.land/x/deno@v0.23.0/std/prettier/vendor/index.d.ts";

Properties

optional
embed: (
path: FastPath,
print: (path: FastPath) => Doc,
textToDoc: (text: string, options: Options) => Doc,
options: ParserOptions,
) => Doc | null
optional
insertPragma: (text: string) => string
optional
massageAstNode: (
node: any,
newNode: any,
parent: any,
) => any
optional
hasPrettierIgnore: (path: FastPath) => boolean
optional
canAttachComment: (node: any) => boolean
optional
willPrintOwnComments: (path: FastPath) => boolean
optional
printComments: (
path: FastPath,
print: (path: FastPath) => Doc,
options: ParserOptions,
needsSemi: boolean,
) => Doc
optional
handleComments: { ownLine?: (
commentNode: any,
text: string,
options: ParserOptions,
ast: any,
isLastComment: boolean,
) => boolean; endOfLine?: (
commentNode: any,
text: string,
options: ParserOptions,
ast: any,
isLastComment: boolean,
) => boolean; remaining?: (
commentNode: any,
text: string,
options: ParserOptions,
ast: any,
isLastComment: boolean,
) => boolean; }

Methods

print(
path: FastPath,
options: ParserOptions,
print: (path: FastPath) => Doc,
): Doc