eta-dev / eta

Embedded JS template engine for Node, Deno, and the browser. Lighweight, fast, and pluggable. Written in TypeScript
https://eta.js.org
MIT License
1.35k stars 60 forks source link

feat: adjust render types to be generic #278

Closed ninanator closed 3 months ago

ninanator commented 3 months ago

What & Why

Adjust the types of render* functions to include a generic for data. This will allow developers to type their render functions and more safely guard their templates 💃

Proof

Not adding a type falls back to object

no-types-work

Adding a type allows you to enforce your will 🤖

types-work

nebrelbug commented 3 months ago

@ninanator thanks for the PR! I'll merge right now!

nebrelbug commented 3 months ago

@ninanator published in version 3.3.0 :rocket: