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

@BenjaminVanRyseghem BenjaminVanRyseghem commented Jul 9, 2018

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

@aralisza aralisza commented Jul 22, 2018

@BenjaminVanRyseghem Is ths PR ok to merge now?

@BenjaminVanRyseghem
Copy link
Owner

@BenjaminVanRyseghem BenjaminVanRyseghem commented Jul 23, 2018

Thanks for your contribution 😄

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

@BenjaminVanRyseghem BenjaminVanRyseghem commented Oct 17, 2018

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
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants