Whisk white sugar, brown sugar, flour, and cocoa to break up any clumps and combine. Whisk in milk and salt.
1 cup granulated sugar, 1 cup light brown sugar, ⅔ cup all-purpose flour, 4 tbsp Dutch-process cocoa powder, 4 cups whole milk, ¼ tsp kosher salt
Set on medium-high heat, whisking occasionally. Whisk until the mixture becomes thick, 8-10 minutes. Whisk in egg yolks, stirring constantly. Continue to stir until the pudding becomes very thick and just begins to bubble, 2-4 minutes.
5 egg yolks
Remove from heat and add butter, chocolate chips, espresso powder, and vanilla extract. Stir until the chips are melted and the pudding is smooth.
4 tbsp unsalted butter, ½ cup semi-sweet chocolate chips, 1 tsp espresso powder, 2 tsp vanilla extract
Before chilling, place a piece of plastic wrap directly on pudding to prevent a "skin" from forming. Chill completely.