microsoft / dts-gen

dts-gen creates starter TypeScript definition files for any module or library.
MIT License
2.43k stars 102 forks source link

docs: update docs about generating defs - from local node_modules #72

Open Hotell opened 7 years ago

Hotell commented 7 years ago

Currently dts-gen forces users, to install library.,which we want generate types from, globally -> this is super annoying, forcing users to pollute they global npm store is also very unfortunate.

Can this be implemented?

thanks

Hotell commented 7 years ago

hmm so actually it works from local node_modules but for some reason only for some packages, for instance it works for preact, bluebird etc, but doesn't for skatejs

UPDATE ok so it resolves also skatejs properly form node_modules but it complains that it doesn't know customElements which resides on window -> related to #39

So as a first step I guess docs needs to be updated, because this:

Let's generate a .d.ts file for the yargs NPM module. This already has a handwritten definition file, but let's pretend that doesn't exist yet. 
You'll need to first install dts-gen if you haven't already, then globally install the module you're generating for.

is not true statement

I can submit PR for those change if u r ok with that. thx

UPDATE 2 changing the title of issue