# 5.4 Breaking Changes https://github.com/microsoft/TypeScript/issues/57117 * #56004 * Used to be that constraint of a conditional type on a type parameter would just run the constraint of the type variable through the conditional type. * But the concrete type could hold a more specific type, so that's incorrect. * Existing code assumes we will always evaluate using the based constraint. * In the error detector, this hits Drizzle, Qwik, react-hook-form, refined-github. * Particularly hard to figure out what is going on. * Are they all hard to fix? * Yes, sorta. * Qwik could rewrite a type to an intersection (we think). * react-hook-form could've made a type guard that's more specific to the codebase. * #54477 * What was the issue this was trying to fix? * No issue filed - but makes the behavior of `couldContainTypeVariables` observable (which is purely for performance). * Let's revert if possible. * #56515 * Breaks a signature like `<U, extends Equals<T, U>>` in react-redux type helpers. * They can move the `Equals` out of the constraint, and rewrite it as an intersection. * `<U extends T>(u: U & Equals<T, U>) => {}` * https://github.com/reduxjs/react-redux/pull/2123 * Feelings? * #56004 is the hardest one to fix, but it is definitely more correct. * Will have to document it, we would like to keep that. # Supporting Named ESM Imports from the TypeScript API https://github.com/microsoft/TypeScript/pull/57133 * Proof-of-concept that adds an object that is friendly to cjs-module-lexer. * If part of the build requires importing the compiler to build up that object, is that a security issue for PRs? * Already running build scripts etc. * If you use `export = `, we emit stuff that is not friendly to cjs-module-lexer? * The lexer cannot deal with non-shorthand property declarations. * What??? * Feels like people are not happy with it since we don't fully understand the implications, but not strongly against it.
5.4 Breaking Changes
#57117
Improve constraints of conditional types applied to constrained type variables #56004
Allow non-generic return types to be read from single generic call signatures #54477
couldContainTypeVariablesobservable (which is purely for performance).Reduce intersections of constrained type variables and primitive types #56515
<U, extends Equals<T, U>>in react-redux type helpers.Equalsout of the constraint, and rewrite it as an intersection.<U extends T>(u: U & Equals<T, U>) => {}Equalsconstraint into an intersection type. reduxjs/react-redux#2123Feelings?
Supporting Named ESM Imports from the TypeScript API
#57133
export =, we emit stuff that is not friendly to cjs-module-lexer?