You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It works for ObjectEqual<Array<any>, Array<number>>, but not for ObjectEqual<Array<Array<any>>, Array<Array<number>>, nor ObjectEqual<Promise<any>, Promise<number>>.
As far as I can tell, there's nothing you can do in the language where Promise<any> reacts differently from Promise<number>, same for deeply nested arrays, without going recursive.
I'm hoping there's some sort of trick that applies here where you can get a type into weird state where the two are distinguishable (in the vein of NoInfer).
The text was updated successfully, but these errors were encountered:
Alright, no problem. I figured as much, seeing as Typical doesn't have it :)
I'm trying to use the Equal to set up semantic tests. I tried using type-checker, but it doesn't like my project somehow. Is Tsst ready for light production use? I haven't heard about it in a while.
It kinda worked for me, yeah. Small target audience though.
So I forked it to e.g. let the consuming lib decide on TS version.
I had trouble using TS off git tho (npm worked okay).
I need a type that is able to distinguish
Promise<any>
fromPromise<number>
.This is as far as I've gotten:
It works for
ObjectEqual<Array<any>, Array<number>>
, but not forObjectEqual<Array<Array<any>>, Array<Array<number>>
, norObjectEqual<Promise<any>, Promise<number>>
.As far as I can tell, there's nothing you can do in the language where
Promise<any>
reacts differently fromPromise<number>
, same for deeply nested arrays, without going recursive.I'm hoping there's some sort of trick that applies here where you can get a type into weird state where the two are distinguishable (in the vein of NoInfer).
The text was updated successfully, but these errors were encountered: