When you target “es5” in TypeScript and use namespaces instead of import statements, the moment.d.ts delivered with v2.18.1 will not work for you.

You must comment the last row in the file: export = moment;

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.