1To make the cookie dough, beat the butter and sugar with an electric mixer until pale and light; beat in the egg and vanilla. Add the flour and salt and beat on low speed or stir by hand just until the dough comes together.
2Gather the dough up into a ball, cut it in half and on a lightly floured surface, roll it out to about 1/8-1/4-inch thick. Cut into 2 1/2-3 inch circles with a cookie cutter or glass rim.
3Preheat the oven to 350F. Drop a small spoonful of filling into the middle of each cookie and fold over the sides to enclose it, forming a triangle. Pinch the corners to seal, if you like, or make each fold go underneath the other layer of dough on one end, and overtop on the other. Fill them on a parchment-lined sheet or on the countertop and transfer to a parchment-lined sheet, and bake for 12-14 minutes, until pale golden. Transfer to a wire rack to cool. If you like, sprinkle them with icing sugar. Makes about 2 dozen hamantaschen.