{"action":"created","issue":{"url":"https://api.github.com/repos/marijnh/tern/issues/516","labels_url":"https://api.github.com/repos/marijnh/tern/issues/516/labels{/name}","comments_url":"https://api.github.com/repos/marijnh/tern/issues/516/comments","events_url":"https://api.github.com/repos/marijnh/tern/issues/516/events","html_url":"https://github.com/marijnh/tern/issues/516","id":64871645,"number":516,"title":"Tern JS can't complete global functions","user":{"login":"StefanICT","id":3540810,"avatar_url":"https://avatars.githubusercontent.com/u/3540810?v=3","gravatar_id":"","url":"https://api.github.com/users/StefanICT","html_url":"https://github.com/StefanICT","followers_url":"https://api.github.com/users/StefanICT/followers","following_url":"https://api.github.com/users/StefanICT/following{/other_user}","gists_url":"https://api.github.com/users/StefanICT/gists{/gist_id}","starred_url":"https://api.github.com/users/StefanICT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StefanICT/subscriptions","organizations_url":"https://api.github.com/users/StefanICT/orgs","repos_url":"https://api.github.com/users/StefanICT/repos","events_url":"https://api.github.com/users/StefanICT/events{/privacy}","received_events_url":"https://api.github.com/users/StefanICT/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-27T23:37:05Z","updated_at":"2015-03-30T09:14:43Z","closed_at":"2015-03-30T09:14:43Z","body":"Example:\r\n\r\n```javascript\r\n/**\r\n * Detects if the given argument can be called * as a function\r\n */\r\nfunction isCallable() {\r\n     return fn && fn instanceof Function;\r\n}\r\n```\r\n\r\nTern doesn't complete this and given the documentation, but when I change it to:\r\n\r\n```javascript\r\n/** \r\n* Detects if the given argument can be called * as a function\r\n*/\r\nvar isCallable = function () {\r\n    return fn && fn instanceof Function;\r\n};  \r\n```\r\n\r\nAnd call it like\r\n\r\n````\r\nthis.is...\r\n````\r\n\r\nTern js shows me the documentation and the possible autocompletions. Why can't I just type the name of the function? Without this?"},"comment":{"url":"https://api.github.com/repos/marijnh/tern/issues/comments/87605509","html_url":"https://github.com/marijnh/tern/issues/516#issuecomment-87605509","issue_url":"https://api.github.com/repos/marijnh/tern/issues/516","id":87605509,"user":{"login":"marijnh","id":144427,"avatar_url":"https://avatars.githubusercontent.com/u/144427?v=3","gravatar_id":"","url":"https://api.github.com/users/marijnh","html_url":"https://github.com/marijnh","followers_url":"https://api.github.com/users/marijnh/followers","following_url":"https://api.github.com/users/marijnh/following{/other_user}","gists_url":"https://api.github.com/users/marijnh/gists{/gist_id}","starred_url":"https://api.github.com/users/marijnh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marijnh/subscriptions","organizations_url":"https://api.github.com/users/marijnh/orgs","repos_url":"https://api.github.com/users/marijnh/repos","events_url":"https://api.github.com/users/marijnh/events{/privacy}","received_events_url":"https://api.github.com/users/marijnh/received_events","type":"User","site_admin":false},"created_at":"2015-03-30T09:14:43Z","updated_at":"2015-03-30T09:14:43Z","body":"Tern most certainly **can** complete global functions, as is trivially verified using the [online demo](http://ternjs.net/doc/demo.html). You probably have some other problem."}}