Fable
                                
                                 Fable copied to clipboard
                                
                                    Fable copied to clipboard
                            
                            
                            
                        [Not working] Prototype implementation for support TypeScript with fable-splitter
The implementation doesn't work yet because we need a way to handle the TS imports.
Indeed, when detecting an import of an existing TypeScript file we should copy the TS file without passing via Babel and also detect all the import/require from that file to copy with and so on.
I think we need a different toolchain when handling JavaScript or TypeScript generation.
@ncave Any idea, how to get the TypeScript imports? One solution I had is to use the TypeScript compiler in order to get the AST but getting the imports list from it doesn't seem to be easy.
The idea is to remove the fable-library folder and have fable-library-js and fable-library-ts and Fable choose which folder to use depending on the target.
@MangelMaxime I'm not sure, perhaps some of those changes can be avoided, perhaps we can leave everything working just as it is today, only bundle an additional fable-library-ts folder that would be copied to the target path as fable-library to replace the one there (if the --typescript flag is enabled) as a post-build step.
We can even make this post-build step a bit smarter to only replace the fable-library files that are there with their .ts version, instead of copying the whole folder.
Indeed perhaps but I don't think this will allow fable-splitter to copy/paste the files that the user code imported.
For example, if he wrote a .ts or .js file manually and used an import to import them.
It is worth to note that I wrote the prototype also to understand how everything is wired in Fable toolchain. But I figure out it could be nice to share for brainstorming how to activate support of the now typescript generation.