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
currently when we see a constraint <A extends B> it means A is a subtype of B, so that
declarevara: A;declarevarb: B;b=a;// alloweda=b;// not allowed
consider adding a new constraint of the reversed relation: <A within B> that would mean A is a supertype of B (or in other words B is subtype of A), so that:
declarevara: A;declarevarb: B;b=a;// not alloweda=b;// allowed
use case
i have a BigFatClass with 50 methods and a 1 little property, now i want to run some assertions over it, if i declare these assertions like expect<T>() and toEqual<T> of the same T then toEqual asks me for 50 methods that don't matter for the test, and that's the problem
what i need it to declare expect<T>() and toEqual<U within T>() so that i could simply write:
expect(newBigFatClass()).toEqual({value: true});
The text was updated successfully, but these errors were encountered:
currently when we see a constraint
<A extends B>
it means A is a subtype of B, so thatconsider adding a new constraint of the reversed relation:
<A within B>
that would mean A is a supertype of B (or in other words B is subtype of A), so that:use case
i have a
BigFatClass
with 50 methods and a 1 little property, now i want to run some assertions over it, if i declare these assertions likeexpect<T>()
andtoEqual<T>
of the sameT
thentoEqual
asks me for 50 methods that don't matter for the test, and that's the problemwhat i need it to declare
expect<T>()
andtoEqual<U within T>()
so that i could simply write:The text was updated successfully, but these errors were encountered: