1,在配置文件中,提示錯誤“Invalid escape character in string.jsonc(261)”
在setting.json中配置git路徑時,新增鍵值對"git.path":"D:\Git\cmd\git.exe"之后,會提示這個錯誤,這是由於字符串解析的轉義導致。
解決此問題,可以嘗試換用下寫法:
"git.path":"D:/Git/cmd/git.exe"//方法一
"git.path":"D:\\Git\\cmd\\git.exe"//方法二
——擴展:
關於斜杠和反斜杠的淵源:
https://baike.baidu.com/item/%E6%96%9C%E6%9D%A0/863387?fromtitle=%E6%AD%A3%E6%96%9C%E6%9D%A0&fromid=863308;
2,編輯了一個TypeScript文件,使用tsc編譯的時候,發現編譯好的文件放在了和源文件的同一個目錄下,這很別扭。可以在tsconfig.ison修改,來自定義編譯輸出路徑
1 "outDir": "../dist", /* Redirect output structure to the directory. */ 2 "rootDir": "../src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */