FormidableLabs / FormidableLabs/victory

VictoryLine animate prop does not accept an object

Open
#2,359 0 comments 4 reactions 0 assignees View on GitHub
Issue: Accepted Type: Bug :bug:
Dominant language
TypeScript
Stars
11.2k
Forks
536
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
In the transition to typescript for VictoryLine a type override for the prop animate was made that breaks the typing. You can no longer give the animate prop an object without getting a type error. This is because it overrides the default of accepting a boolean or an object and now only accepts a boolean.

**Victory version**
36.5.4

**Expected behavior**
The VictoryLine animate prop should accept an object.

**Screenshots**
[The commit that caused the issue.](https://github.com/FormidableLabs/victory/commit/2d5e11159d4dc4137d7d57c6c7c2ae9e90913def)

See this commit, the addition at the bottom here that adds `animate: boolean` to the props is the culprit, it can be safely removed.

Contributor guide

Open the contributing guide

Research direction

Start with the VictoryLine props definition and inspect the linked commit, especially the added animate type override. Confirm the existing animate object usage and remove the restriction that rejects it, then run the repository's TypeScript checks or relevant tests to verify object values are accepted.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
data-visualization, frontend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.