utils.ts 223 B

123
  1. // If the the type T accepts type "any", output type Y, otherwise output type N.
  2. // https://stackoverflow.com/questions/49927523/disallow-call-with-any/49928360#49928360
  3. export type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N