From
TypeScript Version: 2.3.1-insider0416
Code
npm install snoowrapimport * as snoowrap from 'snoowrap'
snoowrap.|
|Expected behavior:
The import is of an any type so no type checking is performed on it.
However, if we instead use a js file with the exact same contents, we do get some suggestions:

I would also expect these suggestions in TypeScript.
I was actually surprised that TypeScript picked up this IntelliSense for an untyped module in the first place. When was this feature added?
Actual behavior:
No suggestions are shown. This is consistent with the intellisense for other any types
Hello awesome TypeScript maintainer.
Any thoughts on this? Maybe a comment whether it's a bug or by design / expected for some reason?
Thanks a lot.
The reason it works in .js file is because of the node_module\snoowrap\dist\snoowrap.js into your compilation by default.
I would not recommend doing so in a .ts project. you are better off runnign dts-gen on it, getting a d.ts and using that instead.
dts-gen sounds great in theory, but doesn't seem to work well sometimes including the sample package here. I wonder what TypeScript is doing different when processing .JS files in VS Code that I can apply to my tsconfig.json or something to get the same behavior. It just feels really funny when the intellisense works in untyped JS but not in typed territory!
A few more things:
tsconfig.json that has allowJs set to true, and includes the .js file, it gets treated (correctly) as a TS file, but it means it loses intellisensedts-gen sounds great in theory, but doesn't seem to work well sometimes including the sample package here.
I would say these bugs that should be fixed in dts-gen
I wonder what TypeScript is doing different when processing .
nothing, it is just that there are many .js files out there, and including them all first results in little value, as the compiler does not usually get much out of them, and result in high resource utilization, in terms of memory and CPU.
It just feels really funny when the intellisense works in untyped JS but not in typed territory!
For the .js file it is a best effort attempt. it may work for this specific library, but no guarantees on other ones. As i said, you are better off adding a .d.ts.
Most helpful comment
I would say these bugs that should be fixed in dts-gen
nothing, it is just that there are many .js files out there, and including them all first results in little value, as the compiler does not usually get much out of them, and result in high resource utilization, in terms of memory and CPU.
For the .js file it is a best effort attempt. it may work for this specific library, but no guarantees on other ones. As i said, you are better off adding a .d.ts.