結果 : typescript infer return type based on parameter