I\'m trying to learn Typescript. While I don\'t think it\'s relevant, I\'m using VSCode for this demo.
I have a package.json
that has these pieces in it
Update
Apparently, moment now provides its own type definitions (according to sivabudh at least from 2.14.1 upwards), thus you do not need typings
or @types
at all.
import * as moment from 'moment'
should load the type definitions provided with the npm package.
That said however, as said in moment/pull/3319#issuecomment-263752265 the moment team seems to have some issues in maintaining those definitions (they are still searching someone who maintains them).
You need to install moment
typings without the --ambient
flag.
Then include it using import * as moment from 'moment'