有没有办法为CodeRunners Typescript编译器设置experimentalDecorators选项?
我用它做便笺簿 我正在尝试使用Typescript装饰程序 第一次尝试: 设置有没有办法为CodeRunners Typescript编译器设置experimentalDecorators选项?,typescript,decorator,coderunner,Typescript,Decorator,Coderunner,我用它做便笺簿 我正在尝试使用Typescript装饰程序 第一次尝试: 设置tsc--experimentalDecorators=true并获得: error TS5023: Unknown compiler option '--experimentalDecorators=true'. 第二次尝试: tsc--project~/tsconfig.json 但由于出现错误TS5042:“项目”选项不能与命令行上的源文件混合 以下是完整的编译脚本:\ outfile=`echo "
tsc--experimentalDecorators=true
并获得:
error TS5023: Unknown compiler option '--experimentalDecorators=true'.
第二次尝试:
tsc--project~/tsconfig.json
但由于出现错误TS5042:“项目”选项不能与命令行上的源文件混合代码>
以下是完整的编译脚本:\
outfile=`echo "$CR_FILENAME" | sed 's/\(.*\)\..*/\1/'`.js
output=$(/Users/me/.nvm/versions/node/v10.22.0/bin/tsc --outFile "$outfile" "$CR_FILENAME" "${@:1}")
status=$?
if [ $status -eq 0 ]; then
echo "$outfile"
elif [ $status -eq 127 ]; then
echo -e "\nCould not find TypeScript on your system. TypeScript is installed using npm. If you don't have npm installed, you can get it at https://www.npmjs.com/\nWith npm, you can install TypeScript with the following command:\n\nnpm install -g typescript"
else
>& 2 echo "$output"
fi
exit $status
它应该是tsc--experimentalDecorators
,=true
部分是冗余的