1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 | export type LiteralUnion<T extends U, U = string> = T | (Pick<U, never> & { _?: never | undefined });
|
23 |
|
24 | export type AST = any;
|
25 | export type Doc = doc.builders.Doc;
|
26 |
|
27 |
|
28 |
|
29 | export class AstPath<T = any> {
|
30 | constructor(value: T);
|
31 | stack: T[];
|
32 | getName(): PropertyKey | null;
|
33 | getValue(): T;
|
34 | getNode(count?: number): T | null;
|
35 | getParentNode(count?: number): T | null;
|
36 | call<U>(callback: (path: this) => U, ...names: PropertyKey[]): U;
|
37 | callParent<U>(callback: (path: this) => U, count?: number): U;
|
38 | each(callback: (path: this, index: number, value: any) => void, ...names: PropertyKey[]): void;
|
39 | map<U>(callback: (path: this, index: number, value: any) => U, ...names: PropertyKey[]): U[];
|
40 | match(...predicates: Array<(node: any, name: string | null, number: number | null) => boolean>): boolean;
|
41 | }
|
42 |
|
43 | /** @deprecated `FastPath` was renamed to `AstPath` */
|
44 | export type FastPath<T = any> = AstPath<T>;
|
45 |
|
46 | export type BuiltInParser = (text: string, options?: any) => AST;
|
47 | export type BuiltInParserName =
|
48 | | 'angular'
|
49 | | 'babel-flow'
|
50 | | 'babel-ts'
|
51 | | 'babel'
|
52 | | 'css'
|
53 | | 'espree'
|
54 | | 'flow'
|
55 | | 'glimmer'
|
56 | | 'graphql'
|
57 | | 'html'
|
58 | | 'json-stringify'
|
59 | | 'json'
|
60 | | 'json5'
|
61 | | 'less'
|
62 | | 'lwc'
|
63 | | 'markdown'
|
64 | | 'mdx'
|
65 | | 'meriyah'
|
66 | | 'scss'
|
67 | | 'typescript'
|
68 | | 'vue'
|
69 | | 'yaml';
|
70 | export type BuiltInParsers = Record<BuiltInParserName, BuiltInParser>;
|
71 |
|
72 | export type CustomParser = (text: string, parsers: BuiltInParsers, options: Options) => AST;
|
73 |
|
74 | /**
|
75 | * For use in `.prettierrc.js`, `.prettierrc.cjs`, `prettier.config.js` or `prettier.config.cjs`.
|
76 | */
|
77 | export interface Config extends Options {
|
78 | overrides?: Array<{
|
79 | files: string | string[];
|
80 | excludeFiles?: string | string[];
|
81 | options?: Options;
|
82 | }>;
|
83 | }
|
84 |
|
85 | export interface Options extends Partial<RequiredOptions> {}
|
86 |
|
87 | export interface RequiredOptions extends doc.printer.Options {
|
88 | |
89 |
|
90 |
|
91 |
|
92 | semi: boolean;
|
93 | |
94 |
|
95 |
|
96 |
|
97 | singleQuote: boolean;
|
98 | |
99 |
|
100 |
|
101 |
|
102 | jsxSingleQuote: boolean;
|
103 | |
104 |
|
105 |
|
106 |
|
107 | trailingComma: 'none' | 'es5' | 'all';
|
108 | |
109 |
|
110 |
|
111 |
|
112 | bracketSpacing: boolean;
|
113 | |
114 |
|
115 |
|
116 |
|
117 |
|
118 | bracketSameLine: boolean;
|
119 | |
120 |
|
121 |
|
122 |
|
123 |
|
124 | jsxBracketSameLine: boolean;
|
125 | |
126 |
|
127 |
|
128 |
|
129 | rangeStart: number;
|
130 | |
131 |
|
132 |
|
133 |
|
134 | rangeEnd: number;
|
135 | |
136 |
|
137 |
|
138 | parser: LiteralUnion<BuiltInParserName> | CustomParser;
|
139 | |
140 |
|
141 |
|
142 | filepath: string;
|
143 | |
144 |
|
145 |
|
146 |
|
147 |
|
148 | requirePragma: boolean;
|
149 | |
150 |
|
151 |
|
152 |
|
153 |
|
154 |
|
155 |
|
156 | insertPragma: boolean;
|
157 | |
158 |
|
159 |
|
160 |
|
161 |
|
162 | proseWrap: 'always' | 'never' | 'preserve';
|
163 | |
164 |
|
165 |
|
166 |
|
167 | arrowParens: 'avoid' | 'always';
|
168 | |
169 |
|
170 |
|
171 | plugins: Array<string | Plugin>;
|
172 | |
173 |
|
174 |
|
175 | pluginSearchDirs: string[];
|
176 | |
177 |
|
178 |
|
179 |
|
180 | htmlWhitespaceSensitivity: 'css' | 'strict' | 'ignore';
|
181 | |
182 |
|
183 |
|
184 |
|
185 | endOfLine: 'auto' | 'lf' | 'crlf' | 'cr';
|
186 | |
187 |
|
188 |
|
189 |
|
190 | quoteProps: 'as-needed' | 'consistent' | 'preserve';
|
191 | |
192 |
|
193 |
|
194 |
|
195 | vueIndentScriptAndStyle: boolean;
|
196 | |
197 |
|
198 |
|
199 |
|
200 | embeddedLanguageFormatting: 'auto' | 'off';
|
201 | }
|
202 |
|
203 | export interface ParserOptions<T = any> extends RequiredOptions {
|
204 | locStart: (node: T) => number;
|
205 | locEnd: (node: T) => number;
|
206 | originalText: string;
|
207 | }
|
208 |
|
209 | export interface Plugin<T = any> {
|
210 | languages?: SupportLanguage[] | undefined;
|
211 | parsers?: { [parserName: string]: Parser<T> } | undefined;
|
212 | printers?: { [astFormat: string]: Printer<T> } | undefined;
|
213 | options?: SupportOptions | undefined;
|
214 | defaultOptions?: Partial<RequiredOptions> | undefined;
|
215 | }
|
216 |
|
217 | export interface Parser<T = any> {
|
218 | parse: (text: string, parsers: { [parserName: string]: Parser }, options: ParserOptions<T>) => T;
|
219 | astFormat: string;
|
220 | hasPragma?: ((text: string) => boolean) | undefined;
|
221 | locStart: (node: T) => number;
|
222 | locEnd: (node: T) => number;
|
223 | preprocess?: ((text: string, options: ParserOptions<T>) => string) | undefined;
|
224 | }
|
225 |
|
226 | export interface Printer<T = any> {
|
227 | print(path: AstPath<T>, options: ParserOptions<T>, print: (path: AstPath<T>) => Doc): Doc;
|
228 | embed?:
|
229 | | ((
|
230 | path: AstPath<T>,
|
231 | print: (path: AstPath<T>) => Doc,
|
232 | textToDoc: (text: string, options: Options) => Doc,
|
233 | options: ParserOptions<T>,
|
234 | ) => Doc | null)
|
235 | | undefined;
|
236 | insertPragma?: ((text: string) => string) | undefined;
|
237 | /**
|
238 | * @returns `null` if you want to remove this node
|
239 | * @returns `void` if you want to use modified newNode
|
240 | * @returns anything if you want to replace the node with it
|
241 | */
|
242 | massageAstNode?: ((node: any, newNode: any, parent: any) => any) | undefined;
|
243 | hasPrettierIgnore?: ((path: AstPath<T>) => boolean) | undefined;
|
244 | canAttachComment?: ((node: T) => boolean) | undefined;
|
245 | willPrintOwnComments?: ((path: AstPath<T>) => boolean) | undefined;
|
246 | printComment?: ((commentPath: AstPath<T>, options: ParserOptions<T>) => Doc) | undefined;
|
247 | handleComments?:
|
248 | | {
|
249 | ownLine?:
|
250 | | ((
|
251 | commentNode: any,
|
252 | text: string,
|
253 | options: ParserOptions<T>,
|
254 | ast: T,
|
255 | isLastComment: boolean,
|
256 | ) => boolean)
|
257 | | undefined;
|
258 | endOfLine?:
|
259 | | ((
|
260 | commentNode: any,
|
261 | text: string,
|
262 | options: ParserOptions<T>,
|
263 | ast: T,
|
264 | isLastComment: boolean,
|
265 | ) => boolean)
|
266 | | undefined;
|
267 | remaining?:
|
268 | | ((
|
269 | commentNode: any,
|
270 | text: string,
|
271 | options: ParserOptions<T>,
|
272 | ast: T,
|
273 | isLastComment: boolean,
|
274 | ) => boolean)
|
275 | | undefined;
|
276 | }
|
277 | | undefined;
|
278 | }
|
279 |
|
280 | export interface CursorOptions extends Options {
|
281 | /**
|
282 | * Specify where the cursor is.
|
283 | */
|
284 | cursorOffset: number;
|
285 | rangeStart?: never;
|
286 | rangeEnd?: never;
|
287 | }
|
288 |
|
289 | export interface CursorResult {
|
290 | formatted: string;
|
291 | cursorOffset: number;
|
292 | }
|
293 |
|
294 | /**
|
295 | * `format` is used to format text using Prettier. [Options](https:
|
296 | */
|
297 | export function format(source: string, options?: Options): string;
|
298 |
|
299 |
|
300 |
|
301 |
|
302 |
|
303 | export function check(source: string, options?: Options): boolean;
|
304 |
|
305 |
|
306 |
|
307 |
|
308 |
|
309 |
|
310 |
|
311 | export function formatWithCursor(source: string, options: CursorOptions): CursorResult;
|
312 |
|
313 | export interface ResolveConfigOptions {
|
314 | |
315 |
|
316 |
|
317 | useCache?: boolean | undefined;
|
318 | |
319 |
|
320 |
|
321 | config?: string | undefined;
|
322 | |
323 |
|
324 |
|
325 |
|
326 |
|
327 |
|
328 |
|
329 |
|
330 |
|
331 | editorconfig?: boolean | undefined;
|
332 | }
|
333 |
|
334 |
|
335 |
|
336 |
|
337 |
|
338 |
|
339 |
|
340 |
|
341 |
|
342 |
|
343 |
|
344 |
|
345 |
|
346 |
|
347 | export function resolveConfig(filePath: string, options?: ResolveConfigOptions): Promise<Options | null>;
|
348 | export namespace resolveConfig {
|
349 | function sync(filePath: string, options?: ResolveConfigOptions): Options | null;
|
350 | }
|
351 |
|
352 |
|
353 |
|
354 |
|
355 |
|
356 |
|
357 |
|
358 |
|
359 |
|
360 |
|
361 |
|
362 |
|
363 | export function resolveConfigFile(filePath?: string): Promise<string | null>;
|
364 | export namespace resolveConfigFile {
|
365 | function sync(filePath?: string): string | null;
|
366 | }
|
367 |
|
368 |
|
369 |
|
370 |
|
371 |
|
372 | export function clearConfigCache(): void;
|
373 |
|
374 | export interface SupportLanguage {
|
375 | name: string;
|
376 | since?: string | undefined;
|
377 | parsers: BuiltInParserName[] | string[];
|
378 | group?: string | undefined;
|
379 | tmScope?: string | undefined;
|
380 | aceMode?: string | undefined;
|
381 | codemirrorMode?: string | undefined;
|
382 | codemirrorMimeType?: string | undefined;
|
383 | aliases?: string[] | undefined;
|
384 | extensions?: string[] | undefined;
|
385 | filenames?: string[] | undefined;
|
386 | linguistLanguageId?: number | undefined;
|
387 | vscodeLanguageIds?: string[] | undefined;
|
388 | }
|
389 |
|
390 | export interface SupportOptionRange {
|
391 | start: number;
|
392 | end: number;
|
393 | step: number;
|
394 | }
|
395 |
|
396 | export type SupportOptionType = 'int' | 'boolean' | 'choice' | 'path';
|
397 |
|
398 | export type CoreCategoryType = 'Config' | 'Editor' | 'Format' | 'Other' | 'Output' | 'Global' | 'Special';
|
399 |
|
400 | export interface BaseSupportOption<Type extends SupportOptionType> {
|
401 | readonly name?: string | undefined;
|
402 | since: string;
|
403 | |
404 |
|
405 |
|
406 | category: string;
|
407 | |
408 |
|
409 |
|
410 |
|
411 |
|
412 |
|
413 |
|
414 | type: Type;
|
415 | |
416 |
|
417 |
|
418 |
|
419 |
|
420 |
|
421 | deprecated?: true | string | undefined;
|
422 | |
423 |
|
424 |
|
425 |
|
426 | description?: string | undefined;
|
427 | }
|
428 |
|
429 | export interface IntSupportOption extends BaseSupportOption<'int'> {
|
430 | default?: number | undefined;
|
431 | array?: false | undefined;
|
432 | range?: SupportOptionRange | undefined;
|
433 | }
|
434 |
|
435 | export interface IntArraySupportOption extends BaseSupportOption<'int'> {
|
436 | default?: Array<{ value: number[] }> | undefined;
|
437 | array: true;
|
438 | }
|
439 |
|
440 | export interface BooleanSupportOption extends BaseSupportOption<'boolean'> {
|
441 | default?: boolean | undefined;
|
442 | array?: false | undefined;
|
443 | description: string;
|
444 | oppositeDescription?: string | undefined;
|
445 | }
|
446 |
|
447 | export interface BooleanArraySupportOption extends BaseSupportOption<'boolean'> {
|
448 | default?: Array<{ value: boolean[] }> | undefined;
|
449 | array: true;
|
450 | }
|
451 |
|
452 | export interface ChoiceSupportOption<Value = any> extends BaseSupportOption<'choice'> {
|
453 | default?: Value | Array<{ since: string; value: Value }> | undefined;
|
454 | description: string;
|
455 | choices: Array<{
|
456 | since?: string | undefined;
|
457 | value: Value;
|
458 | description: string;
|
459 | }>;
|
460 | }
|
461 |
|
462 | export interface PathSupportOption extends BaseSupportOption<'path'> {
|
463 | default?: string | undefined;
|
464 | array?: false | undefined;
|
465 | }
|
466 |
|
467 | export interface PathArraySupportOption extends BaseSupportOption<'path'> {
|
468 | default?: Array<{ value: string[] }> | undefined;
|
469 | array: true;
|
470 | }
|
471 |
|
472 | export type SupportOption =
|
473 | | IntSupportOption
|
474 | | IntArraySupportOption
|
475 | | BooleanSupportOption
|
476 | | BooleanArraySupportOption
|
477 | | ChoiceSupportOption
|
478 | | PathSupportOption
|
479 | | PathArraySupportOption;
|
480 |
|
481 | export interface SupportOptions extends Record<string, SupportOption> {}
|
482 |
|
483 | export interface SupportInfo {
|
484 | languages: SupportLanguage[];
|
485 | options: SupportOption[];
|
486 | }
|
487 |
|
488 | export interface FileInfoOptions {
|
489 | ignorePath?: string | undefined;
|
490 | withNodeModules?: boolean | undefined;
|
491 | plugins?: string[] | undefined;
|
492 | resolveConfig?: boolean | undefined;
|
493 | }
|
494 |
|
495 | export interface FileInfoResult {
|
496 | ignored: boolean;
|
497 | inferredParser: string | null;
|
498 | }
|
499 |
|
500 | export function getFileInfo(filePath: string, options?: FileInfoOptions): Promise<FileInfoResult>;
|
501 |
|
502 | export namespace getFileInfo {
|
503 | function sync(filePath: string, options?: FileInfoOptions): FileInfoResult;
|
504 | }
|
505 |
|
506 |
|
507 |
|
508 |
|
509 | export function getSupportInfo(): SupportInfo;
|
510 |
|
511 |
|
512 |
|
513 |
|
514 | export const version: string;
|
515 |
|
516 |
|
517 | export namespace util {
|
518 | interface SkipOptions {
|
519 | backwards?: boolean | undefined;
|
520 | }
|
521 |
|
522 | type Quote = "'" | '"';
|
523 |
|
524 | function addDanglingComment(node: any, comment: any, marker: any): void;
|
525 | function addLeadingComment(node: any, comment: any): void;
|
526 | function addTrailingComment(node: any, comment: any): void;
|
527 | function getAlignmentSize(value: string, tabWidth: number, startIndex?: number): number;
|
528 | function getIndentSize(value: string, tabWidth: number): number;
|
529 | function getMaxContinuousCount(str: string, target: string): number;
|
530 | function getNextNonSpaceNonCommentCharacterIndex<N>(
|
531 | text: string,
|
532 | node: N,
|
533 | locEnd: (node: N) => number,
|
534 | ): number | false;
|
535 | function getStringWidth(text: string): number;
|
536 | function hasNewline(text: string, index: number, opts?: SkipOptions): boolean;
|
537 | function hasNewlineInRange(text: string, start: number, end: number): boolean;
|
538 | function hasSpaces(text: string, index: number, opts?: SkipOptions): boolean;
|
539 | function isNextLineEmpty<N>(text: string, node: N, locEnd: (node: N) => number): boolean;
|
540 | function isNextLineEmptyAfterIndex(text: string, index: number): boolean;
|
541 | function isPreviousLineEmpty<N>(text: string, node: N, locStart: (node: N) => number): boolean;
|
542 | function makeString(rawContent: string, enclosingQuote: Quote, unescapeUnnecessaryEscapes?: boolean): string;
|
543 | function skip(chars: string | RegExp): (text: string, index: number | false, opts?: SkipOptions) => number | false;
|
544 | function skipEverythingButNewLine(text: string, index: number | false, opts?: SkipOptions): number | false;
|
545 | function skipInlineComment(text: string, index: number | false): number | false;
|
546 | function skipNewline(text: string, index: number | false, opts?: SkipOptions): number | false;
|
547 | function skipSpaces(text: string, index: number | false, opts?: SkipOptions): number | false;
|
548 | function skipToLineEnd(text: string, index: number | false, opts?: SkipOptions): number | false;
|
549 | function skipTrailingComment(text: string, index: number | false): number | false;
|
550 | function skipWhitespace(text: string, index: number | false, opts?: SkipOptions): number | false;
|
551 | }
|
552 |
|
553 |
|
554 | export namespace doc {
|
555 | namespace builders {
|
556 | type DocCommand =
|
557 | | Align
|
558 | | BreakParent
|
559 | | Concat
|
560 | | Cursor
|
561 | | Fill
|
562 | | Group
|
563 | | IfBreak
|
564 | | Indent
|
565 | | IndentIfBreak
|
566 | | Label
|
567 | | Line
|
568 | | LineSuffix
|
569 | | LineSuffixBoundary
|
570 | | Trim;
|
571 | type Doc = string | Doc[] | DocCommand;
|
572 |
|
573 | interface Align {
|
574 | type: 'align';
|
575 | contents: Doc;
|
576 | n: number | string | { type: 'root' };
|
577 | }
|
578 |
|
579 | interface BreakParent {
|
580 | type: 'break-parent';
|
581 | }
|
582 |
|
583 | interface Concat {
|
584 | type: 'concat';
|
585 | parts: Doc[];
|
586 | }
|
587 |
|
588 | interface Cursor {
|
589 | type: 'cursor';
|
590 | placeholder: symbol;
|
591 | }
|
592 |
|
593 | interface Fill {
|
594 | type: 'fill';
|
595 | parts: Doc[];
|
596 | }
|
597 |
|
598 | interface Group {
|
599 | type: 'group';
|
600 | contents: Doc;
|
601 | break: boolean;
|
602 | expandedStates: Doc[];
|
603 | }
|
604 |
|
605 | interface HardlineWithoutBreakParent extends Line {
|
606 | hard: true;
|
607 | }
|
608 |
|
609 | interface IfBreak {
|
610 | type: 'if-break';
|
611 | breakContents: Doc;
|
612 | flatContents: Doc;
|
613 | }
|
614 |
|
615 | interface Indent {
|
616 | type: 'indent';
|
617 | contents: Doc;
|
618 | }
|
619 |
|
620 | interface IndentIfBreak {
|
621 | type: 'indent-if-break';
|
622 | }
|
623 |
|
624 | interface Label {
|
625 | type: 'label';
|
626 | }
|
627 |
|
628 | interface Line {
|
629 | type: 'line';
|
630 | soft?: boolean | undefined;
|
631 | hard?: boolean | undefined;
|
632 | literal?: boolean | undefined;
|
633 | }
|
634 |
|
635 | interface LineSuffix {
|
636 | type: 'line-suffix';
|
637 | contents: Doc;
|
638 | }
|
639 |
|
640 | interface LineSuffixBoundary {
|
641 | type: 'line-suffix-boundary';
|
642 | }
|
643 |
|
644 | interface LiterallineWithoutBreakParent extends Line {
|
645 | hard: true;
|
646 | literal: true;
|
647 | }
|
648 |
|
649 | interface Softline extends Line {
|
650 | soft: true;
|
651 | }
|
652 |
|
653 | interface Trim {
|
654 | type: 'trim';
|
655 | }
|
656 |
|
657 | interface GroupOptions {
|
658 | shouldBreak?: boolean | undefined;
|
659 | id?: symbol | undefined;
|
660 | }
|
661 |
|
662 | function addAlignmentToDoc(doc: Doc, size: number, tabWidth: number): Doc;
|
663 |
|
664 | function align(widthOrString: Align['n'], doc: Doc): Align;
|
665 |
|
666 | const breakParent: BreakParent;
|
667 | |
668 |
|
669 |
|
670 |
|
671 | function concat(docs: Doc[]): Concat;
|
672 |
|
673 | function conditionalGroup(alternatives: Doc[], options?: GroupOptions): Group;
|
674 |
|
675 | function dedent(doc: Doc): Align;
|
676 |
|
677 | function dedentToRoot(doc: Doc): Align;
|
678 |
|
679 | function fill(docs: Doc[]): Fill;
|
680 |
|
681 | function group(doc: Doc, opts?: GroupOptions): Group;
|
682 |
|
683 | const hardline: Concat;
|
684 |
|
685 | const hardlineWithoutBreakParent: HardlineWithoutBreakParent;
|
686 |
|
687 | function ifBreak(ifBreak: Doc, noBreak?: Doc, options?: { groupId?: symbol | undefined }): IfBreak;
|
688 |
|
689 | function indent(doc: Doc): Indent;
|
690 |
|
691 | function indentIfBreak(doc: Doc, opts: { groupId: symbol; negate?: boolean | undefined }): IndentIfBreak;
|
692 |
|
693 | function join(sep: Doc, docs: Doc[]): Concat;
|
694 |
|
695 | function label(label: string, doc: Doc): Label;
|
696 |
|
697 | const line: Line;
|
698 |
|
699 | function lineSuffix(suffix: Doc): LineSuffix;
|
700 |
|
701 | const lineSuffixBoundary: LineSuffixBoundary;
|
702 |
|
703 | const literalline: Concat;
|
704 |
|
705 | const literallineWithoutBreakParent: LiterallineWithoutBreakParent;
|
706 |
|
707 | function markAsRoot(doc: Doc): Align;
|
708 |
|
709 | const softline: Softline;
|
710 |
|
711 | const trim: Trim;
|
712 |
|
713 | const cursor: Cursor;
|
714 | }
|
715 | namespace debug {
|
716 | function printDocToDebug(doc: Doc): string;
|
717 | }
|
718 | namespace printer {
|
719 | function printDocToString(
|
720 | doc: Doc,
|
721 | options: Options,
|
722 | ): {
|
723 | formatted: string;
|
724 | cursorNodeStart?: number | undefined;
|
725 | cursorNodeText?: string | undefined;
|
726 | };
|
727 | interface Options {
|
728 | |
729 |
|
730 |
|
731 |
|
732 | printWidth: number;
|
733 | |
734 |
|
735 |
|
736 |
|
737 | tabWidth: number;
|
738 | |
739 |
|
740 |
|
741 |
|
742 | useTabs: boolean;
|
743 | parentParser?: string | undefined;
|
744 | __embeddedInHtml?: boolean | undefined;
|
745 | }
|
746 | }
|
747 | namespace utils {
|
748 | function cleanDoc(doc: Doc): Doc;
|
749 | function findInDoc<T = Doc>(doc: Doc, callback: (doc: Doc) => T, defaultValue: T): T;
|
750 | function getDocParts(doc: Doc): Doc;
|
751 | function isConcat(doc: Doc): boolean;
|
752 | function isEmpty(doc: Doc): boolean;
|
753 | function isLineNext(doc: Doc): boolean;
|
754 | function mapDoc<T = Doc>(doc: Doc, callback: (doc: Doc) => T): T;
|
755 | function normalizeDoc(doc: Doc): Doc;
|
756 | function normalizeParts(parts: Doc[]): Doc[];
|
757 | function propagateBreaks(doc: Doc): void;
|
758 | function removeLines(doc: Doc): Doc;
|
759 | function replaceNewlinesWithLiterallines(doc: Doc): Doc;
|
760 | function stripTrailingHardline(doc: Doc): Doc;
|
761 | function traverseDoc(
|
762 | doc: Doc,
|
763 | onEnter?: (doc: Doc) => void | boolean,
|
764 | onExit?: (doc: Doc) => void,
|
765 | shouldTraverseConditionalGroups?: boolean,
|
766 | ): void;
|
767 | function willBreak(doc: Doc): boolean;
|
768 | }
|
769 | }
|
770 |
|
\ | No newline at end of file |