In a heatproof jug (or other heatproof mixing bowl), whisk together the sugar, cornstarch, egg, yolks and cocoa powder. Once well whisked into a smooth paste, set aside.
Meanwhile, place the milk and vanilla in a saucepan and heat over a medium temperature until simmering, stirring occasionally. Allow to simmer for about 2 minutes to ensure the milk is warmed thoroughly.
Carefully and slowly pour the hot milk into the egg mixture whilst whisking the egg mixture continuously.
Once the milk is fully incorporated, pour the whole mixture back into the saucepan and return to the heat, stirring continuously.
Cook this over a medium heat, stirring continuously until the custard thickens (see note).
Once thickened, remove from the heat and add the chocolate chips. Whisk these into the custard until smooth.
Pour the mixture into a clean heatproof bowl and cover with plastic wrap - placing the plastic wrap directly onto the surface of the custard to prevent a skin forming.
Allow this to cool and then place in the refrigerator to chill for a couple of hours before using.