fix(types): fix propType<any> type inference (#4985)

fix #4983
This commit is contained in:
fishDog
2021-11-25 17:52:13 +08:00
committed by GitHub
parent c17cbdc28f
commit 3c449cd408
4 changed files with 12 additions and 3 deletions

View File

@@ -6,3 +6,5 @@ export type UnionToIntersection<U> = (
// make keys required but keep undefined values
export type LooseRequired<T> = { [P in string & keyof T]: T[P] }
export type IfAny<T, Y, N> = 0 extends (1 & T) ? Y : N