From c140ed6b5354bc64d15f33eb9fbaa2571a375aa1 Mon Sep 17 00:00:00 2001 From: liuxingbaoyu <30521560+liuxingbaoyu@users.noreply.github.com> Date: Wed, 27 Sep 2023 21:43:58 +0800 Subject: [PATCH] Fix type definitions for v3 (#15464) --- src/index.d.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/index.d.ts b/src/index.d.ts index 3cdf428cf..207265e28 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -302,11 +302,6 @@ export type BuiltInParserName = | "yaml"; export type BuiltInParsers = Record; -export type CustomParser = ( - text: string, - options: Options, -) => AST | Promise; - /** * For use in `.prettierrc.js`, `.prettierrc.cjs`, `prettierrc.mjs`, `prettier.config.js`, `prettier.config.cjs`, `prettier.config.mjs` */ @@ -371,7 +366,7 @@ export interface RequiredOptions extends doc.printer.Options { /** * Specify which parser to use. */ - parser: LiteralUnion | CustomParser; + parser: LiteralUnion; /** * Specify the input filepath. This will be used to do parser inference. */ @@ -584,8 +579,6 @@ export function formatWithCursor( options: CursorOptions, ): Promise; -export function formatAST(ast: any, options?: Options): Promise; - export interface ResolveConfigOptions { /** * If set to `false`, all caching will be bypassed.