If you have time, lightly salt the duck legs a day or two before cooking, scatter with some of the thyme sprigs, then cover and chill until needed. (If you don’t have the time, this is not an essential step.) Heat the oven to 160C/140C fan/gas 3. Heat a little oil in a shallow flameproof casserole or roasting tin. If the duck legs have been salted in advance, pat them dry with kitchen paper. Sizzle the legs in the tin or casserole, skin-side down, until golden brown and the fat has rendered out. Turn and cook for 10-15 mins to brown them all over.
Remove the duck legs to a plate and pour away half the fat from the casserole or tin (you can save this for roasties). Return it to the heat and fry the carrots, garlic and thyme along with some seasoning for 5 mins until the carrots are starting to soften. Sit the duck legs on top, skin-side up, then pour about 100ml water over the veg. Bring to a simmer, cover and transfer to the oven to cook for 1 hr 30 mins.
Remove the casserole from the oven and uncover. Turn the oven up to 200C/180C/gas 6. Lift the duck out onto a plate and stir the beans through the carrots and thyme. Sit the duck back on top, then return to the oven, uncovered, to cook for another 20-30 mins until the duck skin is crisp and the beans are simmering. Remove from the oven and leave to rest for 10 mins, then serve straight from the dish.