{"action":"created","issue":{"url":"https://api.github.com/repos/inabe49/tarai/issues/1","repository_url":"https://api.github.com/repos/inabe49/tarai","labels_url":"https://api.github.com/repos/inabe49/tarai/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/inabe49/tarai/issues/1/comments","events_url":"https://api.github.com/repos/inabe49/tarai/issues/1/events","html_url":"https://github.com/inabe49/tarai/issues/1","id":164456494,"number":1,"title":"Action lost type information on view components","user":{"login":"inabe49","id":1336020,"avatar_url":"https://avatars.githubusercontent.com/u/1336020?v=3","gravatar_id":"","url":"https://api.github.com/users/inabe49","html_url":"https://github.com/inabe49","followers_url":"https://api.github.com/users/inabe49/followers","following_url":"https://api.github.com/users/inabe49/following{/other_user}","gists_url":"https://api.github.com/users/inabe49/gists{/gist_id}","starred_url":"https://api.github.com/users/inabe49/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inabe49/subscriptions","organizations_url":"https://api.github.com/users/inabe49/orgs","repos_url":"https://api.github.com/users/inabe49/repos","events_url":"https://api.github.com/users/inabe49/events{/privacy}","received_events_url":"https://api.github.com/users/inabe49/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-07-08T04:22:48Z","updated_at":"2016-07-10T08:14:33Z","closed_at":null,"body":"Now, we can use the type system on Store.\r\n\r\n```ts\r\nexport class LoginStore extends Store<LoginProperty> {\r\n    constructor(mail: string) {\r\n        const props: LoginProperty = {};\r\n        super(props);\r\n\r\n        this.bindAction<UpdateUserPasswordAction>(UPDATE_USER_PASSWORD, this.onUpdatePassword);\r\n    }\r\n\r\n    setDispatcher(current: LoginProperty, dispatcher: Dispatcher): void {\r\n        current.dispatcher = dispatcher;\r\n\r\n        current.mail.dispatcher = dispatcher;\r\n    }\r\n\r\n   public onUpdatePassword(action: UpdateUserPasswordAction, current: LoginProperty, update: (next: LoginProperty) => void) {\r\n    }\r\n}\r\n```\r\n\r\nこの実装で、とりあえず型情報を持たせることは出来たが、\r\n\r\n* `action-type` と `Action` の型との対応が取れない\r\n* View 側での制約がない\r\n"},"comment":{"url":"https://api.github.com/repos/inabe49/tarai/issues/comments/231576808","html_url":"https://github.com/inabe49/tarai/issues/1#issuecomment-231576808","issue_url":"https://api.github.com/repos/inabe49/tarai/issues/1","id":231576808,"user":{"login":"inabe49","id":1336020,"avatar_url":"https://avatars.githubusercontent.com/u/1336020?v=3","gravatar_id":"","url":"https://api.github.com/users/inabe49","html_url":"https://github.com/inabe49","followers_url":"https://api.github.com/users/inabe49/followers","following_url":"https://api.github.com/users/inabe49/following{/other_user}","gists_url":"https://api.github.com/users/inabe49/gists{/gist_id}","starred_url":"https://api.github.com/users/inabe49/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inabe49/subscriptions","organizations_url":"https://api.github.com/users/inabe49/orgs","repos_url":"https://api.github.com/users/inabe49/repos","events_url":"https://api.github.com/users/inabe49/events{/privacy}","received_events_url":"https://api.github.com/users/inabe49/received_events","type":"User","site_admin":false},"created_at":"2016-07-10T08:14:33Z","updated_at":"2016-07-10T08:14:33Z","body":"今回の実装だと、 `Props` と `Dispatcher` が循環参照になってしまう・・・"}}
{"actor":{"display_login":"inabe49"}}