{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/11056","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/11056/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/11056/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/11056/events","html_url":"https://github.com/Microsoft/TypeScript/issues/11056","id":178541301,"number":11056,"title":"es5.d.ts is missing \"toLocaleString()\" method on Number interface","user":{"login":"kpreisser","id":13289184,"avatar_url":"https://avatars.githubusercontent.com/u/13289184?v=3","gravatar_id":"","url":"https://api.github.com/users/kpreisser","html_url":"https://github.com/kpreisser","followers_url":"https://api.github.com/users/kpreisser/followers","following_url":"https://api.github.com/users/kpreisser/following{/other_user}","gists_url":"https://api.github.com/users/kpreisser/gists{/gist_id}","starred_url":"https://api.github.com/users/kpreisser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kpreisser/subscriptions","organizations_url":"https://api.github.com/users/kpreisser/orgs","repos_url":"https://api.github.com/users/kpreisser/repos","events_url":"https://api.github.com/users/kpreisser/events{/privacy}","received_events_url":"https://api.github.com/users/kpreisser/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Needs%20More%20Info","name":"Needs More Info","color":"556b75"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-22T07:31:33Z","updated_at":"2016-09-22T17:47:45Z","closed_at":null,"body":"**TypeScript Version:**  master (95c3eccbe9f3f7e1857ce157d437e6b80b3c9c6f)\r\n\r\nHi,\r\n\r\nit seems the library declaration for ES5 ([es5.d.ts](https://github.com/Microsoft/TypeScript/blob/master/src/lib/es5.d.ts)) is missing a declaration on the `Number` interface for `toLocaleString()`, e.g. like this:\r\n```typescript\r\ninterface Number {\r\n    // (...)\r\n    /**\r\n      * Converts a number to a string by using the current locale.\r\n      */\r\n    toLocaleString(): string;\r\n}\r\n```\r\n\r\nwhereas the `Date` interface contains such a definition:\r\n```typescript\r\n    /** Returns a value as a string value appropriate to the host environment's current locale. */\r\n    toLocaleString(): string;\r\n```\r\n\r\nECMAScript 5.1 specifies `Number.prototype.toLocaleString()`at section [15.7.4.3](http://www.ecma-international.org/ecma-262/5.1/#sec-15.7.4.3), and ECMAScript 2015 specifies it at [20.1.3.4 ](http://www.ecma-international.org/ecma-262/6.0/#sec-number.prototype.tolocalestring).\r\n\r\nNote: lib.es5.d.ts contains definitions for the ECMAScript Internationalization API (ECMA-402), that defines `toLocaleString(locales?: string[], options?: Intl.NumberFormatOptions): string;` on the Number interfaces, but this is not a part of the core ES 5.1 library, whereas the one without arguments is.\r\nTherefore I think this method should be added on the number interface.\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/248976493","html_url":"https://github.com/Microsoft/TypeScript/issues/11056#issuecomment-248976493","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/11056","id":248976493,"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-09-22T17:47:45Z","updated_at":"2016-09-22T17:47:45Z","body":"Well.. since you are slicing and dicing the file anyways, you could add the additional signature after removing the other ones. not sure adding it now would be of much value, for you or other users.\r\n\r\nI would say the better solution here is to split this file into `es5.core` and `intel` so you can get the the core without the internationalization part."}}
{"actor":{"display_login":"mhegazy"}}