microsoft / vscode-prompt-tsx

MIT License
34 stars 1 forks source link

Async render method #58

Closed hediet closed 4 months ago

hediet commented 5 months ago

Prompt elements have an async prepare method and a sync render method. I wonder why we cannot join them into an async render method? I think it could simplify usage a lot: Internal state does not have to be defined in a separate interface and making functions used in render async doesn't force to move them to prepare. render methods could still return a raw value (not a promise) for cases where performance matters.

What do you think?