fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

10K
active users

Is there a tool for that checks static type assertions similar to the following one?

// %inferred-type: (string | number | boolean)[]
const arr = [1, 'a', true];

I have written such a tool but it’s not ready for public consumption ATM, so such a tool already existing would save me the work of publishing what I have.

My tool is loosely similar to unit test runners such as Mocha—it enables static unit tests, if you will.

Axel Rauschmayer

@vbraun Looks good, thanks! A different style than what I’m used to, with different pros and cons.