Here is the code I am working with:
const executeGenerator = <T, TResult>(generatorFunction: Generator<unknown, T, TResult>) => {
const gen = generatorFunction();
};
However, I encountered this error message:
This expression is not callable.
Type 'Generator<unknown, T, TResult>' has no call signatures.
Can someone guide me on how to properly type a generator in TypeScript?