-
Notifications
You must be signed in to change notification settings - Fork 12.8k
ObjectConstructor.assign #35621
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
Comments
The typing used to be correct as the default constraint for a generic type parameter was at one time |
Guys, as I understand the fix is available for almost half a year already. What prevents it from being merged? |
We need to make sure it doesn't cause a lot of breaking changes. I ran the user tests and Definitely Typed tests to see what code there might break. |
* fixes #35621 * undo changes to generated file * undo whitespace fixup attempt * update baselines Co-authored-by: TrejGun <[email protected]>
TypeScript Version: 3.7.2
Search Terms:
ObjectConstructor, Object, assign, target, null
Code
this works because
but T can't be null
Expected behavior:
type error is risen ts and reported by typescript-eslint
Actual behavior:
type error in js
Playground Link:
http://www.typescriptlang.org/play/?ssl=1&ssc=26&pln=1&pc=21#code/PIIwVgpgxgLgdAQwM5IJYHMB2AKTBXAGwIBoACAbwQC4BGAXwEog
Related Issues:
#3429
The text was updated successfully, but these errors were encountered: