{"action":"closed","issue":{"url":"https://api.github.com/repos/dsherret/ts-simple-ast/issues/241","repository_url":"https://api.github.com/repos/dsherret/ts-simple-ast","labels_url":"https://api.github.com/repos/dsherret/ts-simple-ast/issues/241/labels{/name}","comments_url":"https://api.github.com/repos/dsherret/ts-simple-ast/issues/241/comments","events_url":"https://api.github.com/repos/dsherret/ts-simple-ast/issues/241/events","html_url":"https://github.com/dsherret/ts-simple-ast/issues/241","id":294709652,"number":241,"title":"Wrap UnionTypeNode","user":{"login":"kjpou1","id":640466,"avatar_url":"https://avatars2.githubusercontent.com/u/640466?v=4","gravatar_id":"","url":"https://api.github.com/users/kjpou1","html_url":"https://github.com/kjpou1","followers_url":"https://api.github.com/users/kjpou1/followers","following_url":"https://api.github.com/users/kjpou1/following{/other_user}","gists_url":"https://api.github.com/users/kjpou1/gists{/gist_id}","starred_url":"https://api.github.com/users/kjpou1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kjpou1/subscriptions","organizations_url":"https://api.github.com/users/kjpou1/orgs","repos_url":"https://api.github.com/users/kjpou1/repos","events_url":"https://api.github.com/users/kjpou1/events{/privacy}","received_events_url":"https://api.github.com/users/kjpou1/received_events","type":"User","site_admin":false},"labels":[{"id":589688728,"url":"https://api.github.com/repos/dsherret/ts-simple-ast/labels/navigation","name":"navigation","color":"5319e7","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-06T10:37:01Z","updated_at":"2018-02-07T00:42:47Z","closed_at":"2018-02-07T00:42:47Z","author_association":"NONE","body":"Would open up navigation without resorting to ts.UnionTypeNode <=> ts-simple-ast casting.\r\n\r\n- [ ] getTypeNodes\r\netc..\r\n\r\nJust a suggestion could be a couple of helper methods like `is` or `has` a `NullKeyword` and `UndefinedKeyword`.  \r\n\r\nexample with casting:\r\n\r\n```js\r\nfunction foo (node : sast.Node)\r\n{\r\n    const unionTypeNode = <ts.UnionTypeNode>node.compilerNode;\r\n    for (let i = 0, n = unionTypeNode.types.length; i < n; i++) {\r\n      const type = unionTypeNode.types[i];\r\n      console.log((<any>ts).SyntaxKind[type.kind]);\r\n    }\r\n}\r\n```\r\n\r\n"}}
{"actor":{"display_login":"dsherret"}}