Bloggify/github-calendar

TypeScript support

Closed this issue · 1 comments

I think this project will be more awesome if it supports TypeScript. Actually, I wrote a type declaration file already, but I faced a little problem.

  1. A new keyword can't use for function, so GitHubCalendar function must be called like GithubCalendar(...) not new GitHubCalendar(...).
  2. If the function is declared as a class, the constructor can't return value, so GitHubCalendar(...) can't return the promise.

What do you think about this issue?

The new keyword is not required. Simply calling GitHubCalendar(...) should work.