the compiled js files are not moving into the specified folder
βes6β isnβt a valid target, look at the list of possible targets in the comment right next to it. βes6β isnβt a thing in JS, itβs es2015, es2016, etc. βes6β was the original name and is something that still gets used when people write about it (because the previous version was es5), but it isnβt an actual version.
Also, no root dir specified (although it will default to src). Difficult to tell much else without seeing folder structure
fixed the βes6β to ES2015
changed the ts config
what is the possible problem now ?
file structure
E:\GitHub\typescript>tree
Folder PATH listing for volume data
Volume serial number is B4F6-55A7
E:.
ββββjs
modified config
"outDir": "./js"
"rootDir": "./"
compiling using
tsc <file_name>.ts
should be like:
my project/
ββββ src/
ββββ someFile.ts
ββββ anotherFile.ts
ββββ indexFile.ts
ββββ tsconfig.json
ββββ package.json
Then just run tsc
, rootDir should be src/
, outDir should be specified, normally would be [conventionally] lib/
or dist/
I get it,In this case all the files are compiled and then we run then I have a different requirement like I want to run single file at once and thaαΉ file should be saved into the js folder
So youβve installed Typescript globally?
tsc my-file.ts --outDir ./js
yes, great it work !!
why I could not find it on internet