We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ce356a5 commit ce831c2Copy full SHA for ce831c2
1 file changed
src/CstToDocMap.ts
@@ -1,12 +1,14 @@
1
import { Node } from "sql-parser-cst";
2
import { AstPath, Doc } from "prettier";
3
-import { PrintFn } from "./PrintFn";
+import { PrintableKey, PrintFn } from "./PrintFn";
4
import { AllPrettierOptions } from "./options";
5
6
export type NodeByType<TType, TNode> = Extract<TNode, { type: TType }>;
7
8
export type ToDocFn<TNode> = (
9
- print: PrintFn<TNode>,
+ // Note: the second type argument could technically be inferred by TypeScript,
10
+ // but the analyze-field-access script relies on it being explicitly present.
11
+ print: PrintFn<TNode, PrintableKey<TNode>>,
12
node: TNode,
13
path: AstPath<TNode>,
14
options: AllPrettierOptions<TNode>,
0 commit comments