DefinitelyTyped support for the online version
In the online version should be a way for the visitor to quick get the latest bindings for the desired js package. The https://github.com/DefinitelyTyped/DefinitelyTyped have the TS bindings we could use for that.
I suggest one of the following paths:
A. To clone the DT repo, generate all bindings at build time and adjust the site to consume that static content. The downside is the fact that we need to keep in sync with DT changes (can be made with a git hook) and the big number of js packages.
B. To adjust the site to have a search for DT binding and generate it at run-time using a cloud provider (serverless). The downside will be the associated price (we could cache some of the outputs if needed)
C. To add a full script on how to install ts2fable and an animated gif showing how to use a command line option that accepts only the name of the TS binding from the DefinitelyTyped repo and outputs the FSharp bindings (after is cloning locally the DT repo and creates the bindings for the required package)
Option A: could take a really long time to build, and keeping in sync is something hard to do.
Option B: I don't understand the serverless thing ? Why do we need it when ts2fable is working fully in the browser ?
Also, DefinitelyTyped is indeed a good source for typings but more and more the packages are hosting their typings directly inside their repo. That can be discovered from package.json, also npm is already mirroring the DefinitelyTyped types.
For example, if you look at @typed/xxxx if the typings exist in DefinitelyTyped then you will see it in the search result. I am in much favor of something like that:
- Ask user the binding name
- Search for it in npm
- Check if the typings is in the repo or no
- If yes, generate it
- If no, search for
@typed/xxx - If found generate the bindgin
- If no, inform the user
this would be awesome also for how to use the library! and to show examples to pp, thanks a lot for this lib!