Typescript's Limitations on Circular Use of `infer` in Schema
While debugging some issues I've been having with circular types, I discovered that the problem is largely related to typescript's limits regarding circular use of
Then you can redefine
And do a similar thing to
Is there any reason not to do this?
infer. Schema really only uses infer in a couple of places: From, To are the biggest culprits because they infer the types from functions using ReturnType, which uses infer under the hood. I found that if I patch Schema to:Then you can redefine
To/From to:And do a similar thing to
Class, then suddenly my recursive types work as expected.Is there any reason not to do this?
