THE WORD YOU WERE MISSING
Sometimes the gap in AI coding is that you don't know what the keyword is called — so you can't even ask the AI correctly. Search and filter the dictionary below. Definitions and examples are in Traditional Chinese; the interactive AI finder is on the Chinese page.
Term dictionary
Search English terms, Chinese names, symptoms or tags. Definitions and examples are in Traditional Chinese.
6 matching terms
Reset filters我有一種資料會有好幾種「狀態」或「種類」(例如載入中/成功/失敗,或圓形/方形),每種帶的欄位都不一樣。我想用一個共同的標記欄位來區分,這樣 TypeScript 在 switch 裡就能自動知道每個分支該有哪些欄位、不要讓我亂存取不存在的欄位。
Read definition (繁中) →
我的 React 網頁只要有一個小元件出錯(比如某筆資料是 null 害它爆掉),整個頁面就變一片白屏、什麼都不見了。我想讓出錯的那一塊改顯示「這裡載入失敗」之類的提示,其他正常部分繼續顯示,不要整頁掛掉。
Read definition (繁中) →
我的程式拿到爛資料或缺參數時不會馬上報錯,而是默默繼續跑,結果錯誤到很後面才爆出來,根本看不出真正的原因在哪。我想讓它一發現不對勁就立刻清楚地報錯停下來、好抓問題。
Read definition (繁中) →
我的權限檢查或某個外部服務(驗證、付款、風控)如果掛掉或逾時,我不知道該讓使用者「照樣通過」還是「直接擋下來」。萬一寫錯邊,可能變成出錯時誰都進得來、或出錯時全部人都被鎖在外面。
Read definition (繁中) →
我的函式裡 if 包 if 包 if 巢狀好幾層、縮排深到看不懂,主要邏輯被埋在最裡面。我想先把「不符合條件就直接擋掉返回」的狀況寫在開頭,讓正常流程攤平、不要那麼多層巢狀。
Read definition (繁中) →
我有個變數可能是好幾種型別(字串、null、物件…),我想先檢查它「到底是哪一種」,檢查完之後 TypeScript 就會自動知道它是那一種、讓我安全地用它的屬性,不要再一直紅字說「可能是 undefined」。
Read definition (繁中) →