DEV Community

Josua Schmid
Josua Schmid

Posted on

1

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.

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more