I'm currently working on a TypeScript project where I need to define and use builders for creating objects with multiple options. I'm facing challenges with maintaining type safety while trying to simplify the process of defining builders without overly verbose generics or manually typing each method.
Here's the pattern I'm using: