13

When i'm running any of these commands in git bash windows

tsd query angular-material

tsd query angular

tsd install angular angular-material

every time i'm getting this message " >> zero results "

Community
  • 1
  • 1
Amit Singh
  • 1,790
  • 3
  • 17
  • 27

3 Answers3

19

tsd is deprecated (you can see it here). The following steps helped me install the type definitions.

In the application folder

  1. Delete typings folder (if it exists)
  2. Run the following commands

    npm init

    npm install --save @types/angular

    npm install --save @types/jquery

    npm install --save @types/lodash

nik
  • 2,455
  • 21
  • 26
  • Hello Nikhil, how could I use jquery script in ngAfterViewInit hook? TIA – Neph Mar 23 '17 at 23:04
  • If you are looking for intellisense this is the way : http://stackoverflow.com/a/40355691/2847061 – nik Mar 24 '17 at 04:25
  • Otherwise just add the jquery script to index.html and declare $ as any in you component class. Check this plunker : https://embed.plnkr.co/3nRhMXdRNmgduuKSd6fv/ – nik Mar 24 '17 at 04:32
  • Awesome, that worked. Thanks @Nikhil !(the first one) – Neph Mar 24 '17 at 15:45
12

I'm new to type script and I'm having the same issue as you are having now. It seems tsd is out dated and you need to use typings.

npm install typings --global

It seems tsd is out dated and you need to use typings.

typings install dt~angular --global
Azadeh Khojandi
  • 3,806
  • 1
  • 30
  • 32
  • typings is deprecated too. Use the solution by Nikhil Nambiar - https://stackoverflow.com/a/42977233/85963 – Pradeep Feb 25 '18 at 21:25
1

replace the code with npm install --save @types/angular or npm install --save @types/jquery or npm install --save @types/angular-material

Thats it... Yor are done..!