When trying to generate .d.ts files as described in the documentation, I get the following error:
$ bsb -make-world -bs-gen-tds
/Users/antoine/Documents/work/bucklescript/hello/node_modules/bs-platform/bin/bsb.exe: unknown option '-bs-gen-tds'.
Usage : bsb.exe <bsb-options> -- <ninja_options>
For ninja options, try ninja -h
ninja will be loaded either by just running `bsb.exe' or `bsb.exe .. -- ..`
It is always recommended to run ninja via bsb.exe
Bsb options are:
-color forced color output
-no-color forced no color output
-w Watch mode
-regen (internal)Always regenerate build.ninja no matter bsconfig.json is changed or not (for debugging purpose)
-clean-world Clean all bs dependencies
-clean Clean only current project
-make-world Build all dependencies and itself
-init Init sample project to get started
-theme The theme for project initialization, default is basic(https://github.com/bloomberg/bucklescript/tree/master/jscomp/bsb/templates)
-themes List all available themes
-help Display this list of options
--help Display this list of options
Error happened when running command /Users/antoine/Documents/work/bucklescript/hello/node_modules/bs-platform/bin/bsb.exe with args [ '-bs-gen-tds' ]
Is it normal?
You are passing -bs-gen-tds to bsb instead of bsc. If you are using the bsb build system then options for bsc go in the bsconfig.json file. :-)
Ah ok, it totally makes sense now you say it. :)
Where should I put it in the bsconfig.json file? The documentation is a bit lacking on this.
I always refer to https://github.com/bloomberg/bucklescript/blob/master/bsconfig.json for those, there is documentation somewhere but I cannot find where it is linked to from the manual?
Either way, you'll put it in to the "bsc-flags" list. :-)
seems already answered above
Is this still supported? When I try to use it I get the following error message:
…/lib/node_modules/bs-platform/lib/bsc.exe: unknown option '-bs-gen-tds'.
hi @mmiszy unfortunately, we removed it recently to reduce the maintenance overhead, (the generated .d.ts was never of production quality though)
@bobzhang do you know if there's currently anyone working on implementing this as a separate project? That would be useful.
Also: Do you accept PRs to the docs? -bs-gen-tds should be removed :)
Yes, PRs are welcome. There are some effort to make better integration with flow, but I am not sure when it will be production ready
Most helpful comment
http://bucklescript.github.io/bucklescript/docson/#build-schema.json, linked from http://bucklescript.github.io/bucklescript/Manual.html#_bucklescript_build_system_code_bsb_code