{"action":"created","issue":{"url":"https://api.github.com/repos/codemix/babel-plugin-typecheck/issues/39","labels_url":"https://api.github.com/repos/codemix/babel-plugin-typecheck/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/codemix/babel-plugin-typecheck/issues/39/comments","events_url":"https://api.github.com/repos/codemix/babel-plugin-typecheck/issues/39/events","html_url":"https://github.com/codemix/babel-plugin-typecheck/issues/39","id":114021988,"number":39,"title":"Define object with props as an optional argument","user":{"login":"alexfedoseev","id":4244251,"avatar_url":"https://avatars.githubusercontent.com/u/4244251?v=3","gravatar_id":"","url":"https://api.github.com/users/alexfedoseev","html_url":"https://github.com/alexfedoseev","followers_url":"https://api.github.com/users/alexfedoseev/followers","following_url":"https://api.github.com/users/alexfedoseev/following{/other_user}","gists_url":"https://api.github.com/users/alexfedoseev/gists{/gist_id}","starred_url":"https://api.github.com/users/alexfedoseev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexfedoseev/subscriptions","organizations_url":"https://api.github.com/users/alexfedoseev/orgs","repos_url":"https://api.github.com/users/alexfedoseev/repos","events_url":"https://api.github.com/users/alexfedoseev/events{/privacy}","received_events_url":"https://api.github.com/users/alexfedoseev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-10-29T10:35:50Z","updated_at":"2015-10-29T21:22:46Z","closed_at":null,"body":"Thanks for this plugin! I sleep much better now :)\r\n\r\nI have 3 questions. Will split them in 3 issues. Here is first one.\r\n\r\nIs it possible to define object with props as an optional argument?\r\n\r\n```js\r\nexport default function dummiesReducer(\r\n  $state: $Map = $initialState,\r\n  {\r\n    type,\r\n    index,\r\n    errors,\r\n  } : {\r\n    type  : string,\r\n    index : ?Array<number>,\r\n    errors: ?{ code: number, data: Object }, // <--- if arg is passed - check its props\r\n  }\r\n) {\r\n  // ...\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/codemix/babel-plugin-typecheck/issues/comments/152332148","html_url":"https://github.com/codemix/babel-plugin-typecheck/issues/39#issuecomment-152332148","issue_url":"https://api.github.com/repos/codemix/babel-plugin-typecheck/issues/39","id":152332148,"user":{"login":"alexfedoseev","id":4244251,"avatar_url":"https://avatars.githubusercontent.com/u/4244251?v=3","gravatar_id":"","url":"https://api.github.com/users/alexfedoseev","html_url":"https://github.com/alexfedoseev","followers_url":"https://api.github.com/users/alexfedoseev/followers","following_url":"https://api.github.com/users/alexfedoseev/following{/other_user}","gists_url":"https://api.github.com/users/alexfedoseev/gists{/gist_id}","starred_url":"https://api.github.com/users/alexfedoseev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexfedoseev/subscriptions","organizations_url":"https://api.github.com/users/alexfedoseev/orgs","repos_url":"https://api.github.com/users/alexfedoseev/repos","events_url":"https://api.github.com/users/alexfedoseev/events{/privacy}","received_events_url":"https://api.github.com/users/alexfedoseev/received_events","type":"User","site_admin":false},"created_at":"2015-10-29T21:22:46Z","updated_at":"2015-10-29T21:22:46Z","body":"Great, thanks! :+1: "}}