Preheat the oven to 375°F (190°C).
Roast or boil the sweet potatoes until completely tender, then peel and mash.
Mix the potatoes with brown sugar, butter, milk, eggs, vanilla, cinnamon, and salt.
Spread the mixture into a greased 9×13-inch baking dish.
Combine the topping sugar and flour.
Cut in the butter, then stir through the pecans.
Sprinkle the topping evenly over the sweet potatoes.
Bake for 25–30 minutes until hot and lightly browned.