Preheat your oven to 200°C (400°F).
In a skillet, sauté the chopped onion and minced garlic until translucent.
In a bowl, combine the pre-cooked onion and garlic with sausage meat, thyme, pepper, and salt.
Roll out the puff pastry on a lightly floured surface and cut into rectangles.
Place a spoonful of the sausage mixture onto one side of each rectangle.
Fold the pastry over the filling and seal the edges with a fork or by pinching.
Brush the tops with beaten egg for a golden finish.
Bake in the preheated oven for 25-30 minutes, or until golden brown.
Remove from the oven and let cool slightly before serving.