feat(types): update to Typescript 3.9 (#1106)
This commit is contained in:
@@ -135,7 +135,7 @@ export interface ComponentOptionsBase<
|
||||
|
||||
// type-only differentiator to separate OptionWithoutProps from a constructor
|
||||
// type returned by defineComponent() or FunctionalComponent
|
||||
call?: never
|
||||
call?: (this: unknown, ...args: unknown[]) => never
|
||||
// type-only differentiators for built-in Vnode types
|
||||
__isFragment?: never
|
||||
__isTeleport?: never
|
||||
@@ -197,9 +197,9 @@ export interface MethodOptions {
|
||||
}
|
||||
|
||||
export type ExtractComputedReturns<T extends any> = {
|
||||
[key in keyof T]: T[key] extends { get: Function }
|
||||
? ReturnType<T[key]['get']>
|
||||
: ReturnType<T[key]>
|
||||
[key in keyof T]: T[key] extends { get: (...args: any[]) => infer TReturn }
|
||||
? TReturn
|
||||
: T[key] extends (...args: any[]) => infer TReturn ? TReturn : never
|
||||
}
|
||||
|
||||
type WatchOptionItem =
|
||||
|
||||
@@ -244,6 +244,7 @@ function createSuspenseBoundary(
|
||||
/* istanbul ignore if */
|
||||
if (__DEV__ && !__TEST__ && !hasWarned) {
|
||||
hasWarned = true
|
||||
// @ts-ignore `console.info` cannot be null error
|
||||
console[console.info ? 'info' : 'log'](
|
||||
`<Suspense> is an experimental feature and its API will likely change.`
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user