Back to Type Challenges

README

questions/19749-medium-isequal/README.md

latest1.3 KB
Original Source
<!--info-header-start--><h1>IsEqual </h1><blockquote><p>by Takahiro Kato <a href="https://github.com/doz13189" target="_blank">@doz13189</a></p></blockquote><p><a href="https://tsch.js.org/19749/play" target="_blank"></a> </p><!--info-header-end-->

Implements the equal operator that returns a boolean for whether the two given types are equal.

For example:

ts
type X1 = 1
type Y1 = 1
type T1 = IsEqual<X1, Y1> // expected to be true

type X2 = 1
type Y2 = 2
type T2 = IsEqual<X2, Y2> // expected to be false
<!--info-footer-start-->

<a href="../../README.md" target="_blank"></a> <a href="https://tsch.js.org/19749/answer" target="_blank"></a> <a href="https://tsch.js.org/19749/solutions" target="_blank"></a> <!--info-footer-end-->