fix(types): properly infer return type from async setup (#2051)

fix #2049
This commit is contained in:
HcySunYang
2020-09-14 23:28:56 +08:00
committed by GitHub
parent 0124eacc91
commit 24fcf6ae7c
4 changed files with 47 additions and 7 deletions

View File

@@ -27,7 +27,8 @@ import {
OptionTypesType,
OptionTypesKeys,
resolveMergedOptions,
isInBeforeCreate
isInBeforeCreate,
UnwrapAsyncBindings
} from './componentOptions'
import { EmitsOptions, EmitFn } from './componentEmits'
import { Slots } from './componentSlots'
@@ -168,7 +169,7 @@ export type ComponentPublicInstance<
options?: WatchOptions
): WatchStopHandle
} & P &
ShallowUnwrapRef<B> &
ShallowUnwrapRef<UnwrapAsyncBindings<B>> &
D &
ExtractComputedReturns<C> &
M &