0

I ran these commands:

npm install tsd -g
tsd install moment --save

it is also injecting into my module but when i am accessing it it is not recognizing moment.

eg.

import * as moment from 'moment';

Could you please help me out.

phts
  • 3,889
  • 1
  • 19
  • 31
Lovepreet Singh
  • 73
  • 2
  • 10

1 Answers1

0

Try this .

npm install @types/moment --save-dev

It is best to install the typescript definition files as developer dependencies

Then import like this

import * as moment from "moment"
Edwin Kato
  • 543
  • 3
  • 11