Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typescript/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
有没有办法为CodeRunners Typescript编译器设置experimentalDecorators选项?_Typescript_Decorator_Coderunner - Fatal编程技术网

有没有办法为CodeRunners Typescript编译器设置experimentalDecorators选项?

有没有办法为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 "

我用它做便笺簿

我正在尝试使用Typescript装饰程序

第一次尝试:

设置
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
部分是冗余的