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