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