一個函式有輸入和輸出,要在TypeScript 中對其進行約束,需要把輸入和輸出都考慮到,其中函式宣告的型別定義較簡單:. 1. function sum(x: number, y: number): number ...
確定! 回上一頁