Preheat the oven to 350°F (175°C). Line a 9 x 5-inch loaf pan with parchment paper or lightly grease it.
Add the softened butter and brown sugar to a large mixing bowl and beat until creamy.
Mash the ripe bananas and add them to the butter mixture.
Add the egg and vanilla extract and mix until combined.
In a separate bowl, whisk together the flour, baking powder, baking soda, and salt.
Add the dry ingredients to the wet ingredients and fold gently until just combined.
Fold in most of the dark chocolate chips, reserving some for the top.
Add chopped walnuts if using.
Transfer the batter to the prepared loaf pan and smooth the top.
Sprinkle the reserved chocolate chips over the batter.
Bake for 55 to 65 minutes, or until a toothpick inserted into the center comes out with a few moist crumbs and no wet batter.
If the top browns too quickly, loosely cover it with foil.
Let the loaf cool in the pan for 10 to 15 minutes.
Transfer to a wire rack and cool before slicing.