{"action":"opened","issue":{"url":"https://api.github.com/repos/mobxjs/mobx-state-tree/issues/644","repository_url":"https://api.github.com/repos/mobxjs/mobx-state-tree","labels_url":"https://api.github.com/repos/mobxjs/mobx-state-tree/issues/644/labels{/name}","comments_url":"https://api.github.com/repos/mobxjs/mobx-state-tree/issues/644/comments","events_url":"https://api.github.com/repos/mobxjs/mobx-state-tree/issues/644/events","html_url":"https://github.com/mobxjs/mobx-state-tree/issues/644","id":295227339,"number":644,"title":"Compose model with function as prop (types.function)","user":{"login":"alexwasner","id":4612947,"avatar_url":"https://avatars1.githubusercontent.com/u/4612947?v=4","gravatar_id":"","url":"https://api.github.com/users/alexwasner","html_url":"https://github.com/alexwasner","followers_url":"https://api.github.com/users/alexwasner/followers","following_url":"https://api.github.com/users/alexwasner/following{/other_user}","gists_url":"https://api.github.com/users/alexwasner/gists{/gist_id}","starred_url":"https://api.github.com/users/alexwasner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexwasner/subscriptions","organizations_url":"https://api.github.com/users/alexwasner/orgs","repos_url":"https://api.github.com/users/alexwasner/repos","events_url":"https://api.github.com/users/alexwasner/events{/privacy}","received_events_url":"https://api.github.com/users/alexwasner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-07T17:33:41Z","updated_at":"2018-02-07T17:33:41Z","closed_at":null,"author_association":"NONE","body":"I'm converting a project to state tree and have some properties that are functions. For example, an `action` property that you can pass a function to run at certain instances. I couldn't find anything in the docs related to a `types.function`.\r\n\r\nI want to do something like this:\r\n\r\n```\r\nconst ButtonModel = types.model({\r\n  action:types.optional(types.function,()=>{}),\r\n  icon:types.number\r\n})\r\n```"}}
{"actor":{"display_login":"alexwasner"}}