Closed chrisj-skinner closed 7 years ago
Sorry, I have never used Angular 4 or Typescript so I don't know what this error means. I don't think this is a problem with the code in this repo so I will close this issue.
It's not an issue with the code in the app but with the method of importing the app using import
- do you have a suggested solution?
@ https://codebox.org.uk/pages/moment-date-range-plugin you give node'js require('moment-precise-range-plugin');
- what I'm asking is how the app can be required using Typescript (ES6).
Using import { moment } from 'moment-precise-range-plugin';
fails - how would I use this app with ES6?
I get the following typescript error when trying to import the plugin into angular 4 using Typescript
import { moment } from 'moment-precise-range-plugin';
Error:
Could not find a declaration file for module 'moment-precise-range-plugin'. 'c:/Users/[UserName]/app/node_modules/moment-precise-range-plugin/moment-precise-range.js' implicitly has an 'any' type. Try npm install @types/moment-precise-range-plugin if it exists or add a new declaration (.d.ts) file containing declare module 'moment-precise-range-plugin';'
Is this the correct way?