{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/4168","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/4168/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/4168/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/4168/events","html_url":"https://github.com/Microsoft/TypeScript/issues/4168","id":99255652,"number":4168,"title":"Normalize our lib files by compiler settings","user":{"login":"RyanCavanaugh","id":6685088,"avatar_url":"https://avatars.githubusercontent.com/u/6685088?v=3","gravatar_id":"","url":"https://api.github.com/users/RyanCavanaugh","html_url":"https://github.com/RyanCavanaugh","followers_url":"https://api.github.com/users/RyanCavanaugh/followers","following_url":"https://api.github.com/users/RyanCavanaugh/following{/other_user}","gists_url":"https://api.github.com/users/RyanCavanaugh/gists{/gist_id}","starred_url":"https://api.github.com/users/RyanCavanaugh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyanCavanaugh/subscriptions","organizations_url":"https://api.github.com/users/RyanCavanaugh/orgs","repos_url":"https://api.github.com/users/RyanCavanaugh/repos","events_url":"https://api.github.com/users/RyanCavanaugh/events{/privacy}","received_events_url":"https://api.github.com/users/RyanCavanaugh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/In%20Discussion","name":"In Discussion","color":"556b75"},{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Suggestion","name":"Suggestion","color":"006b75"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-08-05T17:17:57Z","updated_at":"2016-02-22T20:25:26Z","closed_at":"2016-02-22T20:25:26Z","body":"Right now the compiler depends on a monolithic `lib.d.ts` file that is resolved according to the script target (ES5 or ES6). We have to build several different lib.d.ts files out of smaller parts.\r\n\r\nWe should refactor this so that the different aspects of the compiler settings can map to smaller sub-parts of the libraries.\r\n\r\nLanguage target:\r\n * ES3\r\n * ES5\r\n * ES6\r\n * Latest\r\n\r\nHost:\r\n* Browser with DOM\r\n* WebWorker\r\n* NodeJS\r\n* Windows Script Host :mask: \r\n\r\nModule system:\r\n* CommonJS\r\n* AMD\r\n* None\r\n\r\nThe idea is that we a function that takes a CompilerSettings and produces a list of filenames. These files might reference each other, e.g. `lib.es5.d.ts` would probably reference `lib.es6.d.ts` and just provide interface augmentations.\r\n\r\nThis provides several benefits:\r\n* It will be easier for us to edit these files because they are smaller\r\n* It will be easier for users to patch in only specific versions if they decide they need to fork certain things\r\n* It will be possible for users to have a custom version of one file while still getting bug fixes for the other files\r\n* Provides a more natural way to shim in specific things based on compiler settings without having a combinatorial explosion of concatenated lib.d.ts files\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/187368780","html_url":"https://github.com/Microsoft/TypeScript/issues/4168#issuecomment-187368780","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/4168","id":187368780,"user":{"login":"mhegazy","id":8000722,"avatar_url":"https://avatars.githubusercontent.com/u/8000722?v=3","gravatar_id":"","url":"https://api.github.com/users/mhegazy","html_url":"https://github.com/mhegazy","followers_url":"https://api.github.com/users/mhegazy/followers","following_url":"https://api.github.com/users/mhegazy/following{/other_user}","gists_url":"https://api.github.com/users/mhegazy/gists{/gist_id}","starred_url":"https://api.github.com/users/mhegazy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhegazy/subscriptions","organizations_url":"https://api.github.com/users/mhegazy/orgs","repos_url":"https://api.github.com/users/mhegazy/repos","events_url":"https://api.github.com/users/mhegazy/events{/privacy}","received_events_url":"https://api.github.com/users/mhegazy/received_events","type":"User","site_admin":false},"created_at":"2016-02-22T20:25:26Z","updated_at":"2016-02-22T20:25:26Z","body":"subsumed by https://github.com/Microsoft/TypeScript/issues/6974"}}