Skip to content
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 the curve helpers to TS #10733

Merged
merged 2 commits into from Oct 7, 2022
Merged

Conversation

etimberg
Copy link
Member

@etimberg etimberg commented Oct 1, 2022

Converts the curve helpers to TS

@etimberg etimberg added the type: types Typescript type changes label Oct 1, 2022
src/helpers/helpers.curve.ts Outdated Show resolved Hide resolved
@@ -144,20 +162,20 @@ export function splineCurveMonotone(points, indexAxis = 'x') {
}
mK[i] = !pointBefore ? deltaK[i]
: !pointAfter ? deltaK[i - 1]
: (sign(deltaK[i - 1]) !== sign(deltaK[i])) ? 0
: (deltaK[i - 1] + deltaK[i]) / 2;
: (sign(deltaK[i - 1]) !== sign(deltaK[i])) ? 0
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TS files seem to have different linting for spaces than JS ones, hence this change

kurkle
kurkle previously approved these changes Oct 6, 2022
@etimberg etimberg merged commit 41612d1 into chartjs:master Oct 7, 2022
@etimberg etimberg deleted the curve-helpers-ts branch October 7, 2022 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change type: types Typescript type changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants