我使用 VS Code,我希望我用 Typescript 語言寫的幾行注釋如下(注意星號)
/**
*@desc any text
* any text
*/
但是當我寫評論并按下回車時,不會為下一行自動創建一個星號
/**
*@desc any text
any text
*/
到目前為止,我已經在這個日期測驗了以下擴展,但它們并沒有解決這個問題
- 自動評論塊
- 評論片段
- 更好的評論
- TSDoc 評論
uj5u.com熱心網友回復:
如果您在星號后放置一個空格,它(對我來說)有效,無論如何這是常見的做法:
/**
* @desc any text<Enter>
*
^^ This star and space inserted automatically.
uj5u.com熱心網友回復:
查看 VS Code 的首選項并激活 JSDOC
uj5u.com熱心網友回復:
我安裝了 JavaScript Comment Snippet (Visual Studio Code) 擴展并且我做了以下步驟
Ctrl Shift P / ? ? P → 首選項:打開設定 (JSON)
我在 JSON 檔案中設定了以下專案。
"editor.quickSuggestions": {
"other": true,
"comments": true,
"strings": false
},
我重新啟動了 Visual Studio Code。
現在在你的 ts 檔案中你需要寫 ///
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/517335.html
