{"action":"created","issue":{"url":"https://api.github.com/repos/tmcw/dx-spec/issues/22","repository_url":"https://api.github.com/repos/tmcw/dx-spec","labels_url":"https://api.github.com/repos/tmcw/dx-spec/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/tmcw/dx-spec/issues/22/comments","events_url":"https://api.github.com/repos/tmcw/dx-spec/issues/22/events","html_url":"https://github.com/tmcw/dx-spec/issues/22","id":276713658,"number":22,"title":"Params","user":{"login":"thejameskyle","id":952783,"avatar_url":"https://avatars0.githubusercontent.com/u/952783?v=4","gravatar_id":"","url":"https://api.github.com/users/thejameskyle","html_url":"https://github.com/thejameskyle","followers_url":"https://api.github.com/users/thejameskyle/followers","following_url":"https://api.github.com/users/thejameskyle/following{/other_user}","gists_url":"https://api.github.com/users/thejameskyle/gists{/gist_id}","starred_url":"https://api.github.com/users/thejameskyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thejameskyle/subscriptions","organizations_url":"https://api.github.com/users/thejameskyle/orgs","repos_url":"https://api.github.com/users/thejameskyle/repos","events_url":"https://api.github.com/users/thejameskyle/events{/privacy}","received_events_url":"https://api.github.com/users/thejameskyle/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-11-25T00:25:33Z","updated_at":"2017-11-25T00:30:40Z","closed_at":null,"author_association":"COLLABORATOR","body":"The more I look at it the more I don't like the syntax for documenting params:\r\n\r\n```js\r\n// - param: `a` `number` - description\r\n// - param: `b` `string` - description\r\nfunction foo(a, b) {\r\n  // ...\r\n}\r\n```\r\n\r\nEspecially once you are using Flow/TypeScript:\r\n\r\n```ts\r\n// - param: `a` - description\r\n// - param: `b` - description\r\nfunction foo(a: number, b: string) {\r\n  // ...\r\n}\r\n```\r\n\r\nI think I would prefer doing this:\r\n\r\n```js\r\nfunction foo(\r\n  a, // `number` - description\r\n  b, // `string` - description\r\n) {\r\n  // ...\r\n}\r\n```\r\n\r\n```ts\r\nfunction foo(\r\n  a: number, // description\r\n  b: string, // description\r\n) {\r\n  // ...\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/tmcw/dx-spec/issues/comments/346909127","html_url":"https://github.com/tmcw/dx-spec/issues/22#issuecomment-346909127","issue_url":"https://api.github.com/repos/tmcw/dx-spec/issues/22","id":346909127,"user":{"login":"thejameskyle","id":952783,"avatar_url":"https://avatars0.githubusercontent.com/u/952783?v=4","gravatar_id":"","url":"https://api.github.com/users/thejameskyle","html_url":"https://github.com/thejameskyle","followers_url":"https://api.github.com/users/thejameskyle/followers","following_url":"https://api.github.com/users/thejameskyle/following{/other_user}","gists_url":"https://api.github.com/users/thejameskyle/gists{/gist_id}","starred_url":"https://api.github.com/users/thejameskyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thejameskyle/subscriptions","organizations_url":"https://api.github.com/users/thejameskyle/orgs","repos_url":"https://api.github.com/users/thejameskyle/repos","events_url":"https://api.github.com/users/thejameskyle/events{/privacy}","received_events_url":"https://api.github.com/users/thejameskyle/received_events","type":"User","site_admin":false},"created_at":"2017-11-25T00:30:40Z","updated_at":"2017-11-25T00:30:40Z","author_association":"COLLABORATOR","body":"Other examples:\r\n\r\n```js\r\nfunction foo(\r\n  opts: { // Options\r\n    a: number, // description\r\n    b: string, // description\r\n  },\r\n) {\r\n  // ...\r\n}\r\n```\r\n\r\n```js\r\nfunction foo(\r\n  opts /*: { // Options\r\n    a: number, // description\r\n    b: string, // description\r\n  } */,\r\n) {\r\n  // ...\r\n}\r\n```"}}
{"actor":{"display_login":"thejameskyle"}}