types: improve typing

This commit is contained in:
Evan You
2019-10-08 09:26:09 -04:00
parent 016231d09f
commit 1393ee52ca
8 changed files with 42 additions and 24 deletions

View File

@@ -16,7 +16,11 @@ import {
import { warn } from './warning'
import { Data, ComponentInternalInstance } from './component'
export type ComponentPropsOptions<P = Data> = {
export type ComponentPropsOptions<P = Data> =
| ComponentObjectPropsOptions<P>
| string[]
export type ComponentObjectPropsOptions<P = Data> = {
[K in keyof P]: Prop<P[K]> | null
}