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

Doesn't work with Typescript ES6 import #365

Closed
bigomega opened this issue Mar 29, 2016 · 1 comment
Closed

Doesn't work with Typescript ES6 import #365

bigomega opened this issue Mar 29, 2016 · 1 comment

Comments

@bigomega
Copy link

import * as page form 'page'
page('/foo')
// Error: page is not a function

We should start sending default exports microsoft/TypeScript#3337

@matthewp
Copy link
Collaborator

@bigomega I'm not familiar with TypeScript, does this mean we need to add something like module.exports.default = page? If so I can take this one.

matthewp added a commit that referenced this issue Jan 13, 2018
TypeScript projects expect the module export to contain a `default`
property in order for imports to work:

```ts
import page from 'page';
```

This makes that work. In the future page.js will be an ES module so this
won't be necessary.

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

No branches or pull requests

2 participants