3 ms·
I also use "tiny types" a lot. In languages without any typing support (EG Javascript), I use ESDoc to write comments about expected types everywhere in my code
by tobyhinloopen 9y ago
I also use "tiny types" a lot. In languages without any typing support (EG Javascript), I use ESDoc to write comments about expected types everywhere in my codebase, and I have a lot of `@typedef`'s, like `@typedef {string} CompanyID`.
I tried things like TypeScript and Flow, but I didn't get it working nicely with JSDoc or ESDoc. I want type-checking & generated docs, and I don't wanna define both twice.