We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d0695da commit 109453fCopy full SHA for 109453f
packages/shared/src/typeUtils.ts
@@ -7,4 +7,7 @@ export type UnionToIntersection<U> = (
7
// make keys required but keep undefined values
8
export type LooseRequired<T> = { [P in string & keyof T]: T[P] }
9
10
+
11
+// If the the type T accepts type "any", output type Y, otherwise output type N.
12
+// https://stackoverflow.com/questions/49927523/disallow-call-with-any/49928360#49928360
13
export type IfAny<T, Y, N> = 0 extends (1 & T) ? Y : N
0 commit comments