{"action":"created","issue":{"url":"https://api.github.com/repos/yayoc/optional-chain/issues/1","repository_url":"https://api.github.com/repos/yayoc/optional-chain","labels_url":"https://api.github.com/repos/yayoc/optional-chain/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/yayoc/optional-chain/issues/1/comments","events_url":"https://api.github.com/repos/yayoc/optional-chain/issues/1/events","html_url":"https://github.com/yayoc/optional-chain/issues/1","id":337240852,"node_id":"MDU6SXNzdWUzMzcyNDA4NTI=","number":1,"title":"Does not work?","user":{"login":"henrikra","id":12229968,"node_id":"MDQ6VXNlcjEyMjI5OTY4","avatar_url":"https://avatars1.githubusercontent.com/u/12229968?v=4","gravatar_id":"","url":"https://api.github.com/users/henrikra","html_url":"https://github.com/henrikra","followers_url":"https://api.github.com/users/henrikra/followers","following_url":"https://api.github.com/users/henrikra/following{/other_user}","gists_url":"https://api.github.com/users/henrikra/gists{/gist_id}","starred_url":"https://api.github.com/users/henrikra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henrikra/subscriptions","organizations_url":"https://api.github.com/users/henrikra/orgs","repos_url":"https://api.github.com/users/henrikra/repos","events_url":"https://api.github.com/users/henrikra/events{/privacy}","received_events_url":"https://api.github.com/users/henrikra/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-30T20:30:26Z","updated_at":"2018-07-18T15:05:04Z","closed_at":"2018-07-18T15:05:04Z","author_association":"NONE","body":"There are couple mistakes in the example in the README so here is my code:\r\n\r\n```\r\ninterface User {\r\n  name?: {\r\n    first: string\r\n  },\r\n}\r\n\r\nconst user: User = { name: undefined };\r\nconst optionalUser = optional(user);\r\noptionalUser.k(\"name\").k(\"first\").get();\r\n```\r\n\r\n![image](https://user-images.githubusercontent.com/12229968/42128850-84ffe54e-7cbd-11e8-9c26-b5bb48b44e0f.png)\r\n\r\nBut I am getting error `[ts] Argument of type '\"first\"' is not assignable to parameter of type 'never'.` on `firstName`\r\n\r\nSo what I am doing wrong? 🤔 "},"comment":{"url":"https://api.github.com/repos/yayoc/optional-chain/issues/comments/405963974","html_url":"https://github.com/yayoc/optional-chain/issues/1#issuecomment-405963974","issue_url":"https://api.github.com/repos/yayoc/optional-chain/issues/1","id":405963974,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNTk2Mzk3NA==","user":{"login":"yayoc","id":6383334,"node_id":"MDQ6VXNlcjYzODMzMzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6383334?v=4","gravatar_id":"","url":"https://api.github.com/users/yayoc","html_url":"https://github.com/yayoc","followers_url":"https://api.github.com/users/yayoc/followers","following_url":"https://api.github.com/users/yayoc/following{/other_user}","gists_url":"https://api.github.com/users/yayoc/gists{/gist_id}","starred_url":"https://api.github.com/users/yayoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yayoc/subscriptions","organizations_url":"https://api.github.com/users/yayoc/orgs","repos_url":"https://api.github.com/users/yayoc/repos","events_url":"https://api.github.com/users/yayoc/events{/privacy}","received_events_url":"https://api.github.com/users/yayoc/received_events","type":"User","site_admin":false},"created_at":"2018-07-18T15:05:04Z","updated_at":"2018-07-18T15:05:04Z","author_association":"OWNER","body":"@henrikra \r\nYes, You are correct. `v0.1.0` was not handling optional properties properly.\r\nI published [v0.1.1](https://github.com/yayoc/optional-chain/releases/tag/v0.1.1) to solve the issue.\r\nThanks."}}
{"actor":{"display_login":"yayoc"}}