-
Notifications
You must be signed in to change notification settings - Fork 102
Could you add the ability to dts-gen individual files #58
Comments
I'm not sure what this means. Can you sketch out what the behavior should be? |
Sure, I'd like to generate typescript definition file for a single javascript file. So if I could |
Maybe you could give an example of an input JS file and an output .d.ts file from this process? |
ok. I have a collada loader in my node_modules folder which consists of only one file. |
+1 for this |
+1 |
1 similar comment
+1 |
I got a workaround by doing the following:
@RyanCavanaugh What is needed here is a way to call |
+1, I have an UMD module generated through browserify. For some reason I had to include both enzyme and react in the UMD module. In my typescript I imported this UMD module, everything works fine except intellisense is not working. I guess .d.ts will help here and it would be helpful if tool can get declaration from the UMD module. |
+1 |
1 similar comment
+1 |
+1e6 |
👍 A lot of packages are not npm packages, so you can't install them as a module! Running this gives:
|
I have a lib that is a module but not an npm package so I try to generate .d.ts with dts-gen via an expression:
but I get the error:
I though that requiring the lib as an expression would work. So a way is needed to be able to gen dts files from a file that IS NOT an installed npm package. So +1 for a solution to this |
Yea, it's annyoing. Another great thing is, I now declare
on top of the file, and now it complains about Leaflet not being defined. and now it complains about L.drawLocal.extend
Sure a "very" utilizable tool. It's a good thing after all, that the files in DefinitelyTyped are not up-to-date, so TypeScript becomes an unproductivity tool. The rod between the wheels, so to say. And cool, now I finally got it to work: edit leaflet and leaflet-draw to have this on the top,
dts-gen --expression-file ./leaflet.draw-src.js and we now have the "resounding" victory of a file "leaflet_draw_src.d.ts" generated, with content
Ahahaha. |
3 Years now, is there any progress? Because there are still people like me who need that |
Have some news to ignore required files? |
I fixed the issue in #168. We should wait until someone merges it. |
What's the progress here? |
I have published my PR until it is merged:
|
with an option to specify an output directory and name?
Thanks
The text was updated successfully, but these errors were encountered: