diff --git a/.api-reports/api-report-react.api.md b/.api-reports/api-report-react.api.md index 3b86160f697..33cc0914821 100644 --- a/.api-reports/api-report-react.api.md +++ b/.api-reports/api-report-react.api.md @@ -1178,7 +1178,7 @@ export interface MutationResult { data?: TData | null; error?: ApolloError; loading: boolean; - reset(): void; + reset: () => void; } // Warning: (ae-forgotten-export) The symbol "MutationBaseOptions" needs to be exported by the entry point index.d.ts diff --git a/.api-reports/api-report-react_components.api.md b/.api-reports/api-report-react_components.api.md index 1aba60cd36f..040a99c9127 100644 --- a/.api-reports/api-report-react_components.api.md +++ b/.api-reports/api-report-react_components.api.md @@ -1059,7 +1059,7 @@ interface MutationResult { data?: TData | null; error?: ApolloError; loading: boolean; - reset(): void; + reset: () => void; } // Warning: (ae-forgotten-export) The symbol "MutationBaseOptions" needs to be exported by the entry point index.d.ts diff --git a/.api-reports/api-report-react_hoc.api.md b/.api-reports/api-report-react_hoc.api.md index d84bb3fe735..db8b909f5ff 100644 --- a/.api-reports/api-report-react_hoc.api.md +++ b/.api-reports/api-report-react_hoc.api.md @@ -1052,7 +1052,7 @@ interface MutationResult { data?: TData | null; error?: ApolloError; loading: boolean; - reset(): void; + reset: () => void; } // Warning: (ae-forgotten-export) The symbol "MutationBaseOptions" needs to be exported by the entry point index.d.ts diff --git a/.api-reports/api-report-react_hooks.api.md b/.api-reports/api-report-react_hooks.api.md index 6fe2ff1353b..eb378482a4c 100644 --- a/.api-reports/api-report-react_hooks.api.md +++ b/.api-reports/api-report-react_hooks.api.md @@ -1120,7 +1120,7 @@ interface MutationResult { data?: TData | null; error?: ApolloError; loading: boolean; - reset(): void; + reset: () => void; } // Warning: (ae-forgotten-export) The symbol "MutationBaseOptions" needs to be exported by the entry point index.d.ts diff --git a/.api-reports/api-report.api.md b/.api-reports/api-report.api.md index 335379d1bd8..f995e1f4bdd 100644 --- a/.api-reports/api-report.api.md +++ b/.api-reports/api-report.api.md @@ -1629,7 +1629,7 @@ export interface MutationResult { data?: TData | null; error?: ApolloError; loading: boolean; - reset(): void; + reset: () => void; } // Warning: (ae-forgotten-export) The symbol "MutationBaseOptions" needs to be exported by the entry point index.d.ts diff --git a/.changeset/modern-cows-tease.md b/.changeset/modern-cows-tease.md new file mode 100644 index 00000000000..7d710ea1488 --- /dev/null +++ b/.changeset/modern-cows-tease.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": patch +--- + +Type `MutationResult.reset` as an arrow function diff --git a/src/react/types/types.ts b/src/react/types/types.ts index ab4444596f4..239f96fc133 100644 --- a/src/react/types/types.ts +++ b/src/react/types/types.ts @@ -380,7 +380,7 @@ export interface MutationResult { /** {@inheritDoc @apollo/client!MutationResultDocumentation#client:member} */ client: ApolloClient; /** {@inheritDoc @apollo/client!MutationResultDocumentation#reset:member} */ - reset(): void; + reset: () => void; } export declare type MutationFunction<