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

Error using library with TypeScript 2.2.2 #127

Closed
fiznool opened this issue May 4, 2017 · 1 comment
Closed

Error using library with TypeScript 2.2.2 #127

fiznool opened this issue May 4, 2017 · 1 comment

Comments

@fiznool
Copy link
Contributor

fiznool commented May 4, 2017

When using the code snippet:

new timeago().format(somedate)

I get a Typecript error:

Only a void function can be called with the 'new' keyword.

I'm using timeago.js v3.0.1, here is a screenshot of my usage.

screen shot 2017-05-04 at 11 22 10

@fiznool
Copy link
Contributor Author

fiznool commented May 4, 2017

Oh, I see that the instructions on the documentation site are out of date, I was using new timeago() but it should just be timeago(). I'll open a separate issue to get the docs updated.

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

No branches or pull requests

1 participant