You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior:
Compiles sucessfully using strictNullChecks compiler option. Works correctly with typescript 3.8.3.
Actual behavior:
Compilation fails even though the spread does not overwrite anything since message is a non-enumarable property on Error. Without setting strictNullChecks it works correctly in typescript 3.9.2.
test.ts:3:5 - error TS2783: 'message' is specified more than once, so this usage will be overwritten.
3 message: err.message,
~~~~~~~~~~~~~~~~~~~~
test.ts:4:5
4 ...err
~~~~~~
This spread always overwrites this property.
Playground Link:
Related Issues:#38577 seems to be a fix for a similar problem
The text was updated successfully, but these errors were encountered:
TypeScript Version: 3.9.2, 4.0.0-dev.20200514, latest master (7fc456f)
Search Terms:
Code
Expected behavior:
Compiles sucessfully using
strictNullChecks
compiler option. Works correctly with typescript 3.8.3.Actual behavior:
Compilation fails even though the spread does not overwrite anything since
message
is a non-enumarable property on Error. Without settingstrictNullChecks
it works correctly in typescript 3.9.2.Playground Link:
Related Issues: #38577 seems to be a fix for a similar problem
The text was updated successfully, but these errors were encountered: