In a medium bowl, whisk together the flour, cocoa powder, salt, baking powder, and espresso powder (if using).
In a large bowl, cream the butter, granulated sugar, and brown sugar until light and fluffy (about 2-3 minutes).
Add the egg and vanilla extract, and mix until fully incorporated.
Gradually mix in the dry ingredients until a soft dough forms.
Divide the dough into two discs, wrap in plastic wrap, and refrigerate for at least 1 hour (or up to 24 hours).