Preheat oven to 350°F (175°C). Grease or line a 9×13-inch pan. Melt butter and chocolate together until smooth and cool slightly.
Whisk granulated sugar, brown sugar, eggs, and vanilla until thick and glossy. Slowly whisk in melted chocolate mixture.
Sift flour, cocoa powder, and salt together. Gently fold into batter. Pour into pan and bake 25–30 minutes until edges are set and center has moist crumbs. Cool completely.
In a saucepan over medium heat, whisk evaporated milk, sugar, egg yolks, and butter. Cook, stirring constantly, until thickened, about 8–10 minutes.
Remove from heat and stir in vanilla, shredded coconut, and toasted pecans. Cool slightly until spreadable.
Spread topping evenly over cooled brownies. Chill for 30 minutes to set.
Cut into squares using a warm knife. Serve chilled or at room temperature.