Skip to content

Conversation

Smrtnyk
Copy link
Contributor

@Smrtnyk Smrtnyk commented Apr 11, 2025

I noticed that typescript in fabric is already getting old
This updates to latest one as of now which is 5.8.
There was one type issue that ocurred in image.ts which was because filter was destructured it got implicit any type so I had to define it without destructuring (it is still inferred as any because that is how it is typed, it is just that typescript doesn't like implicit any since that is configured in tsconfig)
I ran build and tests and everything seems fine

Copy link

codesandbox bot commented Apr 11, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@asturur
Copy link
Member

asturur commented Apr 12, 2025

I wanted to do this, but when i heard that the new version is written in go and is 10x faster i just wanted to wait.
But since you made the work, let's move on

@asturur
Copy link
Member

asturur commented Apr 12, 2025

i hoped TS would grow with better understanding rather than poorer.
Destructuring is one of the nice modern JS syntaxes, and that promise there can return either undefined or that exact type, i don't understand why it doesn't accept it.

@Smrtnyk
Copy link
Contributor Author

Smrtnyk commented Apr 12, 2025

I wanted to do this, but when i heard that the new version is written in go and is 10x faster i just wanted to wait. But since you made the work, let's move on

that will take a while unfortunately
strada is scheduled for end of the year I think

@Smrtnyk
Copy link
Contributor Author

Smrtnyk commented Apr 12, 2025

i hoped TS would grow with better understanding rather than poorer. Destructuring is one of the nice modern JS syntaxes, and that promise there can return either undefined or that exact type, i don't understand why it doesn't accept it.

I understand what you mean, but it is the best we get currently in js world
I am sure after they migrate to strada and ts go is the new default they will resume on improving the language and making it better

@asturur
Copy link
Member

asturur commented Apr 12, 2025

image

you would think you made it at this point.
nope.

@asturur
Copy link
Member

asturur commented Apr 12, 2025

i hoped TS would grow with better understanding rather than poorer. Destructuring is one of the nice modern JS syntaxes, and that promise there can return either undefined or that exact type, i don't understand why it doesn't accept it.

I understand what you mean, but it is the best we get currently in js world I am sure after they migrate to strada and ts go is the new default they will resume on improving the language and making it better

Is not bad at all, is just a bit less smarter than i expected

@asturur
Copy link
Member

asturur commented Apr 12, 2025

There are a bunch of TS-NOCHECK or TS-IGNORE around the codebase that will need to be re-evaluated to understand if TS offers a way to fix them

@Smrtnyk
Copy link
Contributor Author

Smrtnyk commented Apr 12, 2025

There are a bunch of TS-NOCHECK or TS-IGNORE around the codebase that will need to be re-evaluated to understand if TS offers a way to fix them

I plan to finish migration of qunit to vitest and also visual to playwright
then I could have a look at typescript

@asturur
Copy link
Member

asturur commented Apr 12, 2025

There are a bunch of TS-NOCHECK or TS-IGNORE around the codebase that will need to be re-evaluated to understand if TS offers a way to fix them

I plan to finish migration of qunit to vitest and also visual to playwright then I could have a look at typescript

Yes i wan't asking you to do so, just to inform that ususally when i bump i go and i look for solutions to old problems to see if they have been included. Is how i learn.

For the visual tests there is already a framework is just a matter of moving the functions, i started already but i m not sure of long term stability

i m finishing the actions from forks so they all pass, i ll finish my gradient PR and i ll update the website to handle versioned docs in someway, you don't have to do all the tests if you get bored stop

@asturur asturur merged commit 1ba5cbe into fabricjs:master Apr 12, 2025
20 of 22 checks passed
@Smrtnyk
Copy link
Contributor Author

Smrtnyk commented Apr 12, 2025

There are a bunch of TS-NOCHECK or TS-IGNORE around the codebase that will need to be re-evaluated to understand if TS offers a way to fix them

I plan to finish migration of qunit to vitest and also visual to playwright then I could have a look at typescript

Yes i wan't asking you to do so, just to inform that ususally when i bump i go and i look for solutions to old problems to see if they have been included. Is how i learn.

For the visual tests there is already a framework is just a matter of moving the functions, i started already but i m not sure of long term stability

i m finishing the actions from forks so they all pass, i ll finish my gradient PR and i ll update the website to handle versioned docs in someway, you don't have to do all the tests if you get bored stop

no worries, I am not a maths guy so I can't really help much with fabrics source code
but with tests I have experience
also moving to vitest is easy and straight forward, just a bit of manual work but it is not a big deal
playwright will be more interesting part
I already started studying the current playwright setup and opened a PR to simplify it a bit.
The reason I want to help is that I am using fabric for my personal project and also I would like you to have more time to focus on actual fabric features and bugfixes so that project can move forward with the time

@Smrtnyk Smrtnyk deleted the chore()-update-typescript-to-latest branch April 12, 2025 06:44
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.

2 participants