Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
typescript-eslint
:sparkles: Monorepo for all the tooling which enables ESLint to support TypeScript
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Thank you. Just checked out the Bagel post (https://www.brandons.me/blog/the-bagel-language) and it looks really cool. Identifying pure functions (whether that is by syntax annotation or from synthesis) is a really good idea, gives me some ideas for doing function inlining in Ezno. I like the "Misc niceties" section, a few of those may of may not be on Ezno's todo list :)
The automatic / inferred generic restrictions is quite cool. https://hegel.js.org/ got there before me! Basic restriction modification is quite simple e.g. `(x) => Math.sin(x)`, x wants to be a number so can add that restriction. It gets more difficult with higher poly types. `(someObj) => Math.sin(someObj.prop1.prop2)` requires modifying not just `someObj` but a property on a property on it. And `(x, y) => printString(x + y)` requires doing even more complex things. But its definitely possible!
It's not external to TS. You write your types by passing object literals to the functions that generate the validators; TypeScript then infers shockingly precise types, which can be extracted using TypeScript's type manipulation utilities.
It does support generics [0].
[0] https://github.com/gcanti/io-ts/blob/master/index.md#generic...
Rome (written in Rust) is trying to be a faster tsc (amongst other things, like a faster webpack, babel, prettier, etc)
https://rome.tools/#development-status
Marc J Schmidt has been working on this for typescript at https://deepkit.io/ and it looks very impressive, and ambitious. I made something similar for Flow a long time ago: https://gajus.github.io/flow-runtime/#/try
You can't actually narrow `unknown` down to a structure yet, as you have no way to test whether `property in unknown` or not.
Well, until this is released! https://github.com/microsoft/TypeScript/pull/50666
It sounds like you want “deno compile” (https://deno.land/[email protected]/tools/compiler) plus “no-explicit-any” eslint rule (https://github.com/typescript-eslint/typescript-eslint/blob/...).
Or are you wanting a language with different semantics that could be compiled to machine code?
source and further explanation: https://github.com/capsAdmin/nattlua
Not sure if I have any big plans, I just think it's fun and interesting to work on and maybe I want to use it for my other Lua projects. I'm not very happy with the codebase as I've written it in Lua. I'm trying to bootstrap it but it's growing in complexity faster than I can bootstrap it. But one step at a time and I should be there someday, maybe I can even port it to some other language like Rust when I have a better understanding of what I'm actually doing. :)
Related posts
- Six Factors That Raise The Risk Of Bugs In A Codebase
- Level Up Your TypeScript Projects: Discover the Power of ESLint and Prettier
- How to Do a TypeScript Conversion: an opinionated take on gradual conversions
- Simplify Your Codebase with Auto-Sorting Linter using eslint-plugin-simple-import-sort
- PURISTA - Thanks to amazing open-source software