For the chocolate syrup, bring water to a boil in a saucepan. Remove the pot briefly from the heat. Add sugar, cocoa powder and salt and bring to a boil again.
Cook, stirring, for about 3 minutes until the mixture thickens significantly. Remove the pot from the heat, stir in the vanilla extract, and let the syrup cool.
The chocolate syrup will keep in a screw-top jar (or other airtight container) for up to 4 months in the refrigerator.