dart-archive / js_facade_gen

Generates package:js Javascript interop facades for arbitrary TypeScript libraries
Apache License 2.0
162 stars 29 forks source link

Please support typings split over multiple d.ts files #73

Open weenzeel opened 4 years ago

weenzeel commented 4 years ago

Hello!

I think this could be a wonderful tool to make Dart a better option for web development.

I wanted to crete typings for the javascript version of the processing creative library. And used the typings from here ...

https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/p5

The typings main file relates to a list of referenced typings in different files. But only a typing for the main file is generated when js facade is run.

How to generate Dart facades for the entire library? Can this process be made simpler? Or some documentation written on how to do it?

Thanks!

derekxu16 commented 4 years ago

At the moment you'll need to specify all the filenames as command line arguments. See https://github.com/dart-lang/js_facade_gen/issues/58#issuecomment-548931865 for an example. This process will be made simpler in the future, but right now we're focused on doing a rewrite of this tool so there won't be any new features just yet.

weenzeel commented 4 years ago

Ok, thanks for the info. Then I at lest know how to try to do it.