{"action":"closed","issue":{"url":"https://api.github.com/repos/cartant/ts-action/issues/25","repository_url":"https://api.github.com/repos/cartant/ts-action","labels_url":"https://api.github.com/repos/cartant/ts-action/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/cartant/ts-action/issues/25/comments","events_url":"https://api.github.com/repos/cartant/ts-action/issues/25/events","html_url":"https://github.com/cartant/ts-action/issues/25","id":365414629,"node_id":"MDU6SXNzdWUzNjU0MTQ2Mjk=","number":25,"title":"Missing payload param in reducer doesn't get flagged by typescript","user":{"login":"will-stone","id":654103,"node_id":"MDQ6VXNlcjY1NDEwMw==","avatar_url":"https://avatars1.githubusercontent.com/u/654103?v=4","gravatar_id":"","url":"https://api.github.com/users/will-stone","html_url":"https://github.com/will-stone","followers_url":"https://api.github.com/users/will-stone/followers","following_url":"https://api.github.com/users/will-stone/following{/other_user}","gists_url":"https://api.github.com/users/will-stone/gists{/gist_id}","starred_url":"https://api.github.com/users/will-stone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/will-stone/subscriptions","organizations_url":"https://api.github.com/users/will-stone/orgs","repos_url":"https://api.github.com/users/will-stone/repos","events_url":"https://api.github.com/users/will-stone/events{/privacy}","received_events_url":"https://api.github.com/users/will-stone/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-10-01T11:16:25Z","updated_at":"2018-10-01T11:54:09Z","closed_at":"2018-10-01T11:54:09Z","author_association":"NONE","body":"First of all, thank-you very much for this lib; it is the best package I've found for reducing action boilerplate.\r\n\r\nI've found that typescript allows this to go through: \r\n```ts\r\n...\r\ntest: state.test === 'bar' ? 'foo' : action.payload, // <-- this bit: 'action.payload'\r\n...\r\n```\r\n\r\ni.e. without specifying a payload key.\r\n\r\nHere's a sandbox demonstrating the issue: https://codesandbox.io/s/2on52r265j\r\n\r\nI'm trying to fix it myself and will let you know if I come up with a solution."}}
{"actor":{"display_login":"will-stone"}}