File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
sample/vue/src/components Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,17 @@ Added in v1.0.0
5959**Signature**
6060
6161` ` ` ts
62- export declare const useAtomSet: <R , W >(atom : () => Atom .Writable <R , W >) => (_ : W ) => void
62+ export declare const useAtomSet: <R , W , Mode extends " value" | " promise" | " promiseExit" = never >(
63+ atom : () => Atom .Writable <R , W >,
64+ options ? : { readonly mode? : ([R ] extends [Result .Result <any , any >] ? Mode : " value" ) | undefined }
65+ ) => " promise" extends Mode
66+ ? (value : W , options ? : { readonly signal? : AbortSignal | undefined } | undefined ) => Promise <Result .Result .Success <R >>
67+ : " promiseExit" extends Mode
68+ ? (
69+ value : W ,
70+ options ? : { readonly signal? : AbortSignal | undefined } | undefined
71+ ) => Promise <Exit .Exit <Result .Result .Success <R >, Result .Result .Failure <R >>>
72+ : (value : W | ((value : R ) => W )) => void
6373` ` `
6474
6575Added in v1.0.0
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ const result = useAtomValue(() => {
1515 return Atom .refreshOnWindowFocus (TestClient .query (" Get" , req .value , { reactivityKeys: [" Get" ]}))
1616})
1717
18- const set = useAtomSet (() => TestClient .mutation (" Set" ), { mode: " promiseExit" })
18+ const set = useAtomSet (() => TestClient .mutation (" Set" ), { mode: " promiseExit" })
1919
2020const intervalEnabled = ref (false )
2121
You can’t perform that action at this time.
0 commit comments