DEV Community

Josua Schmid
Josua Schmid

Posted on

Turbo without Typescript

Turbo just dropped Typescript in this GitHub PR. DHH wrote about it on the Hey blog.

I'd like to connect this with my idea of conventional typing because I think the PR makes very good examples of why to remove TS is valuable.
The question I often like to ask is whether the types are here for humans or for machines.

Consider the following example from the PR:

Image description

The naming already suggests the types for humans. "delegate", "map" and "callback" are well known concepts in the context of Turbo. The types were only here for the machine.

If your IDE cannot infer the types automatically or you would like to provide types for the users of your library, you can still annotate in separate d.ts files. These files can be auto-generated and are out of your way when writing business-relevant code.

Top comments (0)