{"action":"created","comment":{"url":"https://api.github.com/repos/google/closure-library/pulls/comments/52838074","id":52838074,"diff_hunk":"@@ -496,8 +496,8 @@ goog.array.count = function(arr, f, opt_obj) {\n  *     for every element. This function takes 3 arguments (the element, the\n  *     index and the array) and should return a boolean.\n  * @param {S=} opt_obj An optional \"this\" context for the function.\n- * @return {T|null} The first array element that passes the test, or null if no\n- *     element is found.\n+ * @return {T|string|null} The first array element that passes the test, or","path":"closure/goog/array/array.js","position":6,"original_position":6,"commit_id":"3b8f28a98086bfb25ed8aa5feeef82da3c0f8648","original_commit_id":"3b8f28a98086bfb25ed8aa5feeef82da3c0f8648","user":{"login":"concavelenz","id":1245994,"avatar_url":"https://avatars.githubusercontent.com/u/1245994?v=3","gravatar_id":"","url":"https://api.github.com/users/concavelenz","html_url":"https://github.com/concavelenz","followers_url":"https://api.github.com/users/concavelenz/followers","following_url":"https://api.github.com/users/concavelenz/following{/other_user}","gists_url":"https://api.github.com/users/concavelenz/gists{/gist_id}","starred_url":"https://api.github.com/users/concavelenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/concavelenz/subscriptions","organizations_url":"https://api.github.com/users/concavelenz/orgs","repos_url":"https://api.github.com/users/concavelenz/repos","events_url":"https://api.github.com/users/concavelenz/events{/privacy}","received_events_url":"https://api.github.com/users/concavelenz/received_events","type":"User","site_admin":false},"body":"I would rather prohibit string as an input than force string to be included\nin the return type.\nOn Feb 12, 2016 11:35 PM, \"Michael Zhou\" <notifications@github.com> wrote:\n\n> In closure/goog/array/array.js\n> <https://github.com/google/closure-library/pull/655#discussion_r52824745>:\n>\n> > @@ -496,8 +496,8 @@ goog.array.count = function(arr, f, opt_obj) {\n> >   *     for every element. This function takes 3 arguments (the element, the\n> >   *     index and the array) and should return a boolean.\n> >   * @param {S=} opt_obj An optional \"this\" context for the function.\n> > - * @return {T|null} The first array element that passes the test, or null if no\n> > - *     element is found.\n> > + * @return {T|string|null} The first array element that passes the test, or\n>\n> String can implement IArrayLike, but not string.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/google/closure-library/pull/655/files#r52824745>.\n>\n","created_at":"2016-02-14T05:20:31Z","updated_at":"2016-02-14T05:20:31Z","html_url":"https://github.com/google/closure-library/pull/655#discussion_r52838074","pull_request_url":"https://api.github.com/repos/google/closure-library/pulls/655","_links":{"self":{"href":"https://api.github.com/repos/google/closure-library/pulls/comments/52838074"},"html":{"href":"https://github.com/google/closure-library/pull/655#discussion_r52838074"},"pull_request":{"href":"https://api.github.com/repos/google/closure-library/pulls/655"}}},"pull_request":{"url":"https://api.github.com/repos/google/closure-library/pulls/655","id":59225319,"html_url":"https://github.com/google/closure-library/pull/655","diff_url":"https://github.com/google/closure-library/pull/655.diff","patch_url":"https://github.com/google/closure-library/pull/655.patch","issue_url":"https://api.github.com/repos/google/closure-library/issues/655","number":655,"state":"open","locked":false,"title":"Add \"string\" to return types of goog.array methods","user":{"login":"Dominator008","id":1403453,"avatar_url":"https://avatars.githubusercontent.com/u/1403453?v=3","gravatar_id":"","url":"https://api.github.com/users/Dominator008","html_url":"https://github.com/Dominator008","followers_url":"https://api.github.com/users/Dominator008/followers","following_url":"https://api.github.com/users/Dominator008/following{/other_user}","gists_url":"https://api.github.com/users/Dominator008/gists{/gist_id}","starred_url":"https://api.github.com/users/Dominator008/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dominator008/subscriptions","organizations_url":"https://api.github.com/users/Dominator008/orgs","repos_url":"https://api.github.com/users/Dominator008/repos","events_url":"https://api.github.com/users/Dominator008/events{/privacy}","received_events_url":"https://api.github.com/users/Dominator008/received_events","type":"User","site_admin":false},"body":"Namely, goog.find and goog.array.findRight can also return strings.\r\n\r\nFound by Closure Compiler's NTI.","created_at":"2016-02-12T20:17:34Z","updated_at":"2016-02-14T05:20:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"de81e5e8d8d703a13d195b5bb94876640cc7ca77","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/google/closure-library/pulls/655/commits","review_comments_url":"https://api.github.com/repos/google/closure-library/pulls/655/comments","review_comment_url":"https://api.github.com/repos/google/closure-library/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/closure-library/issues/655/comments","statuses_url":"https://api.github.com/repos/google/closure-library/statuses/3b8f28a98086bfb25ed8aa5feeef82da3c0f8648","head":{"label":"Dominator008:array-find","ref":"array-find","sha":"3b8f28a98086bfb25ed8aa5feeef82da3c0f8648","user":{"login":"Dominator008","id":1403453,"avatar_url":"https://avatars.githubusercontent.com/u/1403453?v=3","gravatar_id":"","url":"https://api.github.com/users/Dominator008","html_url":"https://github.com/Dominator008","followers_url":"https://api.github.com/users/Dominator008/followers","following_url":"https://api.github.com/users/Dominator008/following{/other_user}","gists_url":"https://api.github.com/users/Dominator008/gists{/gist_id}","starred_url":"https://api.github.com/users/Dominator008/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dominator008/subscriptions","organizations_url":"https://api.github.com/users/Dominator008/orgs","repos_url":"https://api.github.com/users/Dominator008/repos","events_url":"https://api.github.com/users/Dominator008/events{/privacy}","received_events_url":"https://api.github.com/users/Dominator008/received_events","type":"User","site_admin":false},"repo":{"id":26793489,"name":"closure-library","full_name":"Dominator008/closure-library","owner":{"login":"Dominator008","id":1403453,"avatar_url":"https://avatars.githubusercontent.com/u/1403453?v=3","gravatar_id":"","url":"https://api.github.com/users/Dominator008","html_url":"https://github.com/Dominator008","followers_url":"https://api.github.com/users/Dominator008/followers","following_url":"https://api.github.com/users/Dominator008/following{/other_user}","gists_url":"https://api.github.com/users/Dominator008/gists{/gist_id}","starred_url":"https://api.github.com/users/Dominator008/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dominator008/subscriptions","organizations_url":"https://api.github.com/users/Dominator008/orgs","repos_url":"https://api.github.com/users/Dominator008/repos","events_url":"https://api.github.com/users/Dominator008/events{/privacy}","received_events_url":"https://api.github.com/users/Dominator008/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Dominator008/closure-library","description":"Google's common JavaScript library","fork":true,"url":"https://api.github.com/repos/Dominator008/closure-library","forks_url":"https://api.github.com/repos/Dominator008/closure-library/forks","keys_url":"https://api.github.com/repos/Dominator008/closure-library/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Dominator008/closure-library/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Dominator008/closure-library/teams","hooks_url":"https://api.github.com/repos/Dominator008/closure-library/hooks","issue_events_url":"https://api.github.com/repos/Dominator008/closure-library/issues/events{/number}","events_url":"https://api.github.com/repos/Dominator008/closure-library/events","assignees_url":"https://api.github.com/repos/Dominator008/closure-library/assignees{/user}","branches_url":"https://api.github.com/repos/Dominator008/closure-library/branches{/branch}","tags_url":"https://api.github.com/repos/Dominator008/closure-library/tags","blobs_url":"https://api.github.com/repos/Dominator008/closure-library/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Dominator008/closure-library/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Dominator008/closure-library/git/refs{/sha}","trees_url":"https://api.github.com/repos/Dominator008/closure-library/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Dominator008/closure-library/statuses/{sha}","languages_url":"https://api.github.com/repos/Dominator008/closure-library/languages","stargazers_url":"https://api.github.com/repos/Dominator008/closure-library/stargazers","contributors_url":"https://api.github.com/repos/Dominator008/closure-library/contributors","subscribers_url":"https://api.github.com/repos/Dominator008/closure-library/subscribers","subscription_url":"https://api.github.com/repos/Dominator008/closure-library/subscription","commits_url":"https://api.github.com/repos/Dominator008/closure-library/commits{/sha}","git_commits_url":"https://api.github.com/repos/Dominator008/closure-library/git/commits{/sha}","comments_url":"https://api.github.com/repos/Dominator008/closure-library/comments{/number}","issue_comment_url":"https://api.github.com/repos/Dominator008/closure-library/issues/comments{/number}","contents_url":"https://api.github.com/repos/Dominator008/closure-library/contents/{+path}","compare_url":"https://api.github.com/repos/Dominator008/closure-library/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Dominator008/closure-library/merges","archive_url":"https://api.github.com/repos/Dominator008/closure-library/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Dominator008/closure-library/downloads","issues_url":"https://api.github.com/repos/Dominator008/closure-library/issues{/number}","pulls_url":"https://api.github.com/repos/Dominator008/closure-library/pulls{/number}","milestones_url":"https://api.github.com/repos/Dominator008/closure-library/milestones{/number}","notifications_url":"https://api.github.com/repos/Dominator008/closure-library/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Dominator008/closure-library/labels{/name}","releases_url":"https://api.github.com/repos/Dominator008/closure-library/releases{/id}","deployments_url":"https://api.github.com/repos/Dominator008/closure-library/deployments","created_at":"2014-11-18T05:31:00Z","updated_at":"2016-01-14T08:41:49Z","pushed_at":"2016-02-13T04:19:20Z","git_url":"git://github.com/Dominator008/closure-library.git","ssh_url":"git@github.com:Dominator008/closure-library.git","clone_url":"https://github.com/Dominator008/closure-library.git","svn_url":"https://github.com/Dominator008/closure-library","homepage":"code.google.com/closure/library/","size":29123,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"google:master","ref":"master","sha":"3066837b753ef4c20d89e8329aabedd160d49d06","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":12169108,"name":"closure-library","full_name":"google/closure-library","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/closure-library","description":"Google's common JavaScript library","fork":false,"url":"https://api.github.com/repos/google/closure-library","forks_url":"https://api.github.com/repos/google/closure-library/forks","keys_url":"https://api.github.com/repos/google/closure-library/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/closure-library/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/closure-library/teams","hooks_url":"https://api.github.com/repos/google/closure-library/hooks","issue_events_url":"https://api.github.com/repos/google/closure-library/issues/events{/number}","events_url":"https://api.github.com/repos/google/closure-library/events","assignees_url":"https://api.github.com/repos/google/closure-library/assignees{/user}","branches_url":"https://api.github.com/repos/google/closure-library/branches{/branch}","tags_url":"https://api.github.com/repos/google/closure-library/tags","blobs_url":"https://api.github.com/repos/google/closure-library/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/closure-library/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/closure-library/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/closure-library/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/closure-library/statuses/{sha}","languages_url":"https://api.github.com/repos/google/closure-library/languages","stargazers_url":"https://api.github.com/repos/google/closure-library/stargazers","contributors_url":"https://api.github.com/repos/google/closure-library/contributors","subscribers_url":"https://api.github.com/repos/google/closure-library/subscribers","subscription_url":"https://api.github.com/repos/google/closure-library/subscription","commits_url":"https://api.github.com/repos/google/closure-library/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/closure-library/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/closure-library/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/closure-library/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/closure-library/contents/{+path}","compare_url":"https://api.github.com/repos/google/closure-library/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/closure-library/merges","archive_url":"https://api.github.com/repos/google/closure-library/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/closure-library/downloads","issues_url":"https://api.github.com/repos/google/closure-library/issues{/number}","pulls_url":"https://api.github.com/repos/google/closure-library/pulls{/number}","milestones_url":"https://api.github.com/repos/google/closure-library/milestones{/number}","notifications_url":"https://api.github.com/repos/google/closure-library/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/closure-library/labels{/name}","releases_url":"https://api.github.com/repos/google/closure-library/releases{/id}","deployments_url":"https://api.github.com/repos/google/closure-library/deployments","created_at":"2013-08-16T21:54:05Z","updated_at":"2016-02-14T02:42:37Z","pushed_at":"2016-02-13T03:34:07Z","git_url":"git://github.com/google/closure-library.git","ssh_url":"git@github.com:google/closure-library.git","clone_url":"https://github.com/google/closure-library.git","svn_url":"https://github.com/google/closure-library","homepage":"code.google.com/closure/library/","size":57865,"stargazers_count":1427,"watchers_count":1427,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":453,"mirror_url":null,"open_issues_count":143,"forks":453,"open_issues":143,"watchers":1427,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/closure-library/pulls/655"},"html":{"href":"https://github.com/google/closure-library/pull/655"},"issue":{"href":"https://api.github.com/repos/google/closure-library/issues/655"},"comments":{"href":"https://api.github.com/repos/google/closure-library/issues/655/comments"},"review_comments":{"href":"https://api.github.com/repos/google/closure-library/pulls/655/comments"},"review_comment":{"href":"https://api.github.com/repos/google/closure-library/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/closure-library/pulls/655/commits"},"statuses":{"href":"https://api.github.com/repos/google/closure-library/statuses/3b8f28a98086bfb25ed8aa5feeef82da3c0f8648"}}}}