generate type declaration file (.d.ts) on visual studio code
To compile typescipt use following command
1. Open command line
2. Go to current project
3 >"C:\Program FIles (x86)\Microsoft SDKs\Typescript\2.3\tsc" -d -p "./scripts/typings" -outDir "./scripts/typings/jaa"
Note
-d means Generates corresponding .d.ts file
-p means a directory path to a directory containing a tsconfig.json file
--outDir means Redirect output structure to the directory.
--------------------------------------------
tsconfig.json
{--------------------------------------------
"compilerOptions": {
"target":"es5",
"module":"commonjs",
"declaration":true,
"removeComments": true,
"strict": true
},
"include":[
"D:/xxx/xxx/xx/scripts/typings/**/*"
],
"files":[
"D:/xxx/xxx/xx/app/utility/yyy.ts",
"D:/xxx/xxx/xx/app/utility/zzz.ts"
]
}
Reference
[1] compiler option msbuild
[2] compiler options
Comments
Post a Comment