{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/7734","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/7734/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/7734/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/7734/events","html_url":"https://github.com/Microsoft/TypeScript/issues/7734","id":144650020,"number":7734,"title":"Editor: Excess or missing arguments in a function call highlight the whole call in red, including all anonymous function bodies","user":{"login":"malibuzios","id":17719551,"avatar_url":"https://avatars.githubusercontent.com/u/17719551?v=3","gravatar_id":"","url":"https://api.github.com/users/malibuzios","html_url":"https://github.com/malibuzios","followers_url":"https://api.github.com/users/malibuzios/followers","following_url":"https://api.github.com/users/malibuzios/following{/other_user}","gists_url":"https://api.github.com/users/malibuzios/gists{/gist_id}","starred_url":"https://api.github.com/users/malibuzios/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malibuzios/subscriptions","organizations_url":"https://api.github.com/users/malibuzios/orgs","repos_url":"https://api.github.com/users/malibuzios/repos","events_url":"https://api.github.com/users/malibuzios/events{/privacy}","received_events_url":"https://api.github.com/users/malibuzios/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-30T16:48:13Z","updated_at":"2016-03-30T17:12:15Z","closed_at":null,"body":"As a follow-up to #7703, I'm trying to investigate more scenarios where excessive editor error highlighting interferes with editing or renders it less convenient. Seems like many of these have to do with anonymous functions, as in many cases they are passed as function arguments, which are usually expected to be quite short. However in callback or promise heavy code they may end up to be very long and span multiple lines or even pages.\r\n  \r\nAnother case I've found is when there are excess or missing arguments in a function call, though here it would highlight the whole function call expression, which would include all the bodies of all the anonymous functions passed as arguments, and may span as many lines or pages as the call would. \r\n\r\n_Edit: removed an incorrect example!_\r\n\r\n**Reduced test cases**\r\nThis one happens with the `function()` syntax as well:\r\n\r\n```\r\nError: supplied parameters do not match any signature of call target\r\n```\r\nExcess arguments:\r\n```ts\r\nfunction func(f: () => void) {\r\n}\r\n\r\nfunc(() => {\r\n\tlet x = 1;\r\n\treturn;\r\n}, 42);\r\n\r\nfunc(function () {\r\n\tlet x = 1;\r\n\treturn;\r\n}, 42);\r\n```\r\n\r\nMissing arguments:\r\n```ts\r\nfunction func(f: () => void, n: number) {\r\n}\r\n\r\nfunc(() => {\r\n\tlet x = 1;\r\n\treturn;\r\n});\r\n\r\nfunc(function () {\r\n\tlet x = 1;\r\n\treturn;\r\n});\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/203533582","html_url":"https://github.com/Microsoft/TypeScript/issues/7734#issuecomment-203533582","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/7734","id":203533582,"user":{"login":"malibuzios","id":17719551,"avatar_url":"https://avatars.githubusercontent.com/u/17719551?v=3","gravatar_id":"","url":"https://api.github.com/users/malibuzios","html_url":"https://github.com/malibuzios","followers_url":"https://api.github.com/users/malibuzios/followers","following_url":"https://api.github.com/users/malibuzios/following{/other_user}","gists_url":"https://api.github.com/users/malibuzios/gists{/gist_id}","starred_url":"https://api.github.com/users/malibuzios/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malibuzios/subscriptions","organizations_url":"https://api.github.com/users/malibuzios/orgs","repos_url":"https://api.github.com/users/malibuzios/repos","events_url":"https://api.github.com/users/malibuzios/events{/privacy}","received_events_url":"https://api.github.com/users/malibuzios/received_events","type":"User","site_admin":false},"created_at":"2016-03-30T17:12:15Z","updated_at":"2016-03-30T17:12:15Z","body":"First example was wrong, sorry about that (I removed it). I'll try to find better ones.\r\n\r\nIn any case if anyone knows of more these \"wall-of-red' scenarios then please mention. I feel the editing experience (which is already pretty good, but not as good as say, C#) would improve significantly without them."}}