fix(sfc/types): allow use default factory for primitive types in withDefaults (#5939)

fix #5938
This commit is contained in:
Alex Kozack
2022-05-23 03:28:39 +03:00
committed by GitHub
parent dddbd96dfe
commit b5462822d6
2 changed files with 8 additions and 3 deletions

View File

@@ -139,7 +139,7 @@ type InferDefault<P, T> = T extends
| boolean
| symbol
| Function
? T
? T | ((props: P) => T)
: (props: P) => T
type PropsWithDefaults<Base, Defaults> = Base & {