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

Move from Flow to TypeScript #982

Open
alexreardon opened this issue Dec 4, 2018 · 13 comments
Open

Move from Flow to TypeScript #982

alexreardon opened this issue Dec 4, 2018 · 13 comments

Comments

@alexreardon
Copy link
Collaborator

alexreardon commented Dec 4, 2018

At Atlassian we consolidating on a single type system: TypeScript.

In 2019 we plan on moving react-beautiful-dnd to TypeScript.

We still hope to have a good flow story through the flowtyped project. We can essentially just use our existing flow types for a react-beautiful-dnd library definition.

@alexreardon
Copy link
Collaborator Author

alexreardon commented Dec 4, 2018

For me personally this is not a negative reflection on flow. I really enjoy using it. However, there are advantages for us in consolidating on a type system internally. Also, my understanding is that TypeScript is a more popular project so a lot more people will get first class types when we move over

❤️

@alexreardon alexreardon changed the title Move from Flow to TypeScript Move from Flow to TypeScript (early 2019) Dec 4, 2018
@alexreardon alexreardon changed the title Move from Flow to TypeScript (early 2019) Move from Flow to TypeScript Dec 4, 2018
@TrySound
Copy link
Contributor

TrySound commented Dec 5, 2018

I would prefer you to keep flow types up-to-date in this repo. As you can see there's not so much people who will maintain them separately.

@TrySound
Copy link
Contributor

How about rewriting with reason? Type system is much nicer.

@lilymatcha
Copy link

@alexreardon This is an exciting development! Since Typescript is more widely used, it will also help make it easier for people to contribute to the project. Within 2019, what is your expected timeline for this migration?

@treshugart
Copy link

Just as we didn't want to maintain TS types when the source was in Flow, I don't think it's worth maintaining Flow types when moving to TS.

@lilymatcha Alex will be back mid-Jan. See #1010 for more details.

@TrySound
Copy link
Contributor

TrySound commented Jan 7, 2019

@treshugart Flow types will be maintained. There are existing users.

@alexreardon
Copy link
Collaborator Author

@TrySound I am still thinking of the best way to maintain the flow types. Given they already exist I am open to having them in the repo. Once we start on the TypeScript conversion then we will have a better idea what the story could be

@TrySound
Copy link
Contributor

Types will be quite small. So it won't take a lot of efforts to maintain them. Keeping them separately will make them out of date soon.

@mdestagnol
Copy link

@alexreardon good news for typescript. Do you guys also plan to move over Atlaskit?

@nutboltu
Copy link
Member

nutboltu commented Mar 14, 2019

@alexreardon Great initiatives! For initial step, any thoughts of moving @types/react-beautiful-dnd to this repos?

@MaximSagan
Copy link

@alexreardon Has the migration to TS been abandoned?

@eran-pinhas
Copy link

eran-pinhas commented Aug 11, 2020

Hey guys, thought I would give it a shot

I tried running Khan Academy's flow-to-ts on a single file and it seems to do a decent job. Sure that it's not the only change need to be done, but it seems like a good start for the bulk of the code.

I'm just wondering how we should manage the existing PRs, 99% of the files would be completely different after the transition: The file names would be .ts/.tsx instead of .js/.jsx, the content would quite different as well and some config file would require changes as well. Only solution I can think of is to write a bash script that does this transition automatically so it could be applied on forked repos as well. The only problem with that is that applying all of the changes using script may be quite complicated...

Would love to hear your thoughts about it

Cheers

UPDATE: started out here

@100terres
Copy link
Contributor

100terres commented Feb 25, 2022

react-beautiful-dnd has been fully migrated to TypeScript here: https://github.com/react-forked/dnd 🙂 The repo is a fork of rbd that I plan to maintain.

Here's a blog post about it. Give it a try 🙂

@alexreardon alexreardon unpinned this issue Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants