{"action":"opened","number":8747,"pull_request":{"url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/8747","id":64319374,"html_url":"https://github.com/DefinitelyTyped/DefinitelyTyped/pull/8747","diff_url":"https://github.com/DefinitelyTyped/DefinitelyTyped/pull/8747.diff","patch_url":"https://github.com/DefinitelyTyped/DefinitelyTyped/pull/8747.patch","issue_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/8747","number":8747,"state":"open","locked":false,"title":"Overload for custom scope interfaces","user":{"login":"brendon-colburn","id":16350948,"avatar_url":"https://avatars.githubusercontent.com/u/16350948?v=3","gravatar_id":"","url":"https://api.github.com/users/brendon-colburn","html_url":"https://github.com/brendon-colburn","followers_url":"https://api.github.com/users/brendon-colburn/followers","following_url":"https://api.github.com/users/brendon-colburn/following{/other_user}","gists_url":"https://api.github.com/users/brendon-colburn/gists{/gist_id}","starred_url":"https://api.github.com/users/brendon-colburn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendon-colburn/subscriptions","organizations_url":"https://api.github.com/users/brendon-colburn/orgs","repos_url":"https://api.github.com/users/brendon-colburn/repos","events_url":"https://api.github.com/users/brendon-colburn/events{/privacy}","received_events_url":"https://api.github.com/users/brendon-colburn/received_events","type":"User","site_admin":false},"body":"case 2. Improvement to existing type definition.\r\n\r\nI recently came up with this solution so I could leverage my custom scope when grabbing the scope from a controller using angular.element.  It works well and with the <T extends IScope> it ensures that you can only set it to an interface that extends IScope.\r\n\r\nLet me know if there's anything else you need for the commit as this is the first time I've tried this. Here's an example of how this improves things:\r\n\r\n```\r\nvar $scope = angular.element($('[ng-controller]')).scope<ICustomScope>();\r\n$scope.vm.setName();\r\n```","created_at":"2016-03-28T13:02:35Z","updated_at":"2016-03-28T13:02:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/8747/commits","review_comments_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/8747/comments","review_comment_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/8747/comments","statuses_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/statuses/0aa772c53fa6bf700f5ddce007871260297001f3","head":{"label":"brendon-colburn:patch-1","ref":"patch-1","sha":"0aa772c53fa6bf700f5ddce007871260297001f3","user":{"login":"brendon-colburn","id":16350948,"avatar_url":"https://avatars.githubusercontent.com/u/16350948?v=3","gravatar_id":"","url":"https://api.github.com/users/brendon-colburn","html_url":"https://github.com/brendon-colburn","followers_url":"https://api.github.com/users/brendon-colburn/followers","following_url":"https://api.github.com/users/brendon-colburn/following{/other_user}","gists_url":"https://api.github.com/users/brendon-colburn/gists{/gist_id}","starred_url":"https://api.github.com/users/brendon-colburn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendon-colburn/subscriptions","organizations_url":"https://api.github.com/users/brendon-colburn/orgs","repos_url":"https://api.github.com/users/brendon-colburn/repos","events_url":"https://api.github.com/users/brendon-colburn/events{/privacy}","received_events_url":"https://api.github.com/users/brendon-colburn/received_events","type":"User","site_admin":false},"repo":{"id":54763278,"name":"DefinitelyTyped","full_name":"brendon-colburn/DefinitelyTyped","owner":{"login":"brendon-colburn","id":16350948,"avatar_url":"https://avatars.githubusercontent.com/u/16350948?v=3","gravatar_id":"","url":"https://api.github.com/users/brendon-colburn","html_url":"https://github.com/brendon-colburn","followers_url":"https://api.github.com/users/brendon-colburn/followers","following_url":"https://api.github.com/users/brendon-colburn/following{/other_user}","gists_url":"https://api.github.com/users/brendon-colburn/gists{/gist_id}","starred_url":"https://api.github.com/users/brendon-colburn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendon-colburn/subscriptions","organizations_url":"https://api.github.com/users/brendon-colburn/orgs","repos_url":"https://api.github.com/users/brendon-colburn/repos","events_url":"https://api.github.com/users/brendon-colburn/events{/privacy}","received_events_url":"https://api.github.com/users/brendon-colburn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/brendon-colburn/DefinitelyTyped","description":"The repository for high quality TypeScript type definitions.","fork":true,"url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped","forks_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/forks","keys_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/teams","hooks_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/hooks","issue_events_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/issues/events{/number}","events_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/events","assignees_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/assignees{/user}","branches_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/branches{/branch}","tags_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/tags","blobs_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/git/refs{/sha}","trees_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/statuses/{sha}","languages_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/languages","stargazers_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/stargazers","contributors_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/contributors","subscribers_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/subscribers","subscription_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/subscription","commits_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/commits{/sha}","git_commits_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/git/commits{/sha}","comments_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/comments{/number}","issue_comment_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/issues/comments{/number}","contents_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/contents/{+path}","compare_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/merges","archive_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/downloads","issues_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/issues{/number}","pulls_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/pulls{/number}","milestones_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/milestones{/number}","notifications_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/labels{/name}","releases_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/releases{/id}","deployments_url":"https://api.github.com/repos/brendon-colburn/DefinitelyTyped/deployments","created_at":"2016-03-26T04:52:56Z","updated_at":"2016-03-26T04:53:04Z","pushed_at":"2016-03-28T12:58:10Z","git_url":"git://github.com/brendon-colburn/DefinitelyTyped.git","ssh_url":"git@github.com:brendon-colburn/DefinitelyTyped.git","clone_url":"https://github.com/brendon-colburn/DefinitelyTyped.git","svn_url":"https://github.com/brendon-colburn/DefinitelyTyped","homepage":"http://definitelytyped.org/","size":110257,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"DefinitelyTyped:master","ref":"master","sha":"80057d687aefa736511e434cd2a6c0e9a6bb02bc","user":{"login":"DefinitelyTyped","id":3637556,"avatar_url":"https://avatars.githubusercontent.com/u/3637556?v=3","gravatar_id":"","url":"https://api.github.com/users/DefinitelyTyped","html_url":"https://github.com/DefinitelyTyped","followers_url":"https://api.github.com/users/DefinitelyTyped/followers","following_url":"https://api.github.com/users/DefinitelyTyped/following{/other_user}","gists_url":"https://api.github.com/users/DefinitelyTyped/gists{/gist_id}","starred_url":"https://api.github.com/users/DefinitelyTyped/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DefinitelyTyped/subscriptions","organizations_url":"https://api.github.com/users/DefinitelyTyped/orgs","repos_url":"https://api.github.com/users/DefinitelyTyped/repos","events_url":"https://api.github.com/users/DefinitelyTyped/events{/privacy}","received_events_url":"https://api.github.com/users/DefinitelyTyped/received_events","type":"Organization","site_admin":false},"repo":{"id":6093316,"name":"DefinitelyTyped","full_name":"DefinitelyTyped/DefinitelyTyped","owner":{"login":"DefinitelyTyped","id":3637556,"avatar_url":"https://avatars.githubusercontent.com/u/3637556?v=3","gravatar_id":"","url":"https://api.github.com/users/DefinitelyTyped","html_url":"https://github.com/DefinitelyTyped","followers_url":"https://api.github.com/users/DefinitelyTyped/followers","following_url":"https://api.github.com/users/DefinitelyTyped/following{/other_user}","gists_url":"https://api.github.com/users/DefinitelyTyped/gists{/gist_id}","starred_url":"https://api.github.com/users/DefinitelyTyped/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DefinitelyTyped/subscriptions","organizations_url":"https://api.github.com/users/DefinitelyTyped/orgs","repos_url":"https://api.github.com/users/DefinitelyTyped/repos","events_url":"https://api.github.com/users/DefinitelyTyped/events{/privacy}","received_events_url":"https://api.github.com/users/DefinitelyTyped/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DefinitelyTyped/DefinitelyTyped","description":"The repository for high quality TypeScript type definitions.","fork":false,"url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped","forks_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/forks","keys_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/teams","hooks_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/hooks","issue_events_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/events{/number}","events_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/events","assignees_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/assignees{/user}","branches_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/branches{/branch}","tags_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/tags","blobs_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/git/refs{/sha}","trees_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/statuses/{sha}","languages_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/languages","stargazers_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/stargazers","contributors_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/contributors","subscribers_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/subscribers","subscription_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/subscription","commits_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/commits{/sha}","git_commits_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/git/commits{/sha}","comments_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/comments{/number}","issue_comment_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/comments{/number}","contents_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/contents/{+path}","compare_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/merges","archive_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/downloads","issues_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues{/number}","pulls_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls{/number}","milestones_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/milestones{/number}","notifications_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/labels{/name}","releases_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/releases{/id}","deployments_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/deployments","created_at":"2012-10-05T16:39:45Z","updated_at":"2016-03-28T10:05:48Z","pushed_at":"2016-03-28T13:02:30Z","git_url":"git://github.com/DefinitelyTyped/DefinitelyTyped.git","ssh_url":"git@github.com:DefinitelyTyped/DefinitelyTyped.git","clone_url":"https://github.com/DefinitelyTyped/DefinitelyTyped.git","svn_url":"https://github.com/DefinitelyTyped/DefinitelyTyped","homepage":"http://definitelytyped.org/","size":131426,"stargazers_count":6589,"watchers_count":6589,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4675,"mirror_url":null,"open_issues_count":1112,"forks":4675,"open_issues":1112,"watchers":6589,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/8747"},"html":{"href":"https://github.com/DefinitelyTyped/DefinitelyTyped/pull/8747"},"issue":{"href":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/8747"},"comments":{"href":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/8747/comments"},"review_comments":{"href":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/8747/comments"},"review_comment":{"href":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/8747/commits"},"statuses":{"href":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/statuses/0aa772c53fa6bf700f5ddce007871260297001f3"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":5,"deletions":0,"changed_files":1}}