{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/2410","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/2410/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/2410/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/2410/events","html_url":"https://github.com/Microsoft/TypeScript/issues/2410","id":62708650,"number":2410,"title":"ES3 \"item\" global function in lib.d.ts","user":{"login":"SergioMorchon","id":4521712,"avatar_url":"https://avatars.githubusercontent.com/u/4521712?v=3","gravatar_id":"","url":"https://api.github.com/users/SergioMorchon","html_url":"https://github.com/SergioMorchon","followers_url":"https://api.github.com/users/SergioMorchon/followers","following_url":"https://api.github.com/users/SergioMorchon/following{/other_user}","gists_url":"https://api.github.com/users/SergioMorchon/gists{/gist_id}","starred_url":"https://api.github.com/users/SergioMorchon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SergioMorchon/subscriptions","organizations_url":"https://api.github.com/users/SergioMorchon/orgs","repos_url":"https://api.github.com/users/SergioMorchon/repos","events_url":"https://api.github.com/users/SergioMorchon/events{/privacy}","received_events_url":"https://api.github.com/users/SergioMorchon/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,"milestone":null,"comments":2,"created_at":"2015-03-18T14:36:16Z","updated_at":"2015-03-20T12:06:11Z","closed_at":null,"body":"By targeting to ES3, the following code (within a class definition):\r\n``` typescript\r\n\t\tsetOptionDisable(option: HTMLOptionElement, operation: EnumOperations) {\r\n            ko.applyBindingsToNode(option,\r\n\t\t\t\t{\r\n\t\t\t\t\tdisable: BI_OP.has(operation)? this.selectedNumbers().length >= 2 : true\r\n\t\t\t\t}, item);\r\n        }\r\n```\r\ncompiles, but the ``` item ``` variable is not defined. Does really ``` item ``` exists in a ES3 standard browser? I wasn't able to find it, so I treated this as a bug."},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/83994209","html_url":"https://github.com/Microsoft/TypeScript/issues/2410#issuecomment-83994209","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/2410","id":83994209,"user":{"login":"SergioMorchon","id":4521712,"avatar_url":"https://avatars.githubusercontent.com/u/4521712?v=3","gravatar_id":"","url":"https://api.github.com/users/SergioMorchon","html_url":"https://github.com/SergioMorchon","followers_url":"https://api.github.com/users/SergioMorchon/followers","following_url":"https://api.github.com/users/SergioMorchon/following{/other_user}","gists_url":"https://api.github.com/users/SergioMorchon/gists{/gist_id}","starred_url":"https://api.github.com/users/SergioMorchon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SergioMorchon/subscriptions","organizations_url":"https://api.github.com/users/SergioMorchon/orgs","repos_url":"https://api.github.com/users/SergioMorchon/repos","events_url":"https://api.github.com/users/SergioMorchon/events{/privacy}","received_events_url":"https://api.github.com/users/SergioMorchon/received_events","type":"User","site_admin":false},"created_at":"2015-03-20T12:06:11Z","updated_at":"2015-03-20T12:06:11Z","body":"On the lib.d.ts file is defined the following function:\r\n``` typescript\r\ndeclare function item(index: any): any;\r\n```\r\nBut as seeing @ http://www.ecma-international.org/publications/files/ECMA-ST-ARCH/ECMA-262,%203rd%20edition,%20December%201999.pdf 15.1.1 Value Properties of the Global Object (page 77) and W3C http://www.w3schools.com/jsref/jsref_obj_global.asp , there isn't any ``` item ``` global function.\r\n\r\nThis misstake causes that if I use a non-defined ``` ítem ``` variable on my code, which of course doesn't exists, it will compile ok, but it shouldn't!\r\n\r\nFor example:\r\n``` typescript\r\nitem();// must throw a compilation error. Instead, it is getting a runtime one on the browser because  it is not defined.\r\n```\r\n\r\nSame with ``` msClearImmediate ```, ``` btoa ```, ``` atob ```, etc.\r\n\r\nI think I can explain it better... :S"}}