{"action":"opened","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/13320","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/13320/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/13320/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/13320/events","html_url":"https://github.com/Microsoft/TypeScript/issues/13320","id":199164351,"number":13320,"title":"Catch dependencies of functions used before assignment","user":{"login":"OliverJAsh","id":921609,"avatar_url":"https://avatars.githubusercontent.com/u/921609?v=3","gravatar_id":"","url":"https://api.github.com/users/OliverJAsh","html_url":"https://github.com/OliverJAsh","followers_url":"https://api.github.com/users/OliverJAsh/followers","following_url":"https://api.github.com/users/OliverJAsh/following{/other_user}","gists_url":"https://api.github.com/users/OliverJAsh/gists{/gist_id}","starred_url":"https://api.github.com/users/OliverJAsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OliverJAsh/subscriptions","organizations_url":"https://api.github.com/users/OliverJAsh/orgs","repos_url":"https://api.github.com/users/OliverJAsh/repos","events_url":"https://api.github.com/users/OliverJAsh/events{/privacy}","received_events_url":"https://api.github.com/users/OliverJAsh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-01-06T10:10:17Z","updated_at":"2017-01-06T10:10:17Z","closed_at":null,"body":"``` ts\r\n    foo()\r\n    const x = 1;\r\n    function foo() { x; }\r\n```\r\n\r\nThis will produce a `ReferenceError`. Should TypeScript be catching this? `foo` can be called before the declaration, as that is hoisted, but it can not be called before its dependencies have been defined."}}
{"actor":{"display_login":"OliverJAsh"}}