Closed
Description
openedon Sep 5, 2022
Bug Report
π Search Terms
- in operator
- generic
- intersection
- object
- never
π Version & Regression Information
- This changed between versions 4.7 and 4.8
β― Playground Link
Playground link with relevant code
π» Code
const f3 = <A,>(value: A) => {
if (
typeof value === "object" &&
value !== null &&
"prop" in value
) {
value;
// ^?
// TS 4.7: `A`
// TS 4.8: `never`
// Expected: `A & object`
}
};
π Actual behavior
See above.
π Expected behavior
See above.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment