In a mixer bowl fitted with the paddle attachment, beat butter, powdered sugar, brown sugar, and salt on medium speed for 4 minutes until creamy. Mix in vanilla extract. Add flour and beat on low-medium speed just until combined. Mix in the chocolate chunks just until incorporated. Do not over mix the dough.
Divide dough in half. Place each half on parchment paper or plastic wrap and, using your hands, shape it into a log that is 1.5 inches (4cm) in diameter. Roll up the paper and wrap it like candy. Don’t worry if the shape isn’t perfect. Refrigerate for at least 2 hours until firm (dough can be left in the refrigerator for up to 3 days).
Preheat oven to 350°F/180°C. Line 2 pans with parchment paper.
After chilling, brush the outside of the logs with the beaten egg, and roll in the demerara or granulated sugar.
Use a sharp knife to slice the logs into 1/3-inch thick rounds (about 1cm). If the dough is too crumbly and breaks, or if you hit a chocolate chunk, cut gently back and forth, or leave it for a few minutes to soften and squeeze any broken bits back into each cookie. Arrange cookies on prepared baking sheets, placing them 1 inch apart. Sprinkle with flakey salt, if desired.
Bake for about 15 minutes until just slightly golden brown around the edges. It’s ok if the cookies appear soft and bright. Allow cookies to cool on a wire rack.
Store cookies at room temperature in an airtight container for up to 5 days or in the fridge for up to 1 week, bringing to room temperature before serving. Cookies can also be frozen for up to 2 months.