Skip to content
This repository has been archived by the owner on Sep 15, 2023. It is now read-only.

Typescript support? #28

Open
magnattic opened this issue Apr 3, 2017 · 3 comments
Open

Typescript support? #28

magnattic opened this issue Apr 3, 2017 · 3 comments

Comments

@magnattic
Copy link

I have an Angular2 typescript application (with Angular CLI as build tool).

Can I use frozen-moment? How would I import it? Are there typings available?

@butterflyhug
Copy link
Contributor

Sorry for the slow response. I'm not aware of any reasons why this would break Typescript, but I don't use Typescript myself so I haven't written any typings or explicit support. I'd accept a PR to add ES6 module packaging for use with Typescript; otherwise I think you'd be stuck using a tool to translate the AMD export to ES6 and/or just use the global moment variable. If you have other suggestions, I'd be happy to hear them and/or review PRs.

@Lekha30
Copy link

Lekha30 commented Oct 2, 2018

Hey there, I guess, Typescript requires the typings for the module to be used. It would be great if you could add the typings, otherwise a pre-frozen moment workaround of using moment.clone() will do

@butterflyhug
Copy link
Contributor

PRs remain welcome. 😀 I still don’t use Typescript so I’m not in a good position to implement this myself — if I did it would be utterly untested, and therefore likely broken.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants