Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Type Inference with mergeDeepRight, mergeDeepLeft, mergeRight, mergeLeft when Merging T and Partial<T> #130

Open
o-svetlichnyi opened this issue Oct 21, 2024 · 0 comments

Comments

@o-svetlichnyi
Copy link

Description:

After updating to the latest versions of ramda and @types/ramda, I encountered an issue with the type inference of the mergeDeepRight function in TypeScript. Specifically, when merging an object of type T with a Partial, the resulting type is not correctly inferred as T. Instead, properties are being inferred as unknown, leading to type errors.

This behavior did not occur in the previous versions ([email protected] and @types/[email protected]), where the types were correctly inferred, and the merge operation worked without any type assertions or errors.

Affected Versions:

    "@types/ramda": "^0.30.2",
    "ramda": "^0.30.1",
    "typescript": "^5.5.4"

Reproduction:
https://stackblitz.com/edit/vitejs-vite-xsspwg?file=index.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant