Is your feature request related to a problem? Please describe.
When using the lib with typescript, calling render will return the union string | Promise<string> | void whatever the call arguments are.
This is painful as using the library results always results in an unnecessary cast:
const rendered = Eta.render(template, {}) as string
From what I see in the code, the same problem applies to renderAsync, renderFile and renderFileAsync
Describe the solution you'd like
It should be possible to overload the function types to allow better-returned types
Hey, thanks a lot for this library!
Is your feature request related to a problem? Please describe. When using the lib with typescript, calling render will return the union
string | Promise<string> | void
whatever the call arguments are. This is painful as using the library results always results in an unnecessary cast:From what I see in the code, the same problem applies to
renderAsync
,renderFile
andrenderFileAsync
Describe the solution you'd like It should be possible to overload the function types to allow better-returned types