Place the shallots in a fine-mesh strainer and rinse with cold water
Drain the shallots and transfer to a small bowl with the garlic, sugar, and salt
Strip the thyme leaves off the stems and finely chop the leaves (about 1 teaspoon thyme)
Stir the chopped thyme into the bowl
Stir in the vinegar and water
Pour the olive oil into the bowl in a slow stream, whisking all the while until emulsified
Refrigerate for up to 3 days