{"action":"created","issue":{"url":"https://api.github.com/repos/mweststrate/immer/issues/155","repository_url":"https://api.github.com/repos/mweststrate/immer","labels_url":"https://api.github.com/repos/mweststrate/immer/issues/155/labels{/name}","comments_url":"https://api.github.com/repos/mweststrate/immer/issues/155/comments","events_url":"https://api.github.com/repos/mweststrate/immer/issues/155/events","html_url":"https://github.com/mweststrate/immer/issues/155","id":325336458,"node_id":"MDU6SXNzdWUzMjUzMzY0NTg=","number":155,"title":"Custom Class support in state tree","user":{"login":"wonderwhy-er","id":1150639,"node_id":"MDQ6VXNlcjExNTA2Mzk=","avatar_url":"https://avatars3.githubusercontent.com/u/1150639?v=4","gravatar_id":"","url":"https://api.github.com/users/wonderwhy-er","html_url":"https://github.com/wonderwhy-er","followers_url":"https://api.github.com/users/wonderwhy-er/followers","following_url":"https://api.github.com/users/wonderwhy-er/following{/other_user}","gists_url":"https://api.github.com/users/wonderwhy-er/gists{/gist_id}","starred_url":"https://api.github.com/users/wonderwhy-er/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wonderwhy-er/subscriptions","organizations_url":"https://api.github.com/users/wonderwhy-er/orgs","repos_url":"https://api.github.com/users/wonderwhy-er/repos","events_url":"https://api.github.com/users/wonderwhy-er/events{/privacy}","received_events_url":"https://api.github.com/users/wonderwhy-er/received_events","type":"User","site_admin":false},"labels":[{"id":1004490744,"node_id":"MDU6TGFiZWwxMDA0NDkwNzQ0","url":"https://api.github.com/repos/mweststrate/immer/labels/more%20types","name":"more types","color":"207c7c","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-05-22T15:04:25Z","updated_at":"2018-09-20T16:51:37Z","closed_at":"2018-08-16T14:51:39Z","author_association":"NONE","body":"* [x] Feature request: ______\r\n  * [x] I am willing to implement this myself\r\n\r\nTried my hand on it quickly and you can find it here\r\nhttps://github.com/wonderwhy-er/immer/commit/0fcc078b62685351b766a52a90cd39a0ac3a74f0\r\n\r\nIssue is that it does not throw on non Date objects now\r\n\r\nAlso for classes that use private techniques this wont work correctly, probably needs second symbol that allows providing custom proxy that is aware of private state.\r\n\r\nNot sure how to proceed so far."},"comment":{"url":"https://api.github.com/repos/mweststrate/immer/issues/comments/423255134","html_url":"https://github.com/mweststrate/immer/issues/155#issuecomment-423255134","issue_url":"https://api.github.com/repos/mweststrate/immer/issues/155","id":423255134,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzI1NTEzNA==","user":{"login":"ianstormtaylor","id":311752,"node_id":"MDQ6VXNlcjMxMTc1Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/311752?v=4","gravatar_id":"","url":"https://api.github.com/users/ianstormtaylor","html_url":"https://github.com/ianstormtaylor","followers_url":"https://api.github.com/users/ianstormtaylor/followers","following_url":"https://api.github.com/users/ianstormtaylor/following{/other_user}","gists_url":"https://api.github.com/users/ianstormtaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/ianstormtaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianstormtaylor/subscriptions","organizations_url":"https://api.github.com/users/ianstormtaylor/orgs","repos_url":"https://api.github.com/users/ianstormtaylor/repos","events_url":"https://api.github.com/users/ianstormtaylor/events{/privacy}","received_events_url":"https://api.github.com/users/ianstormtaylor/received_events","type":"User","site_admin":false},"created_at":"2018-09-20T16:51:37Z","updated_at":"2018-09-20T16:51:37Z","author_association":"NONE","body":"> In other words, there are a lot of limitations, really hard to comprehend edge cases when working with classes. Unless classes are basically restrained to be just records or structs. But that kinda defeats the whole purpose as in that case an interface would have sufficed anyways.\r\n\r\nCould you explain the alternative you're suggesting here? Is there no way to have `immer` deal with immutable records/structs that also happen to have their own prototype with helpful methods?"}}
{"actor":{"display_login":"ianstormtaylor"}}