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

types: assign type is note safe #420

Open
minx222 opened this issue Aug 2, 2024 · 1 comment
Open

types: assign type is note safe #420

minx222 opened this issue Aug 2, 2024 · 1 comment

Comments

@minx222
Copy link

minx222 commented Aug 2, 2024

when i use assign, i like
image
i's error.
i think it's type is safe.

declare const assign: <X extends Record<string | number | symbol, any>>(initial: X, override: X) => X;
like be

declare const assign: <X extends Record<string | number | symbol, any>, R extends Record<string | number | symbol, any> = T>(initial: X, override: R) => X & R;

@MarlonPassos-git
Copy link
Contributor

@minx222 I would recommend you to take a look at Radashi(a fork of radash) where we fixed this problem.

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

2 participants