jamesplease / moment-business

Utilities for work days in Moment. (Western workweeks only.)
MIT License
100 stars 27 forks source link

How to use with TypeScript? #50

Closed iwhp closed 7 years ago

iwhp commented 7 years ago

I would like to use moment-business with TypeScript. Is there a d.ts available? Thankx, Harry

jamesplease commented 7 years ago

There is not one available. I don't use TS, but i'd accept PR to add support.

michaelstievenart commented 7 years ago

Support in Typescript would be great!

wonbyte commented 7 years ago

@iwhp you can just do const buisness = require("moment-business"); in your .ts file for now.

wonbyte commented 7 years ago

@iwhp @jmeas I've added the types to the definitely typed project. You should be set. https://github.com/DefinitelyTyped/DefinitelyTyped/pull/15271

jamesplease commented 7 years ago

@wonbyte , thank you so much! I definitely want folks to be able to use this with TypeScript, but I don't use it myself so it'd be tough for me to maintain that. I appreciate you taking the time to make the PR there.

I'm going to close this issue out. I'll also add a note to the README linking to that repo.

wonbyte commented 7 years ago

@jmeas Glad to help. Big thanks to you for moment-business. It's a fantastic library