In a medium saucepan, whisk together the granulated sugar, cocoa powder, cornstarch, and kosher salt.
Slowly whisk in the whole milk until the mixture is smooth.
Place the saucepan over medium heat, continuously stirring with a whisk to prevent sticking.
Lightly beat the egg yolks in a separate bowl, then temper them with a small amount of the hot mixture.
Pour the tempered egg yolk mixture back into the saucepan and cook for 2-3 more minutes until thickened.
Remove from heat and stir in the chopped semisweet chocolate and vanilla extract until smooth.
Pour into serving dishes and refrigerate for at least 2 hours before serving.