I want to add typescript to my Ubuntu and there are two methods for that:
- sudo apt update && sudo apt install node-typescript -y
- sudo npm install -g typescript
My question is more than just typescript, I want to know whether there is a benefit in any of those ways. Probably the native packages are not the very latest version so npm wins, or on the other hand, apt may prepare more control on update or maintenance. How can these 2 approaches be compared?