types: props validation for h

This commit is contained in:
Evan You
2019-09-05 11:11:33 -04:00
parent 81a31f79dc
commit 369b9eb583
4 changed files with 106 additions and 9 deletions

View File

@@ -16,7 +16,7 @@ import {
camelize
} from '@vue/shared'
import { computed, ComputedOptions } from './apiReactivity'
import { watch } from './apiWatch'
import { watch, WatchOptions } from './apiWatch'
import { provide, inject } from './apiInject'
import {
onBeforeMount,
@@ -45,16 +45,14 @@ export interface LegacyOptions {
// TODO watch array
watch?: Record<
string,
| string
| Function
| { handler: Function; deep?: boolean; immediate: boolean }
string | Function | { handler: Function } & WatchOptions
>
provide?: Data | (() => Data)
inject?:
| string[]
| Record<
string | symbol,
string | symbol | { from: string | symbol; default: any }
string | symbol | { from: string | symbol; default?: any }
>
// composition