javascript - correct ES6 import for adding moment precise range plugin -


i'm using typescript within angular 4 project , want use moment-precise-range-plugin.

i've installed moment following https://momentjs.com/docs/#/use-it/typescript/ want add preciserange plugin http://momentjs.com/docs/#/plugins/preciserange/.

install node.js preciserange plugin @ https://codebox.org.uk/pages/moment-date-range-plugin , specifies require('moment-precise-range-plugin'); there no typescript install.

i've tried import { moment } 'moment-precise-range-plugin'; following typescript error

could not find declaration file module 'moment-precise-range-plugin'. 'c:/users/[username]/app/node_modules/moment-precise-range-plugin/moment-precise-range.js' implicitly has 'any' type. try npm install @types/moment-precise-range-plugin if exists or add new declaration (.d.ts) file containing declare module 'moment-precise-range-plugin';'

any ideas welcome!


Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -