函式型別與參數 (Function Types and Parameters)
在 TypeScript 中,函式的定義與 JavaScript 非常類似,可以...
物件導向經常談到封裝,然而,封裝的對象或意圖其實是多元的,也許是想隱藏狀態、不曝露實作、遮蔽資料的結構、管理物件複雜的生命週期、隔離物件間的相依關係等,大部分情...
第11關:Includes
關卡簡介
Implement the JavaScript Array.includes function in the type...
第9關:If
關卡簡介
Implement the util type If<C, T, F> which accepts condition C...
第15關:Omit
關卡簡介
Implement the built-in Omit<T, K> generic without using it...
在開發前端應用時,我們經常需要使用第三方庫。然而,並不是所有的 JavaScript 第三方庫都自帶 TypeScript 的型別定義,所以我們需要瞭解如何為這...