You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
constrendered=Eta.render(template,{})asstring
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: