-
Notifications
You must be signed in to change notification settings - Fork 11
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
--outDir and keeping source #19
Comments
I would advise against doing so… it is much less work to just convert it, and to fix type errors. If code was converted from flow to typescript using flows, without errors - it is guaranteed to be exactly the same after stripping the type information (there is a verification step which literally checks for this, if the check is failing - original After converting while Also, if starting with not strict typescript configuration - there are not too many manual fixes needed if you want to do migration gradually while continuing to work with flow version - it is still better to convert everything, and periodically rebase typescript version on master(this way it is much harder to get out of sync, and it is not too much work to do so - just rerun I am doing it in a few big projects, for example in opensource: (both are still work in progress and periodically are rebased) |
I cannot maintain alignment between the sources which I need to do. And will have to fork flowts or your babel-plugin-flow-to-typescript and use my existing babel superstructure otherwise. |
Can you provide a bit more details about your use case? I do not really understand the use case for this, still thinking it is better to just convert it in place in a branch - and so, would like to avoid adding new CLI argument, if possible. btw, another quick and dirty option, if you really need a copy of code converted to typescript - you can just copy flow sources to the destination place and to convert it there also, about babel-plugin-flow-to-typescript - if you need just it, you can use it directly - the version from flowts repository - is published on npm as |
I am converting a very large code base from Flow to TypeScript then to C++. I need to have continuity with the original Flow code, so I can give mods in Flow back to the original code base and have continuity in the conversion pipeline. Then I need to be able to keep alignment with the original Flow source code. |
Okay I have got my babel code working with @zxbodya/babel-plugin-flow-to-typescript. Many thanks ! |
I am doing a conversion from Flow to TypeScript when I am modifying the Flow source in order to get the TypeScript to compile properly without errors with tsc. So want to keep the source and have the TypeScript output in another directory tree, so need TypeScript like --outDIr.
e.g. to translate from src to ts :-
The text was updated successfully, but these errors were encountered: