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

Update type definition #10

Merged
merged 1 commit into from
Feb 7, 2017

Conversation

theladyjaye
Copy link
Contributor

No description provided.

@jennasalau jennasalau changed the base branch from master to develop February 7, 2017 07:32
@jennasalau jennasalau merged commit f741fc0 into DeloitteAU:develop Feb 7, 2017
@theladyjaye
Copy link
Contributor Author

theladyjaye commented Feb 7, 2017

@jennasalau I apologize for not being more clear, I think what I said led you astray on your README update. Completely my fault.

Prior to this pull request, you would have needed to go though ReactHabitat.default because of that Babel thing. Specifically this line in the compiled output:

https://github.com/DeloitteDigitalAPAC/react-habitat/blob/master/lib/index.js#L24

module.exports = exports['default'];

For TypeScript that is the offending line. With the type definition update in this PR that is no longer required. The user can:

import * as ReactHabitat from 'react-habitat';

And TypeScript gets what we mean.

Again I apologize, it's a strange issue to be sure and it's purely a TypeScript thing made even more esoteric that it's a TypeScript thing ONLY when the code is compiled by Babel with a certain export style. hahahahaha... Hooray for interop between 2 transpiled things!

@jennasalau
Copy link
Contributor

jennasalau commented Feb 7, 2017

Ahh lol okay thanks for clearing that up.. do you think its worth noting that pattern of TypeScript import in the docs?

I think we inadvertently introduced this bug resolving #4

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