{"action":"closed","issue":{"url":"https://api.github.com/repos/Perryvw/TypescriptToLua/issues/224","repository_url":"https://api.github.com/repos/Perryvw/TypescriptToLua","labels_url":"https://api.github.com/repos/Perryvw/TypescriptToLua/issues/224/labels{/name}","comments_url":"https://api.github.com/repos/Perryvw/TypescriptToLua/issues/224/comments","events_url":"https://api.github.com/repos/Perryvw/TypescriptToLua/issues/224/events","html_url":"https://github.com/Perryvw/TypescriptToLua/issues/224","id":367877934,"node_id":"MDU6SXNzdWUzNjc4Nzc5MzQ=","number":224,"title":"NonNullExpression could be implemented","user":{"login":"cymerrad","id":22897727,"node_id":"MDQ6VXNlcjIyODk3NzI3","avatar_url":"https://avatars1.githubusercontent.com/u/22897727?v=4","gravatar_id":"","url":"https://api.github.com/users/cymerrad","html_url":"https://github.com/cymerrad","followers_url":"https://api.github.com/users/cymerrad/followers","following_url":"https://api.github.com/users/cymerrad/following{/other_user}","gists_url":"https://api.github.com/users/cymerrad/gists{/gist_id}","starred_url":"https://api.github.com/users/cymerrad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cymerrad/subscriptions","organizations_url":"https://api.github.com/users/cymerrad/orgs","repos_url":"https://api.github.com/users/cymerrad/repos","events_url":"https://api.github.com/users/cymerrad/events{/privacy}","received_events_url":"https://api.github.com/users/cymerrad/received_events","type":"User","site_admin":false},"labels":[{"id":868008254,"node_id":"MDU6TGFiZWw4NjgwMDgyNTQ=","url":"https://api.github.com/repos/Perryvw/TypescriptToLua/labels/feature%20request","name":"feature request","color":"f98498","default":false}],"state":"closed","locked":false,"assignee":{"login":"Perryvw","id":7956873,"node_id":"MDQ6VXNlcjc5NTY4NzM=","avatar_url":"https://avatars1.githubusercontent.com/u/7956873?v=4","gravatar_id":"","url":"https://api.github.com/users/Perryvw","html_url":"https://github.com/Perryvw","followers_url":"https://api.github.com/users/Perryvw/followers","following_url":"https://api.github.com/users/Perryvw/following{/other_user}","gists_url":"https://api.github.com/users/Perryvw/gists{/gist_id}","starred_url":"https://api.github.com/users/Perryvw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Perryvw/subscriptions","organizations_url":"https://api.github.com/users/Perryvw/orgs","repos_url":"https://api.github.com/users/Perryvw/repos","events_url":"https://api.github.com/users/Perryvw/events{/privacy}","received_events_url":"https://api.github.com/users/Perryvw/received_events","type":"User","site_admin":false},"assignees":[{"login":"Perryvw","id":7956873,"node_id":"MDQ6VXNlcjc5NTY4NzM=","avatar_url":"https://avatars1.githubusercontent.com/u/7956873?v=4","gravatar_id":"","url":"https://api.github.com/users/Perryvw","html_url":"https://github.com/Perryvw","followers_url":"https://api.github.com/users/Perryvw/followers","following_url":"https://api.github.com/users/Perryvw/following{/other_user}","gists_url":"https://api.github.com/users/Perryvw/gists{/gist_id}","starred_url":"https://api.github.com/users/Perryvw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Perryvw/subscriptions","organizations_url":"https://api.github.com/users/Perryvw/orgs","repos_url":"https://api.github.com/users/Perryvw/repos","events_url":"https://api.github.com/users/Perryvw/events{/privacy}","received_events_url":"https://api.github.com/users/Perryvw/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2018-10-08T17:04:49Z","updated_at":"2018-10-11T18:09:47Z","closed_at":"2018-10-11T18:09:47Z","author_association":"NONE","body":"Sometimes I'm sure that some key-value pairs exist in a map, so I'm using \"!\" to get around compiler/linter yelling at me, that the value I'm getting from this map may be undefined.\r\n\r\n```Typescript\r\ndeclare function print(...msg: any[]): void;\r\n\r\ntype OnlyPossibleValues = \"a\" | \"b\" | \"c\";\r\nlet valueToNumber: Map<OnlyPossibleValues, { property: number }> = new Map();\r\nvalueToNumber.set(\"a\", { property: 1 });\r\nvalueToNumber.set(\"b\", { property: 2 });\r\nvalueToNumber.set(\"c\", { property: 3 });\r\n\r\n// let possiblyDefinedValue = valueToNumber.get(\"a\");\r\nlet definitelyDefinedValue = valueToNumber.get(\"b\")!;\r\n// print(possiblyDefinedValue.property);\r\nprint(definitelyDefinedValue.property);\r\n```\r\n\r\nUnfortunately this is not implemented, even though it wouldn't have any effect on Lua code, but it would improve working with Typescript."}}
{"actor":{"display_login":"Perryvw"}}