File tree Expand file tree Collapse file tree 2 files changed +1
-12
lines changed Expand file tree Collapse file tree 2 files changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,6 @@ export type {
4848 _ExtractGettersFromSetupStore_Keys ,
4949 _ExtractStateFromSetupStore_Keys ,
5050 _UnwrapAll ,
51- _Awaited ,
5251} from './types'
5352export { MutationType } from './types'
5453
Original file line number Diff line number Diff line change @@ -158,16 +158,6 @@ export type SubscriptionCallback<S> = (
158158 state : UnwrapRef < S >
159159) => void
160160
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-
171161/**
172162 * Actual type for {@link StoreOnActionListenerContext}. Exists for refactoring
173163 * purposes. For internal use only.
@@ -201,7 +191,7 @@ export interface _StoreOnActionListenerContext<
201191 */
202192 after : (
203193 callback : A extends Record < ActionName , _Method >
204- ? ( resolvedReturn : _Awaited < ReturnType < A [ ActionName ] > > ) => void
194+ ? ( resolvedReturn : Awaited < ReturnType < A [ ActionName ] > > ) => void
205195 : ( ) => void
206196 ) => void
207197
You can’t perform that action at this time.
0 commit comments