// * All tests in this file run at compile/editing time. // * Therefore, the tests succeed if you open it in a TypeScript editor and // see no errors. import { type Assert, type Assignable, type Equal, type Extends, type Not, type PedanticEqual } from 'asserttt'; { // `PedanticEqual` is not useful with intersections type Point = { x: number } & { y: number }; type _ = [ Assert>>, Assert>, ]; } { // `PedanticEqual` bug with `exactOptionalPropertyTypes` type T1 = { prop?: string, } type T2 = { prop?: undefined | string, } type _ = [ // ❌ Bug: T1 and T2 are considered pedantically equal Assert>, // T1 and T2 are not considered loosely equal Assert>>, // T2 is not assignable to T1 Assert>>, // T1 is assignable to T2 Assert>, ]; } { // `PedanticEqual` is not useful with enums enum NoYes { No, Yes } type _ = [ Assert>>, Assert>, Assert>, Assert>, ]; } { // Rare quirk type _ = [ Assert>>, ]; }