{"action":"created","issue":{"url":"https://api.github.com/repos/TypeStrong/atom-typescript/issues/356","labels_url":"https://api.github.com/repos/TypeStrong/atom-typescript/issues/356/labels{/name}","comments_url":"https://api.github.com/repos/TypeStrong/atom-typescript/issues/356/comments","events_url":"https://api.github.com/repos/TypeStrong/atom-typescript/issues/356/events","html_url":"https://github.com/TypeStrong/atom-typescript/issues/356","id":77719950,"number":356,"title":"Add property to object quick fix fails to create a method when passed as an argument","user":{"login":"geowarin","id":1045636,"avatar_url":"https://avatars.githubusercontent.com/u/1045636?v=3","gravatar_id":"","url":"https://api.github.com/users/geowarin","html_url":"https://github.com/geowarin","followers_url":"https://api.github.com/users/geowarin/followers","following_url":"https://api.github.com/users/geowarin/following{/other_user}","gists_url":"https://api.github.com/users/geowarin/gists{/gist_id}","starred_url":"https://api.github.com/users/geowarin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geowarin/subscriptions","organizations_url":"https://api.github.com/users/geowarin/orgs","repos_url":"https://api.github.com/users/geowarin/repos","events_url":"https://api.github.com/users/geowarin/events{/privacy}","received_events_url":"https://api.github.com/users/geowarin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/TypeStrong/atom-typescript/labels/category:quick-fix","name":"category:quick-fix","color":"fbca04"},{"url":"https://api.github.com/repos/TypeStrong/atom-typescript/labels/up-for-grabs","name":"up-for-grabs","color":"159818"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-18T16:35:33Z","updated_at":"2015-07-05T23:57:28Z","closed_at":"2015-07-05T23:57:27Z","body":"In the case you wish to pass a non existing method to a callback:\r\n\r\n```typescript\r\nclass Test {\r\n  \r\n}\r\n\r\nfunction execute(callback:Function) {\r\n  callback();\r\n}\r\n\r\nvar test = new Test();\r\nexecute(test.callback);\r\n```\r\n\r\nThe 'add callback to Test' quick fix will appear.\r\nBut that will not create a method as expected:\r\n\r\n```typescript\r\nclass Test {\r\n    callback: any; \r\n}\r\n\r\nfunction execute(callback:Function) {\r\n  callback();\r\n}\r\n\r\nvar test = new Test();\r\nexecute(test.callback);\r\n```\r\n\r\nI know this is a limit case but that would be uber awesome to have this ;)"},"comment":{"url":"https://api.github.com/repos/TypeStrong/atom-typescript/issues/comments/118680368","html_url":"https://github.com/TypeStrong/atom-typescript/issues/356#issuecomment-118680368","issue_url":"https://api.github.com/repos/TypeStrong/atom-typescript/issues/356","id":118680368,"user":{"login":"basarat","id":874898,"avatar_url":"https://avatars.githubusercontent.com/u/874898?v=3","gravatar_id":"","url":"https://api.github.com/users/basarat","html_url":"https://github.com/basarat","followers_url":"https://api.github.com/users/basarat/followers","following_url":"https://api.github.com/users/basarat/following{/other_user}","gists_url":"https://api.github.com/users/basarat/gists{/gist_id}","starred_url":"https://api.github.com/users/basarat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basarat/subscriptions","organizations_url":"https://api.github.com/users/basarat/orgs","repos_url":"https://api.github.com/users/basarat/repos","events_url":"https://api.github.com/users/basarat/events{/privacy}","received_events_url":"https://api.github.com/users/basarat/received_events","type":"User","site_admin":false},"created_at":"2015-07-05T23:57:27Z","updated_at":"2015-07-05T23:57:27Z","body":"Yes by @xperiments https://github.com/TypeStrong/atom-typescript/pull/426#issuecomment-118126226 :rose: "}}