Skip to content

Commit 4f00cb0

Browse files
committed
Fix linting issues
1 parent 0b7357d commit 4f00cb0

File tree

2 files changed

+25
-7
lines changed

2 files changed

+25
-7
lines changed

integrationTests/ts/index.ts

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,27 +96,43 @@ if (data != null) {
9696
const typedData: ResponseData = data;
9797
}
9898

99-
declare function runQueryA(q: TypedQueryDocumentNode<{ output: string }, { input: string | null }>): void;
99+
declare function runQueryA(
100+
q: TypedQueryDocumentNode<{ output: string }, { input: string | null }>,
101+
): void;
100102

101103
// valid
102-
declare const optionalInputRequiredOutput: TypedQueryDocumentNode<{ output: string }, { input: string | null }>;
104+
declare const optionalInputRequiredOutput: TypedQueryDocumentNode<
105+
{ output: string },
106+
{ input: string | null }
107+
>;
103108
runQueryA(optionalInputRequiredOutput);
104109

105-
declare function runQueryB(q: TypedQueryDocumentNode<{ output: string | null }, { input: string }>): void;
110+
declare function runQueryB(
111+
q: TypedQueryDocumentNode<{ output: string | null }, { input: string }>,
112+
): void;
106113

107114
// still valid: We still accept {output: string} as a valid result.
108115
// We're now passing in {input: string} which is still assignable to {input: string | null}
109116
runQueryB(optionalInputRequiredOutput);
110117

111118
// valid: we now accept {output: null} as a valid Result
112-
declare const optionalInputOptionalOutput: TypedQueryDocumentNode<{ output: string | null }, { input: string | null }>;
119+
declare const optionalInputOptionalOutput: TypedQueryDocumentNode<
120+
{ output: string | null },
121+
{ input: string | null }
122+
>;
113123
runQueryB(optionalInputOptionalOutput);
114124

115125
// valid: we now only pass {input: string} to the query
116-
declare const requiredInputRequiredOutput: TypedQueryDocumentNode<{ output: string }, { input: string }>;
126+
declare const requiredInputRequiredOutput: TypedQueryDocumentNode<
127+
{ output: string },
128+
{ input: string }
129+
>;
117130
runQueryB(requiredInputRequiredOutput);
118131

119132
// valid: we now accept {output: null} as a valid Result AND
120133
// we now only pass {input: string} to the query
121-
declare const requiredInputOptionalOutput: TypedQueryDocumentNode<{ output: null }, { input: string }>;
134+
declare const requiredInputOptionalOutput: TypedQueryDocumentNode<
135+
{ output: null },
136+
{ input: string }
137+
>;
122138
runQueryB(requiredInputOptionalOutput);

src/utilities/typedQueryDocumentNode.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,7 @@ export interface TypedQueryDocumentNode<
1414
* and that the Result is assignable to whatever you pass your result to. The method is never actually
1515
* implemented, but the type is valid because we list it as optional
1616
*/
17-
__ensureTypesOfVariablesAndResultMatching?: (variables: TRequestVariables) => TResponseData;
17+
__ensureTypesOfVariablesAndResultMatching?: (
18+
variables: TRequestVariables,
19+
) => TResponseData;
1820
}

0 commit comments

Comments
 (0)