Skip to content

Commit ce831c2

Browse files
committed
Fix analyze-field-access script
1 parent ce356a5 commit ce831c2

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/CstToDocMap.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import { Node } from "sql-parser-cst";
22
import { AstPath, Doc } from "prettier";
3-
import { PrintFn } from "./PrintFn";
3+
import { PrintableKey, PrintFn } from "./PrintFn";
44
import { AllPrettierOptions } from "./options";
55

66
export type NodeByType<TType, TNode> = Extract<TNode, { type: TType }>;
77

88
export type ToDocFn<TNode> = (
9-
print: PrintFn<TNode>,
9+
// 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>>,
1012
node: TNode,
1113
path: AstPath<TNode>,
1214
options: AllPrettierOptions<TNode>,

0 commit comments

Comments
 (0)