types: support object as props type (#3165)

This commit is contained in:
HcySunYang
2021-02-25 05:20:41 +08:00
committed by GitHub
parent 354966204e
commit 4a965802e8
2 changed files with 8 additions and 3 deletions

View File

@@ -56,7 +56,7 @@ interface PropOptions<T = any, D = T> {
export type PropType<T> = PropConstructor<T> | PropConstructor<T>[]
type PropConstructor<T = any> =
| { new (...args: any[]): T & object }
| { new (...args: any[]): T & {} }
| { (): T }
| PropMethod<T>