Lastor
[Coding] 我笑了,看到 FB Messenger API 某個屬性是要求 A or B 一定要有一個。我就在想 typescript 這該怎麼定義
Lastor
結果一 google,問的人也是在問 Messenger API
Typescript Interface - Possible to make "one or the ...
Lastor
話說寫 typescript 型別管理,是真的費事。我現在幾乎是 70% 的時間在搞型別定義,只有 30% 在寫主要邏輯
Lastor
可是 type 定義好,comment 寫好,之後就不用浪費時間寫說明文件了。一個先爽還是後爽的概念
載入新的回覆