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

fix(TS): add types to untyped empty arrays #8830

Merged
merged 2 commits into from
Apr 12, 2023

Conversation

jasonkang14
Copy link
Contributor

Motivation

I was trying to deploy my service using the beta version but ran into some type errors
Screenshot 2023-04-10 at 11 41 49 AM

I added types to the specific section in the screenshot and found other areas where similar problems may occur

Description

Add types to an empty arrays that takes fabric objects as elements

Changes

empty arrays in CircleBrush.ts, SparyBrush.ts, parseColorStops.ts, Intersection.ts are now declared with types

Gist

In Action

passed all the tests
Screenshot 2023-04-10 at 11 49 37 AM

@asturur
Copy link
Member

asturur commented Apr 10, 2023

hi @jasonkang14 thank for the PR.
If tests pass i ll merge it right away.

@jasonkang14
Copy link
Contributor Author

@asturur i see that it has failed some tests. should i try to add more fixes?

@asturur
Copy link
Member

asturur commented Apr 10, 2023

No those steps fails because you work from a fork and that is epxected.
The only thing you can fix ( and you should ) is adding a changelog line to the CHANGELOG.md file that says
fix(TS): add types to some untyped empty arrays [PR-LINK]

@jasonkang14
Copy link
Contributor Author

Done!

Screenshot 2023-04-11 at 12 58 15 PM

@asturur asturur merged commit b9d3cc4 into fabricjs:master Apr 12, 2023
@jasonkang14 jasonkang14 changed the title Fix type error associated with never fix(TS): add types to untyped empty arrays Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants