HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
gcanti
tcomb
JavaScript2014–2018
gcanti / tcomb · Archived

tcomb

Type checking and DDD for JavaScript

9Distinct people
15Mentions
0Explicit recommenders
1.9KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Type checking and DDD for JavaScript

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year15 dated mentions

Observed mentions: 2014-09-08 06:44:24 UTC to 2018-08-08 04:24:19 UTC.

02462014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments20142015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 6 mentions; 2 submissions, 4 comments20162017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2018

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC404
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC303
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC624
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC101
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC101

What Hacker News says

15 sources
I too used JSON Schema until it grated on me enough to finally abandon it... But I haven't taken the leap into TypeScript yet. Lately I've been specifying schemas with Tcomb[0], which I quite like. It's different from JSON Schema in that it's code and does runtime checking, so it's not a fit for every project. But it's pretty trivial to write a little node-based Tcomb validator if you want to be able to validate from a CLI. It's quite simple, but expressive, and I find that the fact that it's code can be a benefit, since it's simpler to compose complex schemas with code. As a bonus (or downside, depending on your use case), you also get pseudo-immutability on your Tcomb structs for free. [0] https://github.com/gcanti/tcomb
In Specifying JSON
Hi, shameless plug: another (typed) immutable data structure library, https://github.com/gcanti/tcomb. Main features: - works with regular objects and arrays - runtime type checks - easy debugging with Chrome DevTools - immutability and immutability helpers - runtime type introspection - easy JSON serialization / deseralization - pattern matching Also https://github.com/gcanti/redux-tcomb (Immutable and type-checked state and actions for Redux)
In Immutable Data Structures and JavaScript
> “The `class` keyword will probably be the most harmful feature in JavaScript." I'm glad I'm not the only one. One of the reasons Javascript became so popular is that it took many of the properties that Lispers have been extolling for decades (minimal syntax, light-weight, meta-programmable, functional, composable), but wrapped them in a familiar-enough looking package that even beginners can Get Stuff Done. (Which is where Lisps have historically failed.) I'm hoping the future of Js will continue in this direction, but looking at ES6 and Angular, it looks like too many people are trying to turn Javascript into Java. The heart of Javascript is simplicity and power. Arrow functions and modules are a great addition. Maybe with enough support from the community, instead of more syntactic sugar and complexity, ES7 will adopt macros (http://s
Read the rest
weetjs.org/) and a type system (e.g tcomb ( https://github.com/gcanti/tcomb )).
In The Two Pillars of JavaScript
> Another options besides comment-based annotations is property based annotations. Basically provide a library that contains all the possible primitive types that can be checked and functions for composing higher order types. Shameless plug: I wrote a similar library based on set theory (I'm a mathematician) https://github.com/gcanti/tcomb EDIT: and here an article explaining the rationale behind the library https://gcanti.github.io/2014/09/29/javascript-types-and-set...
In AtScript Primer
Lately I've seen on HN a few attempts to add runtime type checking to JavaScript. I'm happy with that, as in my experience adding a bunch of asserts in strategic places can really speed up prototyping and development, you become more confident, and chances are that you can catch bugs earlier. In the same vein I wrote a library that adds runtime type checking based on type combinators [1], check it out, we can share some ideas. [1] https://github.com/gcanti/tcomb
In Show HN: Taxa – A tiny language inside JavaScript to enforce type signatures

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.