mirror of https://github.com/vuejs/core.git
fix: use `PropertyKey`
This commit is contained in:
parent
61eab94700
commit
b2c140424c
|
@ -13,7 +13,7 @@ export type LooseRequired<T> = { [P in keyof (T & Required<T>)]: T[P] }
|
|||
// https://stackoverflow.com/questions/49927523/disallow-call-with-any/49928360#49928360
|
||||
export type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N
|
||||
|
||||
export type IsKeyValues<T, K = string> = IfAny<
|
||||
export type IsKeyValues<T, K = PropertyKey> = IfAny<
|
||||
T,
|
||||
false,
|
||||
T extends object ? (NonNullable<keyof T> extends K ? true : false) : false
|
||||
|
|
Loading…
Reference in New Issue