TypeScript typings file node.d.ts versus index.d.ts #352
Comments
Because when you have names with slashes, it becomes cumbersome. E.g. |
Sorry for that breaking change though. You should be able to keep references to just |
Thanks, @blakeembrey, but I am not quite understanding yet. My question is why 'node.d.ts' changed to 'index.d.ts'. Not complaining, just starting out with TypeScript and Typings and wanted to understand what I was seeing. I thought 'node.d.ts' was a better filename, but 'index.d.ts' is fine if it is intentional. |
For example, the 'node.d.ts' filename is what I see here: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/node/node.d.ts |
The name was previously generated based on the module name. So every library install was |
The name in DefinitelyTyped doesn't have any relation to Typings. The old named locations were |
Roger that. I understand the motivation to make the change now. The name translation is intentional. Thanks @blakeembrey for the clarification. And thanks for your contributions to open source. |
No worries, cheers. Sorry for the breaking change, it wasn't well communicated other than when I added a little notice to the README. |
@jfathman I do recommend you use |
Thanks for the suggestion, I will explore that. Very new to TypeScript. |
I've been experimenting with TypeScript on Node.js (and liking it a lot).
Somewhere along the way, I ended up with this node.d.ts which worked:
Today I started a fresh project and typings gave me this instead:
It works, but I am wondering why the file name is now index.d.ts instead of node.d.ts.
The text was updated successfully, but these errors were encountered: