{"action":"created","comment":{"url":"https://api.github.com/repos/ember-decorators/ember-decorators/pulls/comments/204371533","pull_request_review_id":139437481,"id":204371533,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNDM3MTUzMw==","diff_hunk":"@@ -340,6 +340,70 @@ export function lt(dependentKey: string, value: Number): PropertyDecorator;\n  * @param {Number} value - Value to compare against\n  */\n export function lte(dependentKey: string, value: Number): PropertyDecorator;\n+/**\n+  Creates a new decorator from a computed macro function. For instance, you can\n+  use this utility function to create decorators from the macros provided by\n+  addons such as [ember-awesome-macros](https://github.com/kellyselden/ember-awesome-macros).\n+\n+  ```js\n+  import { macro } from '@ember-decorators/object/computed';\n+  import firstMacro from 'ember-awesome-macros/array/first';\n+\n+  const first = macro(firstMacro);\n+\n+  export default class LeaderBoardComponent extends Component {\n+    ranking = ['Natalie', 'Emma', 'Thomas'];\n+\n+    @first('ranking') winner; // => 'Natalie'\n+\n+  }\n+  ```\n+\n+  You can also make use of [partial application](http://2ality.com/2011/09/currying-vs-part-eval.html)\n+  of arguments:\n+\n+  ```js\n+  import { macro } from '@ember-decorators/object/computed';\n+  import { computed } from '@ember/object';\n+\n+  const titleGeneratorMacro = (prefix, titleKey) => computed(function() {\n+    return `${prefix}: ${String(get(this, titleKey)).toUpperCase()}!`;\n+  });\n+\n+  const newsFlash = macro(titleGeneratorMacro, 'News Flash');\n+\n+  export default class NewsPaperComponent extends Component {\n+    title = 'Ember chosen best framework of the year again';\n+\n+    @newsFlash('title') attentionGrabber; // => 'News Flash: EMBER CHOSEN BEST FRAMEWORK OF THE YEAR AGAIN!'\n+  }\n+  ```\n+\n+  @param {function} fn - The macro function to create a decorator from","path":"packages/object/computed.d.ts","position":43,"original_position":43,"commit_id":"ea442c051a996e6c9900fc41bfee7ce07679ea42","original_commit_id":"9f0e3c7d4d8e3ec58e80563b18a844dddd998f7b","user":{"login":"lsg-richard","id":34199568,"node_id":"MDQ6VXNlcjM0MTk5NTY4","avatar_url":"https://avatars3.githubusercontent.com/u/34199568?v=4","gravatar_id":"","url":"https://api.github.com/users/lsg-richard","html_url":"https://github.com/lsg-richard","followers_url":"https://api.github.com/users/lsg-richard/followers","following_url":"https://api.github.com/users/lsg-richard/following{/other_user}","gists_url":"https://api.github.com/users/lsg-richard/gists{/gist_id}","starred_url":"https://api.github.com/users/lsg-richard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsg-richard/subscriptions","organizations_url":"https://api.github.com/users/lsg-richard/orgs","repos_url":"https://api.github.com/users/lsg-richard/repos","events_url":"https://api.github.com/users/lsg-richard/events{/privacy}","received_events_url":"https://api.github.com/users/lsg-richard/received_events","type":"User","site_admin":false},"body":"Would a `@function` tag be redundant in `computed.d.ts`? I couldn't actually see any mention of this tag in TSDoc, but may have missed it.\r\n\r\nLooking at `computed.js`, the `@function` tags were added to exports that weren't self-evidently functions, but `macro()` is defined as a function directly in the source file, so again it may be redundant.\r\n\r\nJust not 100% sure of the documentation semantics here.","created_at":"2018-07-23T11:46:51Z","updated_at":"2018-07-23T11:46:51Z","html_url":"https://github.com/ember-decorators/ember-decorators/pull/258#discussion_r204371533","pull_request_url":"https://api.github.com/repos/ember-decorators/ember-decorators/pulls/258","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/ember-decorators/ember-decorators/pulls/comments/204371533"},"html":{"href":"https://github.com/ember-decorators/ember-decorators/pull/258#discussion_r204371533"},"pull_request":{"href":"https://api.github.com/repos/ember-decorators/ember-decorators/pulls/258"}},"in_reply_to_id":204326838},"pull_request":{"url":"https://api.github.com/repos/ember-decorators/ember-decorators/pulls/258","id":202981495,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyOTgxNDk1","html_url":"https://github.com/ember-decorators/ember-decorators/pull/258","diff_url":"https://github.com/ember-decorators/ember-decorators/pull/258.diff","patch_url":"https://github.com/ember-decorators/ember-decorators/pull/258.patch","issue_url":"https://api.github.com/repos/ember-decorators/ember-decorators/issues/258","number":258,"state":"open","locked":false,"title":"Add type definition for the macro() function","user":{"login":"lsg-richard","id":34199568,"node_id":"MDQ6VXNlcjM0MTk5NTY4","avatar_url":"https://avatars3.githubusercontent.com/u/34199568?v=4","gravatar_id":"","url":"https://api.github.com/users/lsg-richard","html_url":"https://github.com/lsg-richard","followers_url":"https://api.github.com/users/lsg-richard/followers","following_url":"https://api.github.com/users/lsg-richard/following{/other_user}","gists_url":"https://api.github.com/users/lsg-richard/gists{/gist_id}","starred_url":"https://api.github.com/users/lsg-richard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsg-richard/subscriptions","organizations_url":"https://api.github.com/users/lsg-richard/orgs","repos_url":"https://api.github.com/users/lsg-richard/repos","events_url":"https://api.github.com/users/lsg-richard/events{/privacy}","received_events_url":"https://api.github.com/users/lsg-richard/received_events","type":"User","site_admin":false},"body":"The tsdoc content is copied verbatim from `computed.js`.","created_at":"2018-07-21T00:24:05Z","updated_at":"2018-07-23T11:46:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"08ade5dcc14ce053cc0eda783f845cca049ed3c9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ember-decorators/ember-decorators/pulls/258/commits","review_comments_url":"https://api.github.com/repos/ember-decorators/ember-decorators/pulls/258/comments","review_comment_url":"https://api.github.com/repos/ember-decorators/ember-decorators/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ember-decorators/ember-decorators/issues/258/comments","statuses_url":"https://api.github.com/repos/ember-decorators/ember-decorators/statuses/ea442c051a996e6c9900fc41bfee7ce07679ea42","head":{"label":"lsg-richard:add-type-defintion-for-macro","ref":"add-type-defintion-for-macro","sha":"ea442c051a996e6c9900fc41bfee7ce07679ea42","user":{"login":"lsg-richard","id":34199568,"node_id":"MDQ6VXNlcjM0MTk5NTY4","avatar_url":"https://avatars3.githubusercontent.com/u/34199568?v=4","gravatar_id":"","url":"https://api.github.com/users/lsg-richard","html_url":"https://github.com/lsg-richard","followers_url":"https://api.github.com/users/lsg-richard/followers","following_url":"https://api.github.com/users/lsg-richard/following{/other_user}","gists_url":"https://api.github.com/users/lsg-richard/gists{/gist_id}","starred_url":"https://api.github.com/users/lsg-richard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsg-richard/subscriptions","organizations_url":"https://api.github.com/users/lsg-richard/orgs","repos_url":"https://api.github.com/users/lsg-richard/repos","events_url":"https://api.github.com/users/lsg-richard/events{/privacy}","received_events_url":"https://api.github.com/users/lsg-richard/received_events","type":"User","site_admin":false},"repo":{"id":141768226,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE3NjgyMjY=","name":"ember-decorators","full_name":"lsg-richard/ember-decorators","owner":{"login":"lsg-richard","id":34199568,"node_id":"MDQ6VXNlcjM0MTk5NTY4","avatar_url":"https://avatars3.githubusercontent.com/u/34199568?v=4","gravatar_id":"","url":"https://api.github.com/users/lsg-richard","html_url":"https://github.com/lsg-richard","followers_url":"https://api.github.com/users/lsg-richard/followers","following_url":"https://api.github.com/users/lsg-richard/following{/other_user}","gists_url":"https://api.github.com/users/lsg-richard/gists{/gist_id}","starred_url":"https://api.github.com/users/lsg-richard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsg-richard/subscriptions","organizations_url":"https://api.github.com/users/lsg-richard/orgs","repos_url":"https://api.github.com/users/lsg-richard/repos","events_url":"https://api.github.com/users/lsg-richard/events{/privacy}","received_events_url":"https://api.github.com/users/lsg-richard/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lsg-richard/ember-decorators","description":"Useful decorators for Ember applications.","fork":true,"url":"https://api.github.com/repos/lsg-richard/ember-decorators","forks_url":"https://api.github.com/repos/lsg-richard/ember-decorators/forks","keys_url":"https://api.github.com/repos/lsg-richard/ember-decorators/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lsg-richard/ember-decorators/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lsg-richard/ember-decorators/teams","hooks_url":"https://api.github.com/repos/lsg-richard/ember-decorators/hooks","issue_events_url":"https://api.github.com/repos/lsg-richard/ember-decorators/issues/events{/number}","events_url":"https://api.github.com/repos/lsg-richard/ember-decorators/events","assignees_url":"https://api.github.com/repos/lsg-richard/ember-decorators/assignees{/user}","branches_url":"https://api.github.com/repos/lsg-richard/ember-decorators/branches{/branch}","tags_url":"https://api.github.com/repos/lsg-richard/ember-decorators/tags","blobs_url":"https://api.github.com/repos/lsg-richard/ember-decorators/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lsg-richard/ember-decorators/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lsg-richard/ember-decorators/git/refs{/sha}","trees_url":"https://api.github.com/repos/lsg-richard/ember-decorators/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lsg-richard/ember-decorators/statuses/{sha}","languages_url":"https://api.github.com/repos/lsg-richard/ember-decorators/languages","stargazers_url":"https://api.github.com/repos/lsg-richard/ember-decorators/stargazers","contributors_url":"https://api.github.com/repos/lsg-richard/ember-decorators/contributors","subscribers_url":"https://api.github.com/repos/lsg-richard/ember-decorators/subscribers","subscription_url":"https://api.github.com/repos/lsg-richard/ember-decorators/subscription","commits_url":"https://api.github.com/repos/lsg-richard/ember-decorators/commits{/sha}","git_commits_url":"https://api.github.com/repos/lsg-richard/ember-decorators/git/commits{/sha}","comments_url":"https://api.github.com/repos/lsg-richard/ember-decorators/comments{/number}","issue_comment_url":"https://api.github.com/repos/lsg-richard/ember-decorators/issues/comments{/number}","contents_url":"https://api.github.com/repos/lsg-richard/ember-decorators/contents/{+path}","compare_url":"https://api.github.com/repos/lsg-richard/ember-decorators/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lsg-richard/ember-decorators/merges","archive_url":"https://api.github.com/repos/lsg-richard/ember-decorators/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lsg-richard/ember-decorators/downloads","issues_url":"https://api.github.com/repos/lsg-richard/ember-decorators/issues{/number}","pulls_url":"https://api.github.com/repos/lsg-richard/ember-decorators/pulls{/number}","milestones_url":"https://api.github.com/repos/lsg-richard/ember-decorators/milestones{/number}","notifications_url":"https://api.github.com/repos/lsg-richard/ember-decorators/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lsg-richard/ember-decorators/labels{/name}","releases_url":"https://api.github.com/repos/lsg-richard/ember-decorators/releases{/id}","deployments_url":"https://api.github.com/repos/lsg-richard/ember-decorators/deployments","created_at":"2018-07-21T00:12:32Z","updated_at":"2018-07-21T00:12:34Z","pushed_at":"2018-07-23T11:28:28Z","git_url":"git://github.com/lsg-richard/ember-decorators.git","ssh_url":"git@github.com:lsg-richard/ember-decorators.git","clone_url":"https://github.com/lsg-richard/ember-decorators.git","svn_url":"https://github.com/lsg-richard/ember-decorators","homepage":"https://ember-decorators.github.io/ember-decorators","size":5480,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ember-decorators:master","ref":"master","sha":"0c379b7e0831a6f61e774deb2f081a7e80f31b8e","user":{"login":"ember-decorators","id":30607698,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwNjA3Njk4","avatar_url":"https://avatars1.githubusercontent.com/u/30607698?v=4","gravatar_id":"","url":"https://api.github.com/users/ember-decorators","html_url":"https://github.com/ember-decorators","followers_url":"https://api.github.com/users/ember-decorators/followers","following_url":"https://api.github.com/users/ember-decorators/following{/other_user}","gists_url":"https://api.github.com/users/ember-decorators/gists{/gist_id}","starred_url":"https://api.github.com/users/ember-decorators/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ember-decorators/subscriptions","organizations_url":"https://api.github.com/users/ember-decorators/orgs","repos_url":"https://api.github.com/users/ember-decorators/repos","events_url":"https://api.github.com/users/ember-decorators/events{/privacy}","received_events_url":"https://api.github.com/users/ember-decorators/received_events","type":"Organization","site_admin":false},"repo":{"id":33876832,"node_id":"MDEwOlJlcG9zaXRvcnkzMzg3NjgzMg==","name":"ember-decorators","full_name":"ember-decorators/ember-decorators","owner":{"login":"ember-decorators","id":30607698,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwNjA3Njk4","avatar_url":"https://avatars1.githubusercontent.com/u/30607698?v=4","gravatar_id":"","url":"https://api.github.com/users/ember-decorators","html_url":"https://github.com/ember-decorators","followers_url":"https://api.github.com/users/ember-decorators/followers","following_url":"https://api.github.com/users/ember-decorators/following{/other_user}","gists_url":"https://api.github.com/users/ember-decorators/gists{/gist_id}","starred_url":"https://api.github.com/users/ember-decorators/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ember-decorators/subscriptions","organizations_url":"https://api.github.com/users/ember-decorators/orgs","repos_url":"https://api.github.com/users/ember-decorators/repos","events_url":"https://api.github.com/users/ember-decorators/events{/privacy}","received_events_url":"https://api.github.com/users/ember-decorators/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ember-decorators/ember-decorators","description":"Useful decorators for Ember applications.","fork":false,"url":"https://api.github.com/repos/ember-decorators/ember-decorators","forks_url":"https://api.github.com/repos/ember-decorators/ember-decorators/forks","keys_url":"https://api.github.com/repos/ember-decorators/ember-decorators/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ember-decorators/ember-decorators/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ember-decorators/ember-decorators/teams","hooks_url":"https://api.github.com/repos/ember-decorators/ember-decorators/hooks","issue_events_url":"https://api.github.com/repos/ember-decorators/ember-decorators/issues/events{/number}","events_url":"https://api.github.com/repos/ember-decorators/ember-decorators/events","assignees_url":"https://api.github.com/repos/ember-decorators/ember-decorators/assignees{/user}","branches_url":"https://api.github.com/repos/ember-decorators/ember-decorators/branches{/branch}","tags_url":"https://api.github.com/repos/ember-decorators/ember-decorators/tags","blobs_url":"https://api.github.com/repos/ember-decorators/ember-decorators/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ember-decorators/ember-decorators/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ember-decorators/ember-decorators/git/refs{/sha}","trees_url":"https://api.github.com/repos/ember-decorators/ember-decorators/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ember-decorators/ember-decorators/statuses/{sha}","languages_url":"https://api.github.com/repos/ember-decorators/ember-decorators/languages","stargazers_url":"https://api.github.com/repos/ember-decorators/ember-decorators/stargazers","contributors_url":"https://api.github.com/repos/ember-decorators/ember-decorators/contributors","subscribers_url":"https://api.github.com/repos/ember-decorators/ember-decorators/subscribers","subscription_url":"https://api.github.com/repos/ember-decorators/ember-decorators/subscription","commits_url":"https://api.github.com/repos/ember-decorators/ember-decorators/commits{/sha}","git_commits_url":"https://api.github.com/repos/ember-decorators/ember-decorators/git/commits{/sha}","comments_url":"https://api.github.com/repos/ember-decorators/ember-decorators/comments{/number}","issue_comment_url":"https://api.github.com/repos/ember-decorators/ember-decorators/issues/comments{/number}","contents_url":"https://api.github.com/repos/ember-decorators/ember-decorators/contents/{+path}","compare_url":"https://api.github.com/repos/ember-decorators/ember-decorators/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ember-decorators/ember-decorators/merges","archive_url":"https://api.github.com/repos/ember-decorators/ember-decorators/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ember-decorators/ember-decorators/downloads","issues_url":"https://api.github.com/repos/ember-decorators/ember-decorators/issues{/number}","pulls_url":"https://api.github.com/repos/ember-decorators/ember-decorators/pulls{/number}","milestones_url":"https://api.github.com/repos/ember-decorators/ember-decorators/milestones{/number}","notifications_url":"https://api.github.com/repos/ember-decorators/ember-decorators/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ember-decorators/ember-decorators/labels{/name}","releases_url":"https://api.github.com/repos/ember-decorators/ember-decorators/releases{/id}","deployments_url":"https://api.github.com/repos/ember-decorators/ember-decorators/deployments","created_at":"2015-04-13T15:30:38Z","updated_at":"2018-07-23T06:01:32Z","pushed_at":"2018-07-23T11:28:30Z","git_url":"git://github.com/ember-decorators/ember-decorators.git","ssh_url":"git@github.com:ember-decorators/ember-decorators.git","clone_url":"https://github.com/ember-decorators/ember-decorators.git","svn_url":"https://github.com/ember-decorators/ember-decorators","homepage":"https://ember-decorators.github.io/ember-decorators","size":5474,"stargazers_count":308,"watchers_count":308,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":67,"mirror_url":null,"archived":false,"open_issues_count":12,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":67,"open_issues":12,"watchers":308,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ember-decorators/ember-decorators/pulls/258"},"html":{"href":"https://github.com/ember-decorators/ember-decorators/pull/258"},"issue":{"href":"https://api.github.com/repos/ember-decorators/ember-decorators/issues/258"},"comments":{"href":"https://api.github.com/repos/ember-decorators/ember-decorators/issues/258/comments"},"review_comments":{"href":"https://api.github.com/repos/ember-decorators/ember-decorators/pulls/258/comments"},"review_comment":{"href":"https://api.github.com/repos/ember-decorators/ember-decorators/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ember-decorators/ember-decorators/pulls/258/commits"},"statuses":{"href":"https://api.github.com/repos/ember-decorators/ember-decorators/statuses/ea442c051a996e6c9900fc41bfee7ce07679ea42"}},"author_association":"NONE"}}
{"actor":{"display_login":"lsg-richard"}}