{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/5537","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/5537/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/5537/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/5537/events","html_url":"https://github.com/Microsoft/TypeScript/issues/5537","id":115199017,"number":5537,"title":"Package typing inclusion and discovery","user":{"login":"weswigham","id":2932786,"avatar_url":"https://avatars.githubusercontent.com/u/2932786?v=3","gravatar_id":"","url":"https://api.github.com/users/weswigham","html_url":"https://github.com/weswigham","followers_url":"https://api.github.com/users/weswigham/followers","following_url":"https://api.github.com/users/weswigham/following{/other_user}","gists_url":"https://api.github.com/users/weswigham/gists{/gist_id}","starred_url":"https://api.github.com/users/weswigham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weswigham/subscriptions","organizations_url":"https://api.github.com/users/weswigham/orgs","repos_url":"https://api.github.com/users/weswigham/repos","events_url":"https://api.github.com/users/weswigham/events{/privacy}","received_events_url":"https://api.github.com/users/weswigham/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/In%20Discussion","name":"In Discussion","color":"556b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-11-05T02:58:12Z","updated_at":"2015-11-06T23:51:01Z","closed_at":null,"body":"This issue tracks our plans and discussion around the current situation with package typings.\r\n\r\nInternally, we've been talking about how to better package, locate, and discover typings for packages which do not include their own typings.\r\n\r\nThe issues which arise around packages and their typings include:\r\n* Reuse - the ability to take typings written for long-ago TS (ambient declarations) and continue to use them with little or no modification\r\n* Dependency management - typings typically depend on the same things that their host js packages do - and usually on their typings, not their js.\r\n* De-duplication and flattening - Deeply nested typings (with potentially duplicated dependencies at multiple levels) lead to a lot of duplicated work in the compiler, and could result in longer build times. We'd like to head this off before it becomes an issue in practice if possible.\r\n* Discovery - if I'm using package the node package `bluebird`, how can I find types for it without skipping a beat?\r\n\r\nWe've spoken with @blakeembrey and his plans for [`typings`](https://github.com/typings) (a tool to replace/improve upon [`tsd`](https://github.com/DefinitelyTyped/tsd)). We believe that we're both setting out to solve a lot of the same problems, and we'd love to help build much of that functionality into the compiler and language service to create a seamless development experience.\r\n\r\nWe've come up with a number of improvements to pursue on our end, including:\r\n* Package scopes (#4913) to help with typing reuse and isolation issues\r\n* Extending our node module resolution for typings to have a concept of a fallback-typings package - a package which provides typings for a correspondingly named package. (For example, `typed-debug` can be installed and provides types for the `debug` module.)\r\n* Reducing the volume of type checking done for packages (ie, don't typecheck them)\r\n\r\nWe want to make it _seamless_ for users to use typescript with their existing tools and processes, and this includes their dealings with typings. Ideally, we want users to be able to `npm install` their dependencies as they already do and have everything \"just work\" without further steps or instructions.\r\n\r\nTagging @mhegazy @ahejlsberg @vladima @DanielRosenwasser and probably many others who should get tagged for discussion.\r\n\r\nI'm sure I've forgetting things from our discussion earlier, so feel free to chime in with the relevant conversion points I've missed."},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/154579892","html_url":"https://github.com/Microsoft/TypeScript/issues/5537#issuecomment-154579892","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/5537","id":154579892,"user":{"login":"blakeembrey","id":1088987,"avatar_url":"https://avatars.githubusercontent.com/u/1088987?v=3","gravatar_id":"","url":"https://api.github.com/users/blakeembrey","html_url":"https://github.com/blakeembrey","followers_url":"https://api.github.com/users/blakeembrey/followers","following_url":"https://api.github.com/users/blakeembrey/following{/other_user}","gists_url":"https://api.github.com/users/blakeembrey/gists{/gist_id}","starred_url":"https://api.github.com/users/blakeembrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blakeembrey/subscriptions","organizations_url":"https://api.github.com/users/blakeembrey/orgs","repos_url":"https://api.github.com/users/blakeembrey/repos","events_url":"https://api.github.com/users/blakeembrey/events{/privacy}","received_events_url":"https://api.github.com/users/blakeembrey/received_events","type":"User","site_admin":false},"created_at":"2015-11-06T23:51:01Z","updated_at":"2015-11-06T23:51:01Z","body":"> I don't think the typing compatibility really has any bearing on runtime compatibility\r\n\r\nTyping compatibility is runtime compatibility, unless I'm missing something. Yes, typing information is still decoupled, but what it describes is runtime compatibility.\r\n\r\n> So maybe we should talk about something else people might use as a dependency... many different versions of bluebird.d.ts for example.\r\n\r\nEasy. That one isn't ambient, it's a normal dependency. Everything will work. Maybe you want to provide more information on what you mean here? Maybe exposing `bluebird` as the `global.Promise`, hence it's now an \"ambient dependency\". In this case, the compiler would do what it normally does - which I think is merge the declarations in this case (need to double check, but it's still up to the user/compiler here)."}}