Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance typescript #1

Merged
merged 3 commits into from
Jul 11, 2016
Merged

Enhance typescript #1

merged 3 commits into from
Jul 11, 2016

Conversation

SergioMorchon
Copy link

No description provided.

@@ -124,4 +100,31 @@ const xmlQuery = (ast: XmlNode|XmlNode[]) => {
};
};

namespace xmlQuery {

export interface XmlNode {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to do this because these types were used in the xmlQuery input, so need to be exported too.
And there are 2 ways to achieve this:

  • Use ES6 style of export: export interfaces, and export default xmlQuery.
  • Export only the xmlQuery to conform the CommonJS style, but "attaching" the interface types to it, so those will be exported too under a "namespace" (with any JS effect, only for TS).

@pladaria pladaria merged commit f9e1ba2 into pladaria:master Jul 11, 2016
@pladaria
Copy link
Owner

Merged! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants