Update dependencies and alter privacy of functions#7138
Update dependencies and alter privacy of functions#7138etimberg merged 6 commits intochartjs:masterfrom
Conversation
benmccann
left a comment
There was a problem hiding this comment.
I think I would remove the underscore from the @protected methods. The underscore basically indicates that they're internal methods, but if it's required for people to override them in order to implement a scale, etc. then they really can't just be internal
src/scales/scale.time.js
Outdated
| * @private | ||
| */ | ||
| _getLabelCapacity(exampleTime) { | ||
| getLabelCapacity(exampleTime) { |
There was a problem hiding this comment.
This is only used in this file. Can we keep it private?
|
Removed the underscores from protected. |
benmccann
left a comment
There was a problem hiding this comment.
thanks. this was a big change
src/core/core.datasetController.js
Outdated
| * @type {string[]|object} | ||
| * @private | ||
| */ | ||
| DatasetController.prototype._dataElementOptions = [ |
There was a problem hiding this comment.
We should make this @protected and remove the underscore? (same with _datasetElementOptions)
There was a problem hiding this comment.
ts does not like them protected (not in class). Could probably do that in #7125
Removed the underscore though.
| // all borders are drawn for floating bar | ||
| /* TODO: float bars border skipping magic | ||
| if (me._getParsed(i)._custom) { | ||
| if (me.getParsed(i)._custom) { |
There was a problem hiding this comment.
Can we just remove this commented code?
There was a problem hiding this comment.
Maybe let's handle separately? It may be helpful to leave this until we fix the TODO and fixing the TODO seems big enough that it should be a separate item. I put a reminder in the v3 tracking bug to go through and fix any TODOs so that we don't forget
So, this was supposed to be a simple typescript update. But as I found out, in typescript 3.8 the
@privatemeans private to the class (and not to the lib as its been used here)Some of those I changed to
@protected(accessible from extended classes)Some I made public (and removed the underscore).