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
I'm creating a TypeScript definition file (will push back into the project when done), and noticed that every setter is also returning the value set - this does nothing and is unused, so the return itself can be removed (it's just wasting space and potentially creating confusion):
@Rycochet thanks for the tip - returning values from setters is a habit from my C++ days, I hadn't realised they were being ignored.
I've removed returns from setters and pushed to the repo
I'm creating a TypeScript definition file (will push back into the project when done), and noticed that every setter is also returning the value set - this does nothing and is unused, so the
return
itself can be removed (it's just wasting space and potentially creating confusion):IE. https://github.com/guyonroche/exceljs/blob/master/lib/doc/cell.js#L85
...should be...
A cascading sum like
a = b = c
will call the getter onc
, then the setter onb
, then the getter onb
, and finally the setter ona
.https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/set
(Although it's not directly clear from the docs, there is an explicit
return
in the getter, and none in the setter, in addition to all the examples.)The text was updated successfully, but these errors were encountered: