42. implement Equal<A, B>
Share
- accepted / - tried
Implement Equal<A, B>
to check if two types are identical.
Equal<any, any> // trueEqual<any, 1> // falseEqual<never, never> // trueEqual<'BFE', 'BFE'> // trueEqual<'BFE', string> // falseEqual<1 | 2, 2 | 1> // trueEqual<{a : number}, {a: number}> // true
there might not be a 100% perfect solution, so are the test cases from us.
let's all try with our best effort.