In a medium-sized bowl, whisk together the flour, cocoa powder, cornstarch, baking soda & salt. Set aside
In a large bowl, beat together the butter, brown sugar and granulated sugar until combined.
Beat in the egg and vanilla extract.
With the mixer on a low speed, beat the flour mixture into the butter mixture about ½ at a time until combined.
Turn off the mixer and stir in the chocolate chips and M&Ms.
Cover the bowl with plastic and refrigerate for at least 2 hours, or up to 48 hours.
When ready to bake, preheat the oven to 350F (180C) degrees and line 2 cookie sheets with parchment paper or silicone baking mats. If the cookie dough was in the fridge overnight, take it out of the fridge and place the bowl on the counter for 5-15 minutes to let the dough warm up slightly.
For large cookies, form the dough into balls with about 3 tablespoons of dough each and place 2-3 inches apart on the cookie sheets. For smaller cookies, form the dough into balls with about 1 to 1.5 tablespoons of dough each and place 2 inches apart on the cookie sheet.
Bake cookies 1 sheet at a time in the middle of the preheated oven. Large cookies will take about 12-14 minutes, and smaller cookies will need about 9-11 minutes. Take the cookies out of the oven when the tops look just set.
Cool cookies on the cookie sheets for at least 10 minutes, then transfer to a cooling rack. Optionally, place a few extra chocolate chips or M&Ms on top of each cookie.