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.`
|
||||
)
|
||||
|
||||
1
packages/runtime-dom/types/jsx.d.ts
vendored
1
packages/runtime-dom/types/jsx.d.ts
vendored
@@ -1331,6 +1331,7 @@ declare global {
|
||||
}
|
||||
interface IntrinsicElements extends NativeElements {
|
||||
// allow arbitrary elements
|
||||
// @ts-ignore supress ts:2374 = Duplicate string index signature.
|
||||
[name: string]: any
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
if (__BROWSER__ && __DEV__) {
|
||||
// @ts-ignore `console.info` cannot be null error
|
||||
console[console.info ? 'info' : 'log'](
|
||||
`You are running a development build of Vue.\n` +
|
||||
`Make sure to use the production build (*.prod.js) when deploying for production.`
|
||||
|
||||
Reference in New Issue
Block a user