結果 : typescript define type with function