{"action":"created","issue":{"url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/24180","repository_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped","labels_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/24180/labels{/name}","comments_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/24180/comments","events_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/24180/events","html_url":"https://github.com/DefinitelyTyped/DefinitelyTyped/issues/24180","id":303819253,"number":24180,"title":"Unable to instantiate XMLElementOrXMLNode in xmlbuilder ","user":{"login":"akshaychannabasaiah","id":5208203,"avatar_url":"https://avatars0.githubusercontent.com/u/5208203?v=4","gravatar_id":"","url":"https://api.github.com/users/akshaychannabasaiah","html_url":"https://github.com/akshaychannabasaiah","followers_url":"https://api.github.com/users/akshaychannabasaiah/followers","following_url":"https://api.github.com/users/akshaychannabasaiah/following{/other_user}","gists_url":"https://api.github.com/users/akshaychannabasaiah/gists{/gist_id}","starred_url":"https://api.github.com/users/akshaychannabasaiah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akshaychannabasaiah/subscriptions","organizations_url":"https://api.github.com/users/akshaychannabasaiah/orgs","repos_url":"https://api.github.com/users/akshaychannabasaiah/repos","events_url":"https://api.github.com/users/akshaychannabasaiah/events{/privacy}","received_events_url":"https://api.github.com/users/akshaychannabasaiah/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-09T12:02:35Z","updated_at":"2018-03-09T12:13:28Z","closed_at":null,"author_association":"NONE","body":"\r\n- [x] I tried using the `@types/xmlbuilder` package and had problems.\r\n- [x] I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript\r\n\r\n\r\n  - Authors: @wallymathieu \r\n\r\nIf you do not mention the authors the issue will be ignored.\r\n``` \r\nimport * as XMLBuilder from 'xmlbuilder';\r\nexport class someClass{\r\ntoXML(): XMLBuilder.XMLElementOrXMLNode {\r\n        var root = XMLBuilder.create('root')\r\n            .ele('xmlbuilder')\r\n            .ele('repo', { 'type': 'git' }, 'git://github.com/oozcitak/xmlbuilder-js.git')\r\n            .end({ pretty: true }); // This returns a string while it should return a XMLElementOrXMLNode object\r\n        var xml: XMLBuilder.XMLElementOrXMLNode = new XMLBuilder.XMLElementOrXMLNode();\r\n        xml.text(root);        \r\n        return xml;\r\n    }\r\n}\r\n```\r\nWhen I execute this code ablove, I get a `he.XMLElementOrXMLNode is not a constructor` error. There just seems to be no way to instantiate the XMLElementOrXMLNode object. "},"comment":{"url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/comments/371796724","html_url":"https://github.com/DefinitelyTyped/DefinitelyTyped/issues/24180#issuecomment-371796724","issue_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/24180","id":371796724,"user":{"login":"akshaychannabasaiah","id":5208203,"avatar_url":"https://avatars0.githubusercontent.com/u/5208203?v=4","gravatar_id":"","url":"https://api.github.com/users/akshaychannabasaiah","html_url":"https://github.com/akshaychannabasaiah","followers_url":"https://api.github.com/users/akshaychannabasaiah/followers","following_url":"https://api.github.com/users/akshaychannabasaiah/following{/other_user}","gists_url":"https://api.github.com/users/akshaychannabasaiah/gists{/gist_id}","starred_url":"https://api.github.com/users/akshaychannabasaiah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akshaychannabasaiah/subscriptions","organizations_url":"https://api.github.com/users/akshaychannabasaiah/orgs","repos_url":"https://api.github.com/users/akshaychannabasaiah/repos","events_url":"https://api.github.com/users/akshaychannabasaiah/events{/privacy}","received_events_url":"https://api.github.com/users/akshaychannabasaiah/received_events","type":"User","site_admin":false},"created_at":"2018-03-09T12:13:28Z","updated_at":"2018-03-09T12:13:28Z","author_association":"NONE","body":"I am only beginning with TypeScript. I am not sure how to proceed. But I sure will try it out this weekend. Thanks!"}}
{"actor":{"display_login":"akshaychannabasaiah"}}