Fix signature of embed (#14598)

This commit is contained in:
fisker Cheung authored and GitHub committed 2023-04-03 09:42:49 +08:00
1 parent eb443eec5d
commit 0af711b66c
1 file changed
+13 -5
+13 -5
View File
@@ -477,11 +477,19 @@ export interface Printer<T = any> {
): Doc;
embed?:
| ((
path: AstPath<T>,
print: (path: AstPath<T>) => Doc,
textToDoc: (text: string, options: Options) => Doc,
options: ParserOptions<T>
) => Doc | null)
path: AstPath,
options: Options
) =>
| ((
textToDoc: (text: string, options: Options) => Promise<Doc>,
print: (
selector?: string | number | Array<string | number> | AstPath
) => Doc,
path: AstPath,
options: Options
) => Promise<Doc | undefined> | Doc | undefined)
| Doc
| null)
| undefined;
insertPragma?: (text: string) => string;
/**