結果 : typescript define type inside function