sindresorhus / type-fest

A collection of essential TypeScript types
Creative Commons Zero v1.0 Universal
14.41k stars 547 forks source link

`Exact`: Fix usage with recursive types and unions #949

Closed abrenneke closed 2 months ago

abrenneke commented 2 months ago

Fixes #948

This moves IsEqual to be the first check, before any distribution, restoring the behavior before #911.

Wrote a test for it, and all tests are still passing, including those written for #911!

abrenneke commented 2 months ago

@zorji I'm assuming because the tests pass, that this doesn't revert any of the behavior you fixed in #911 but it's possible I suppose?

zorji commented 2 months ago

@abrenneke Sorry for the late reply. I think the implementation is OK but I have a question for the test case.