tatethurston / embedded-typescript Goto Github PK
View Code? Open in Web Editor NEWType safe embedded TypeScript templates
License: MIT License
Type safe embedded TypeScript templates
License: MIT License
Hey, cool project! I was looking for typesafe templating solutions and came across your project via google. I find it crazy that there isn't more in this space...
I'm working on a project where I'm using templating as a form of code generation. As an example, see this file which generates an auth module based on some user configuration: https://github.com/hpx7/rtag/blob/be5b3c365b415aa7888152f4fc4f4472959ef022/templates/base/auth.ts.hbs
I've been thinking about how it would be nice to have type-safe templating so I could do things like validate exhaustive checking of enums/unions etc. I first thought of switching to using template literals but quickly realized they don't work great for this use case (precise text formatting, lots of control flow).
ETS seems like a great option, but obviously the huge advantage of template literals is the editor support -- you get in your IDE (1) compile errors and (2) autocomplete. I've been brainstorming ideas for how to achieve the best of both worlds, just dropping this issue in case you had any thoughts on this topic.
Hi,
is there any possibility to add custom
Custom delimeters? like {{ }} , {{=}} and so on..
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.