{"action":"created","issue":{"url":"https://api.github.com/repos/dsherret/code-block-writer/issues/15","repository_url":"https://api.github.com/repos/dsherret/code-block-writer","labels_url":"https://api.github.com/repos/dsherret/code-block-writer/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/dsherret/code-block-writer/issues/15/comments","events_url":"https://api.github.com/repos/dsherret/code-block-writer/issues/15/events","html_url":"https://github.com/dsherret/code-block-writer/issues/15","id":312324956,"number":15,"title":"Lazily evaluate conditional writes","user":{"login":"lazarljubenovic","id":7661457,"avatar_url":"https://avatars3.githubusercontent.com/u/7661457?v=4","gravatar_id":"","url":"https://api.github.com/users/lazarljubenovic","html_url":"https://github.com/lazarljubenovic","followers_url":"https://api.github.com/users/lazarljubenovic/followers","following_url":"https://api.github.com/users/lazarljubenovic/following{/other_user}","gists_url":"https://api.github.com/users/lazarljubenovic/gists{/gist_id}","starred_url":"https://api.github.com/users/lazarljubenovic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lazarljubenovic/subscriptions","organizations_url":"https://api.github.com/users/lazarljubenovic/orgs","repos_url":"https://api.github.com/users/lazarljubenovic/repos","events_url":"https://api.github.com/users/lazarljubenovic/events{/privacy}","received_events_url":"https://api.github.com/users/lazarljubenovic/received_events","type":"User","site_admin":false},"labels":[{"id":272689681,"url":"https://api.github.com/repos/dsherret/code-block-writer/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-08T17:46:49Z","updated_at":"2018-04-08T18:10:43Z","closed_at":null,"author_association":"NONE","body":"Currently, the following throws (naturally) if `foo` is `null`.\r\n\r\n```ts\r\nthis.conditionalWrite(foo != null, foo.bar)\r\n```\r\n\r\nHowever, this would not throw if the function was evaluated only after the conditional check has been passed:\r\n\r\n```ts\r\nthis.conditionalWrite(foo != null, () => foo.bar)\r\n```\r\n\r\nWe could still support the old one, of course, so it can be done as a non-breaking change."},"comment":{"url":"https://api.github.com/repos/dsherret/code-block-writer/issues/comments/379569992","html_url":"https://github.com/dsherret/code-block-writer/issues/15#issuecomment-379569992","issue_url":"https://api.github.com/repos/dsherret/code-block-writer/issues/15","id":379569992,"user":{"login":"dsherret","id":1609021,"avatar_url":"https://avatars0.githubusercontent.com/u/1609021?v=4","gravatar_id":"","url":"https://api.github.com/users/dsherret","html_url":"https://github.com/dsherret","followers_url":"https://api.github.com/users/dsherret/followers","following_url":"https://api.github.com/users/dsherret/following{/other_user}","gists_url":"https://api.github.com/users/dsherret/gists{/gist_id}","starred_url":"https://api.github.com/users/dsherret/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsherret/subscriptions","organizations_url":"https://api.github.com/users/dsherret/orgs","repos_url":"https://api.github.com/users/dsherret/repos","events_url":"https://api.github.com/users/dsherret/events{/privacy}","received_events_url":"https://api.github.com/users/dsherret/received_events","type":"User","site_admin":false},"created_at":"2018-04-08T18:10:43Z","updated_at":"2018-04-08T18:10:43Z","author_association":"OWNER","body":"@lazarljubenovic this one is good too!\r\n\r\nIf you'd like to submit a pull request then feel free, but if not then I'll get to it soon."}}
{"actor":{"display_login":"dsherret"}}