The command npm install -g typescript installs the package into the current project's node_modules directory and record…