Place the chocolate and half the milk in a pan and heat, stirring, until the chocolate has melted. Dissolve the cornstarch in the remaining milk and whisk into the chocolate with the sugar and vanilla extract. Cook on low heat, whisking constantly, until the chocolate is thickened, about five minutes. Add extra cornstarch if it doesn't start to thicken after 5 minutes. Remove and whisk smooth.