types(runtime-core): argument for props validator

Unfortunately it requires explicit annotation for now
This commit is contained in:
Evan You
2020-08-18 11:37:34 -04:00
parent a88895b5da
commit 9f92871c80
2 changed files with 9 additions and 1 deletions

View File

@@ -42,7 +42,7 @@ export type ComponentObjectPropsOptions<P = Data> = {
export type Prop<T, D = T> = PropOptions<T, D> | PropType<T>
type DefaultFactory<T> = () => T | null | undefined
type DefaultFactory<T> = (props: Data) => T | null | undefined
interface PropOptions<T = any, D = T> {
type?: PropType<T> | true | null