How to know which typescript version running on angular 4 project

后端 未结 7 669
梦谈多话
梦谈多话 2020-12-25 11:00

So i did ng -v it shows me everything except typescript, so how can i check Typescript version of my angular 4 project.

7条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-25 11:25

    Simple answer using yarn (since other answer were using npm)

    This will list the dependencies using yarn then filter only typescript

    yarn list --pattern typescript
    

    Or you can simply check the content of yarn.lock file (equivalent of package-lock.json)

    grep "typescript" yarn.lock
    

提交回复
热议问题