-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Convert helpers.extra to TS #10728
Convert helpers.extra to TS #10728
Conversation
const event = args[0]; | ||
return [event, event.offsetX, event.offsetY]; | ||
}); | ||
}, chart); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initially I had provided some very complex types for throttled
so that we could verify the arguments to the callback function. However, this identified that we don't actually use the 2nd and 3rd parameters here so I removed the 3rd argument. That change allowed removal of the updateFn
from the helper which is the breaking change
Test failure will be fixed in #10729 and then I will rebase this PR |
cf71ca0
to
ae1c5a7
Compare
import {_limitValue} from './helpers.math'; | ||
import {_lookupByKey} from './helpers.collection'; | ||
|
||
export function fontString(pixelSize, fontStyle, fontFamily) { | ||
export function fontString(pixelSize: number, fontStyle: string, fontFamily: string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want the fontStyle
types as the different types like bold, italic etc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could. Not sure how complicated that might be given all the combinations of styles that could be supplied
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably not worth the effort
ae1c5a7
to
be3d163
Compare
Converts the
helpers.extra
file to TS. I took the opportunity to simplify thethrottled
helper which is the breaking change