Skip to content

Commit

Permalink
fix: type
Browse files Browse the repository at this point in the history
  • Loading branch information
KazariEX committed Sep 29, 2024
1 parent 674c297 commit e6e57de
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/shared/src/typeUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ 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> = unknown extends T
? false
: keyof T extends K
? true
: false
export type IsKeyValues<T, K = string> = IfAny<
T,
false,
T extends object ? (keyof T extends K ? true : false) : false
>

/**
* Utility for extracting the parameters from a function overload (for typed emits)
Expand Down

0 comments on commit e6e57de

Please sign in to comment.