TSLite
Published ....
Last modified ....
Share this post on BlueskySee discussion on Bluesky
I've been thinking a bit about TypeScript as of late, primarily motivated by TypeScript's Isolated Declarations feature. Mainly I've been thinking about what a new and fresh variant of typed JavaScript could look like[1]Jump to footnote.
I've mostly narrowed it down to the following feature set that I'm tentatively calling TSLite (kinda like SQLite to SQL), to note though - this is only just a concept at this point in time, I haven't built anything formal for this idea but I might consider leveraging AI to help me build some kind of type checking tool possibly!
Features (or lack of features):
- Static types are enforced for variables and functions
- Essentially no support for type inference
- Removing some TypeScript specific features like
namespace's,enum's, and other TS flavored features (like TypeScript decorators)- It should strictly be a static superset on JavaScript, with no changes to how the code will work at runtime
- No
anytype, instead preferunknown
I think with these constraints you could design a fairly minimal type checking system that could be as efficient (maybe more efficient) than TypeScript is today.