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

Enable es6 imports when using typescript #363

Merged
merged 2 commits into from
Jul 23, 2018

Conversation

aralisza
Copy link
Contributor

@aralisza aralisza commented Jul 9, 2018

In the .d.ts file, numbro is being exported using export = numbro. In the PR that made this change, it says this is the only way to use it in typescript #232 , and it proposes to use

import * as numbro from "numbro"

to import. However, in newer versions, this now causes default to be imported as a .default member instead. Now, the only way of importing numbro properly is

import numbro = require("numbro");

This change enables using es6 syntax to import

import numbro from "numbro";

#352 explains the change in further detail.

@BenjaminVanRyseghem
Copy link
Owner

Thanks for your contribution 😄

could you add yourself in the AUTHORS file please 😄 ?

I'll merge this PR right after that

@aralisza
Copy link
Contributor Author

@BenjaminVanRyseghem Is ths PR ok to merge now?

@BenjaminVanRyseghem
Copy link
Owner

Thanks for your contribution 😄

@BenjaminVanRyseghem BenjaminVanRyseghem merged commit bbeb182 into BenjaminVanRyseghem:develop Jul 23, 2018
@BenjaminVanRyseghem
Copy link
Owner

in v2.1.1

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