Make the pastry cream first. In a medium bowl, whisk sugar, cornstarch, salt, and egg yolks until thick and smooth. Heat milk in a saucepan until steaming.
Slowly whisk half the hot milk into the yolk mixture to temper. Return everything to the pan and cook over medium heat, whisking constantly, until thick bubbles pop and the cream holds lines. Off heat, whisk in butter and vanilla.
Spread into a shallow dish, press plastic wrap directly on the surface, and chill until cold. Cold filling pipes best.
Heat the oven and prep pans. Set one rack in the center. Preheat to 425°F (220°C). Line two baking sheets with parchment.
If you want uniform eclairs, draw 4- to 5-inch lines on the underside of the paper to use as guides.
Cook the choux dough. In a medium saucepan, combine water, butter, salt, and sugar. Bring to a full boil. Remove from heat, add all the flour at once, and stir hard with a wooden spoon until the mixture forms a ball.
Return to medium heat and stir for 1–2 minutes, pressing and turning, until a thin film forms on the pan and the dough looks glossy and pulls from the sides. This dries the dough for better structure.
Beat in the eggs. Transfer the hot dough to a mixing bowl. Let it cool 2–3 minutes so the eggs don’t scramble.
Add the eggs one at a time, beating well after each. The dough may look split, then come together. When done, it should be thick, smooth, and fall from the spoon in a V-shaped ribbon.
If too stiff, beat in 1–2 teaspoons more egg (lightly beaten) until it reaches the right consistency.
Pipe the shells. Spoon dough into a piping bag fitted with a 1/2-inch round tip (or large star tip for ridges). Pipe 4- to 5-inch logs, spaced apart. Flatten any pointy tips with a damp fingertip.
For crisp sides, lightly mist the pan with water or flick a few drops around the dough—steam helps lift.
Bake in two stages. Bake at 425°F (220°C) for 12–15 minutes until well risen and starting to color. Without opening the oven, reduce to 350°F (175°C) and bake another 15–20 minutes until deep golden and firm. They should feel light and sound hollow when tapped.
Dry the shells. Turn off the oven. Pierce each shell with a skewer on the side or bottom to let steam escape.
Return to the turned-off oven with the door cracked for 10 minutes to dry. Cool completely on a rack.
Prepare the glaze. Heat cream until steaming. Pour over chopped chocolate with salt and butter.
Let sit 2 minutes, then stir until smooth and glossy. If too thick, add a splash more warm cream. If too thin, let it stand a few minutes to thicken.
Fill the eclairs. Whisk chilled pastry cream to loosen.
Fit a piping bag with a small round tip. Make two small holes on the underside of each shell or one on each end. Pipe cream until the shell feels heavy and just full. Don’t overfill or they’ll crack.
Glaze and set. Dip the top of each filled eclair into the warm ganache, letting excess drip off.
Set on a rack to allow the glaze to settle. Chill 20–30 minutes to set, or serve right away if you like a softer glaze.