#117 · Programming Language Developer Tool

TypeScript Parser

Extract a structural outline of TypeScript imports, exports, interfaces, type aliases, enums, classes, functions, methods, generics, and declarations with line numbers.

Developer Input

Browser-based source processing
chars
Ad space

How to use this developer tool

  1. Paste or upload TypeScript.
  2. Choose outline, JSON, or CSV output.
  3. Select included declaration details.
  4. Run the parser and use the result as a navigation or documentation aid.

What this developer tool does

The parser creates a declaration map and code outline using a lightweight lexical scanner. It does not claim to produce a compiler AST.

String/comment masking → declaration detection → brace range mapping → line/signature extraction → outline serialization.

Complex TSX, decorators, overloads, and unusual syntax may require review because this is a structural parser.

Example

Input:

export interface User { id: number; }
export async function loadUser(): Promise<User> { return { id: 1 }; }
Expected use: Run the selected mode and review the generated output and statistics.

Tips for better output

  • Use JSON output for downstream tooling.
  • Line numbers refer to the original source.
  • Keywords inside strings and comments are ignored.
  • Use the official compiler API when a complete AST is required.

FAQ

How can I parse TypeScript interfaces online?

Run the parser with members enabled to extract interface names, lines, and signatures.

How do I extract TypeScript functions and classes?

The declaration map lists functions and classes with line numbers.

How can I create a TypeScript code outline?

Choose Outline text and run the parser.

How do I list exported TypeScript declarations?

Exported declarations are marked in each outline or JSON record.

How can I convert TypeScript structure into JSON?

Choose JSON report to download a machine-readable declaration list.

Supported analysis and output

ModulePurpose
InputLocal browser processing
AnalysisTool-specific lexical and structural logic
OutputCopy and download ready
PrivacyNo upload or server execution

Browse more developer tools

Calldeveloper category hub