I think about 'Definitely Typed' which PhpStorm, WebStorm,.. used for autocomplete.
In PhpStorm: Settings > Languages and frameworks > JavaScript > Libraries : Download
I know from GitHub:DefinitelyTyped that it's written in TypeScript.
But the question: if I create my own lib in JavaScript and I need to active auto-complete for it, so if it has run time binding of variables and method : PhpStorm will not detect it so I need to write my own typescript file to do it: How?