Markdown viewer for TypeScript

Review interface proposals, API contracts and migration notes written in markdown with TypeScript.

Put markdown with TypeScript blocks in the editor and the preview shows the document formatted, with types and interfaces highlighted; one click on Share turns it into a link others can open.

TypeScript code in markdown is often about shape rather than behavior. A design doc proposes a new interface for an API response. A migration note explains how a loose any becomes a discriminated union. Someone documents the generic helper they wrote so the rest of the team stops copying it by hand. These documents are read by people deciding whether the types are right, and that decision is hard to make when angle brackets, colons and pipes all blend into the same color.

With highlighting, type names, keywords such as type, extends and readonly, string literals and comments stand apart, so a reviewer can read a union member by member and compare the before and after versions in two adjacent blocks. Tables work too, which helps when you want a column of field names, their types and whether they are optional.

The page never compiles anything; there is no type checking, so treat it as a reading surface, not a playground. A shared document is read-only for anyone holding the view link, has no login wall, and is removed automatically 15 days after it was created. For an RFC that will live longer, export the markdown and commit it to your repository once the discussion settles.

How to view TypeScript in markdown

  1. Paste your markdown into the editor above, or edit the example.
  2. Wrap TypeScript code in a fenced block that starts with ```typescript.
  3. The preview shows the rendered document with the code highlighted (side by side on desktop; switch to Preview on a phone).
  4. Select Share to get a read-only link that anyone can open without an account.

Frequently asked questions

Are .tsx snippets highlighted?

Use ```typescript or ```ts for highlighting. A block tagged ```tsx is not mapped to the TypeScript grammar, so it renders as plain monospaced code.

Does the viewer type-check my code?

No. There is no compiler or linter behind the preview. It colors the source so it is easier to read; errors in the types are not reported.