nowfound

Life & fun · September 19, 2024

TB

ts-blank-space – fast TypeScript type-stripper

We've built a new type-stripping compiler for TypeScript source: `ts-blank-space` It's: * 5.6x faster than `tsc` due to zero-codegen * Written in TypeScript * Uses the official TypeScript parser * Accurate/preserved source locations * In used in production It uses the same novel approach that inspired Node 22.6.0's `--experimental-strip-types` functionality, released last month

ts-blank-space – fast TypeScript type-stripper launched on September 19, 2024 with 22 votes, #743 of 5,281 launches that month and more than 75% of that year's launches. The site was still online in September 2026, 2 years on.

Visit bloomberg.github.io ↗Alternativestop 14% of September 2024

In plain words

ts-blank-space is a TypeScript type-stripping compiler that removes type annotations from TypeScript code without generating new code. Written in TypeScript and using the official TypeScript parser, it runs 5.6x faster than tsc while preserving accurate source locations. The tool is already used in production and inspired the approach behind Node.js's `--experimental-strip-types` feature.

written from the facts on this page · September 2026

From the sources

A small, fast, pure JavaScript type-stripper that uses the official TypeScript parser.

ts-blank-space is a fast type-stripping compiler that converts TypeScript to JavaScript. It supports a modern subset of TypeScript by erasing the types and replacing them with whitespace. That's it. It is not a type checker and does not perform any other code transformations. The underlying technique can improve build performance and simplify development. The implementation is pure TypeScript. It is simple enough to read and understand in a few minutes because it is only 700 lines of code and reuses the original TypeScript parser. The core idea is to use spaces as a substitute for type annotations. You can think of ts-blank-space as a reference implementation of this type-stripping…from bloomberg.github.io

Does a similar job

all alternatives →
  • Zero-codegen, no-compile TypeScript type inference from Protobufs2025 · github.com · ▲138

    🛫 Zero-codegen, no-compile TypeScript `type` inference from protobuf `message`s - nathanhleung/protobuf-ts-types

  • A powerful bitstream library for TypeScript2022 · github.com · ▲39

    Utilities for packing/unpacking fields in a bitstream - astronautlabs/bitstream

  • A SQL database implemented purely in TypeScript type annotations2020 · github.com · ▲426

    A SQL database implemented purely in TypeScript type annotations. - codemix/ts-sql

  • ts-remove-unused – Remove unused code from your TypeScript project2024 · github.com · ▲141

    ts-remove-unused is a command line tool for TypeScript projects that auto-fixes unused `export`s. It removes the export keyword from the declaration or the whole declaration based on its usage in the project. There are some similar tools but they are focused on "detecting" rather than "removing" so I've built one myself. I wanted a solution that's as minimal as possible; config files to specify the files in your project shouldn't be necessary because that info should be already configured in tsconfig.json. All you need to do is to specify your entrypoint file. Feedback is much appreciated!

  • Codewich – A live-updating TypeScript/CSS/HTML playground2017 · codewich.com · ▲114

    Create and share simple web demos using TypeScript, CSS, and HTML. Prototype new ideas quickly.

  • Ts-Chan – Go-Like Concurrency Primitives for TypeScript/JavaScript2023 · github.com · ▲60

    Hey HN, I’m sharing ts-chan, an NPM package providing Go-like concurrency primitives, including channels and select statements, for TypeScript and JavaScript, supporting Node.js, Deno, Bun, and browsers. This is something I've built to make implementing Go-style "control loops" feasible in JavaScript, but there are many possible applications. Highlights: - Features a FIFO processing Chan class and versatile Select class for concurrency control. - Supports buffered channel and channel close semantics very close to Go's. - TypeScript-first implementation. - Defines a simple "channel protocol"…

More life & fun this month

the category →

Source: Show HN post ↗

Launched alongside, September 2024

the whole month →
  • Wispr Flow▲2,732

    Speak naturally, write perfectly & 3x faster in every app

    AI · 2024 · wisprflow.ai

  • Pathway▲1,335

    Get user insights 10x faster

    Work · 2024 · wynde.io

  • Personalized AI daily planning that suits your life

    AI · 2024 · beforesunset.ai

  • Osmos▲1,194

    Match with like-minded professionals for 1:1 conversations

    Growth · 2024

  • Carrot Care▲1,168

    Understand & optimise your bloodwork

    Life & fun · 2024 · carrotcare.health

  • Polar▲1,167

    An open source monetization platform for developers

    Dev tools · 2024 · polar.sh