Skip to content

Commit 02d340e

Browse files
committed
Add back explicit return type
1 parent 08c0c41 commit 02d340e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/core/ObservableQuery.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ export class ObservableQuery<
409409
* @param variables - The new set of variables. If there are missing variables,
410410
* the previous values of those variables will be used.
411411
*/
412-
public refetch(variables?: Partial<TVariables>) {
412+
public refetch(variables?: Partial<TVariables>): Promise<QueryResult<TData>> {
413413
const reobserveOptions: Partial<WatchQueryOptions<TVariables, TData>> = {
414414
// Always disable polling for refetches.
415415
pollInterval: 0,
@@ -469,7 +469,7 @@ Did you mean to call refetch(variables) instead of refetch({ variables })?`,
469469
}
470470
) => Unmasked<TData>;
471471
}
472-
) {
472+
): Promise<QueryResult<TFetchData>> {
473473
const combinedOptions = {
474474
...(fetchMoreOptions.query ? fetchMoreOptions : (
475475
{
@@ -710,7 +710,9 @@ Did you mean to call refetch(variables) instead of refetch({ variables })?`,
710710
* @param variables - The new set of variables. If there are missing variables,
711711
* the previous values of those variables will be used.
712712
*/
713-
public async setVariables(variables: TVariables) {
713+
public async setVariables(
714+
variables: TVariables
715+
): Promise<QueryResult<TData>> {
714716
if (equal(this.variables, variables)) {
715717
// If we have no observers, then we don't actually want to make a network
716718
// request. As soon as someone observes the query, the request will kick

0 commit comments

Comments
 (0)