結果 : typescript create object based on generic type