Preheat oven to 350F (180C). Line a square or rectangular baking dish with parchment paper (8" x 13", or you can use a square 10" x 10" or 9" x 9" pan).
Melt the butter and the two types of sugar together in a small pot on the stove until combined and the sugar has mostly dissolved. Let it cool until it's no longer burning hot, about 15 minutes.
In the meantime, chop up the chocolate and walnuts (if needed).
Add the eggs and vanilla to the butter and sugar, whisking together for about a minute.
Combine dry ingredients – flour and salt – in a separate mixing bowl. Add dry ingredients into the wet, folding together with a spatula until there are no dry spots left.
Set aside a small handful of chocolate and walnuts to sprinkle over the top, then fold the rest of the add-ins into the batter until evenly distributed.
Add batter to the pan, spreading evenly, then sprinkle over the reserved chocolate and walnuts.
Bake for 15-25 minutes (this is a wide range because ovens can vary a lot and it depends on the pan that you're using – start checking them at 15 minutes) until the edges are golden brown and the middle is just set. You can check this by poking a knife into the center – if it comes out with no raw batter sticking to it, it's ready. However, it shouldn't be completely clean like when you bake a cake, since you still want a fudgy middle.
Let cool to room temperature, then slice and enjoy!