Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Curious on your thoughts / comparison of TypeStat to ts-migrate? Room for both? One or the other? #1317

Closed
GitMurf opened this issue Sep 14, 2023 · 8 comments · May be fixed by #1314
Closed
Assignees
Labels
area: documentation Improvements or additions to docs 📝

Comments

@GitMurf
Copy link

GitMurf commented Sep 14, 2023

As the title says, I am curious on whether there is an opinion on whether TypeStat can and/or should be used together with (or instead of) ts-migrate? Do they do different things well? Or are they essentially the same type of tool?

Thanks for your amazing work as always!

@JoshuaKGoldberg JoshuaKGoldberg self-assigned this Sep 14, 2023
@JoshuaKGoldberg JoshuaKGoldberg added the area: documentation Improvements or additions to docs 📝 label Sep 14, 2023
@JoshuaKGoldberg
Copy link
Owner

Yeah that's a great question! https://github.com/airbnb/ts-migrate is a great package and works really well. I think that right now, because of how early stage & buggy (🙃) TypeStat is, I'd probably recommend teams use ts-migrate over TypeStat for now.

The reason why TypeStat isn't as "production ready" as ts-migrate is that it's got much larger aims as a project. ts-migrate gets you to a starting place as conveniently and quickly as possible. It suppresses type errors but doesn't do much about getting you to the best possible types. TypeStat, on the other hand, aims to do that convenient+quick work plus improving your types as much as possible. Improving types is a very difficult, even unsolvable challenge!

Medium-to-long term, I think TypeStat will be more "competitive" (in a friendly, supportive sense!):

My plans for 2023 didn't start off with #1000 or #1314. I think I'm going to end up making a lot of progress on #1314 this season in service of #1318.


All that is to say: yes, resolving this docs issue is part of #1314. Great question & thanks for asking!

@GitMurf
Copy link
Author

GitMurf commented Sep 15, 2023

Love it all! I don't have any bandwidth right now to help but as soon as I get some I will be happy to try and help if I can.

A couple notes, ts-migrate appears to have quite a few bugs today given it hasn't been updated in a bit and my hunch is a lot to do with TS 5.0 as well as older eslint (core part of its workflow). Things like the "satisfies" keyword is not recognized so they all get ts-ignored. And another big issue I had was JSX comments as they are not properly {/* @ts-expect ... *\} in curly braces. See here: airbnb/ts-migrate#150

Also would be nice to have a more generalized (non react specific) workflow as I use solid-js for example.

Additionally a real bummer is when you try to re-run ts-migrate it actually reverts a lot of manual fixes to the Jsx comments for example :( point is, there is definitely a need for what you are working on today more than ever! Even just the ts-initialize piece will be very beneficial with an updated look with ts 5+ 👍

@GitMurf
Copy link
Author

GitMurf commented Feb 5, 2024

Curious where things sit today? We are preparing to finish off the rest of our js to ts migration by running either ts-migrate or typestat. We are doing everything net new in TS but still have all our grandfathered js code that gives us all the fun red squigglies. Our main goal is to draw a line in the sand so that we can actually add tsc type checking to our CLI and know when new errors are introduced... which we cannot do with our 600 leftover errors. Thanks as always for the amazing work in the TS community!

@JoshuaKGoldberg
Copy link
Owner

Things haven't changed at all since you last checked in, I'm afraid. I've put this on my list of 2024 initiatives - so you can expect something within the next ~11 months or so.

...I imagine that's probably not super helpful given you're finishing off the rest of your migration now, sorry. 😓

@GitMurf
Copy link
Author

GitMurf commented Feb 24, 2024

@JoshuaKGoldberg I want to be mindful of abusing gh issues with stuff that doesn't belong there. Would you be open to adding gh discussions to this repo to have a place where the community can ask questions and discuss amongst ourselves any tips, tricks, learnings, problems etc.? Thanks!

@JoshuaKGoldberg
Copy link
Owner

Sure, just opened it up - thanks for asking! ❤️

@GitMurf
Copy link
Author

GitMurf commented Feb 24, 2024

Sure, just opened it up - thanks for asking! ❤️

Man you're fast! Thank you good sir!

@GitMurf
Copy link
Author

GitMurf commented Feb 24, 2024

@JoshuaKGoldberg actually maybe this issue itself is a good candidate to convert to a Discussion item? I don't think I am able to do it. Thoughts?

Repository owner locked and limited conversation to collaborators Feb 24, 2024
@JoshuaKGoldberg JoshuaKGoldberg converted this issue into discussion #1424 Feb 24, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
area: documentation Improvements or additions to docs 📝
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants