File tree 2 files changed +1
-12
lines changed
2 files changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,6 @@ export type {
48
48
_ExtractGettersFromSetupStore_Keys ,
49
49
_ExtractStateFromSetupStore_Keys ,
50
50
_UnwrapAll ,
51
- _Awaited ,
52
51
} from './types'
53
52
export { MutationType } from './types'
54
53
Original file line number Diff line number Diff line change @@ -158,16 +158,6 @@ export type SubscriptionCallback<S> = (
158
158
state : UnwrapRef < S >
159
159
) => void
160
160
161
- // to support TS 4.4
162
- // TODO: remove in 2.1.0, use Awaited, and up the peer dep to TS 4.5
163
- export type _Awaited < T > = T extends null | undefined
164
- ? T // special case for `null | undefined` when not in `--strictNullChecks` mode
165
- : T extends object & { then ( onfulfilled : infer F ) : any } // `await` only unwraps object types with a callable `then`. Non-object types are not unwrapped
166
- ? F extends ( value : infer V , ...args : any ) => any // if the argument to `then` is callable, extracts the first argument
167
- ? _Awaited < V > // recursively unwrap the value
168
- : never // the argument to `then` was not callable
169
- : T // non-object or non-thenable
170
-
171
161
/**
172
162
* Actual type for {@link StoreOnActionListenerContext}. Exists for refactoring
173
163
* purposes. For internal use only.
@@ -201,7 +191,7 @@ export interface _StoreOnActionListenerContext<
201
191
*/
202
192
after : (
203
193
callback : A extends Record < ActionName , _Method >
204
- ? ( resolvedReturn : _Awaited < ReturnType < A [ ActionName ] > > ) => void
194
+ ? ( resolvedReturn : Awaited < ReturnType < A [ ActionName ] > > ) => void
205
195
: ( ) => void
206
196
) => void
207
197
You can’t perform that action at this time.
0 commit comments