Set typescript User Env variables --- have to set tsc Path? I set but tsc Not work -- needed restart?

set typescript User Env variables — have to set tsc Path? I set but tsc Not work – needed restart???

yyyyy@PC8 MINGW64 /f/htdocs_xampp/Mastering-Typescript-3e-3-and-Udemy/Mastering-TypeScript-3/9781789536706_Code/Chapter04
$ npm install -g typescript
C:\Users\yyyyy\AppData\Roaming\npm\tsc -> C:\Users\yyyyyy\AppData\Roaming\npm\node_modules\typescript\bin\tsc
C:\Users\yyyyyy\AppData\Roaming\npm\tsserver -> C:\Users\yyyyyy\AppData\Roaming\npm\node_modules\typescript\bin\tsserver

  • typescript@3.9.5
    updated 1 package in 12.602s

yyyyy@PC8 MINGW64 /f/htdocs_xampp/Mastering-Typescript-3e-3-and-Udemy/Mastering-TypeScript-3/9781789536706_Code/Chapter04
$ tsc --version
bash: tsc: command not found

yyyyy@PC8 MINGW64 /f/htdocs_xampp/Mastering-Typescript-3e-3-and-Udemy/Mastering-TypeScript-3/9781789536706_Code/Chapter04
$ C:/Users/yyyyyy/AppData/Roaming/npm/tsc decorators1.ts
decorators1.ts:6:7 - error TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the ‘experimentalDecorators’ option in your ‘tsconfig’ or ‘jsconfig’ to remove this warning.

6 class ClassWithSimpleDecorator {
~~~~~~~~~~~~~~~~~~~~~~~~

Found 1 error.

yyyy@PC8 MINGW64 /f/htdocs_xampp/Mastering-Typescript-3e-3-and-Udemy/Mastering-TypeScript-3/9781789536706_Code/Chapter04
$ C:/Users/yyyyy/AppData/Roaming/npm/tsc --version
Version 3.9.5

yyyy@PC8 MINGW64 /f/htdocs_xampp/Mastering-Typescript-3e-3-and-Udemy/Mastering-TypeScript-3/9781789536706_Code/Chapter04
yyy@PC8 MINGW64 /f/htdocs_xampp/Mastering-Typescript-3e-3-and-Udemy/Mastering-TypeScript-3/9781789536706_Code/Chapter04 tsc --version
bash: tsc: command not found

seems fixed
restarted PC

running OK with tsc yyy.ts
TypeScript files can run and appear the result with one command??
js files compiled from ts, run with:
npm run yyy.js ?

$ tsc decorators1.ts
decorators1.ts:6:7 - error TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the ‘experimentalDecorators’ option in your ‘tsconfig’ or ‘jsconfig’ to remove this warning.

6 class ClassWithSimpleDecorator {
~~~~~~~~~~~~~~~~~~~~~~~~

Found 1 error.

yyyy@PC8 MINGW64 /f/htdocs_xampp/Mastering-Typescript-3e-3-and-Udemy/Mastering-TypeScript-3/9781789536706_Code/Chapter04
$ npm run decorators1.js
npm ERR! missing script: decorators1.js

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\lwdls\AppData\Roaming\npm-cache_logs\2020-06-14T17_02_22_682Z-debug.log

yyyyPC8 MINGW64 /f/htdocs_xampp/Mastering-Typescript-3e-3-and-Udemy/Mastering-TypeScript-3/9781789536706_Code/Chapter04
$