結果 : typescript infer type from array of objects