Heat the milk in a saucepan until steaming.
In a bowl, whisk together the egg yolks, sugar and cornflour until smooth.
Gradually pour the hot milk into the egg mixture, whisking continuously.
Return the mixture to the saucepan.
Cook over a medium heat, whisking constantly, until thickened.
Remove from the heat and stir in the vanilla.
Transfer to a bowl, cover the surface directly with clingfilm and chill until needed.