From c82cb4e292d6a742a293aa96bf4d9d05f0a6e30f Mon Sep 17 00:00:00 2001 From: Yixuan Xu Date: Sun, 10 Sep 2023 18:12:47 +0800 Subject: [PATCH] types: export mutation types fix #2755 --- mutation/src/index.ts | 10 ++++++++-- mutation/src/types.ts | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/mutation/src/index.ts b/mutation/src/index.ts index 8386371d5..48cb1d0da 100644 --- a/mutation/src/index.ts +++ b/mutation/src/index.ts @@ -14,7 +14,10 @@ import type { SWRMutationConfiguration, SWRMutationResponse, SWRMutationHook, - MutationFetcher + MutationFetcher, + TriggerWithArgs, + TriggerWithoutArgs, + TriggerWithOptionsArgs } from './types' const mutation = (() => @@ -160,5 +163,8 @@ export { SWRMutationConfiguration, SWRMutationResponse, SWRMutationHook, - MutationFetcher + MutationFetcher, + TriggerWithArgs, + TriggerWithoutArgs, + TriggerWithOptionsArgs } diff --git a/mutation/src/types.ts b/mutation/src/types.ts index 086808a43..654ad4d4c 100644 --- a/mutation/src/types.ts +++ b/mutation/src/types.ts @@ -88,7 +88,7 @@ export interface TriggerWithArgs< ): Promise } -interface TriggerWithOptionsArgs< +export interface TriggerWithOptionsArgs< Data = any, Error = any, SWRMutationKey extends Key = Key,