Lightly spoon flour into measuring cup; level with a knife. Combine flour, sugar, cocoa, and salt; stir with a whisk. Place butter in a large bowl, and beat with a mixer at medium speed until light and fluffy (about 2 minutes). Stir egg yolks with a whisk, adding, espresso if desired. Add the yolk mixture and vanilla to butter; beat well. Add flour mixture to butter mixture; beat at low speed just until combined.