Skip to content

@briklab/parsee ​

@briklab/parsee parses JavaScript/TypeScript source code and returns structured metadata for all declarations.

Output Is Structured

Parse results are returned as a ParsedItem[] union, allowing you to post-process by item type.

Install ​

Follow the common installation tutorial

API ​

Quick Start ​

ts
import { parseWithTsMorph } from "@briklab/parsee";

const source = `
export class User {
  constructor(public id: string) {}
  greet(name: string) { return "Hello " + name; }
}
`;

const items = parseWithTsMorph(source, "user.ts", {
  Name: "include",
  Type: "include",
  Members: "include"
});

console.log(items);

Diagram ​

100%Ctrl + wheel to zoom

Live Demo ​

Recommended to test it in your browser. The test here might not work properly
Console
No logs yet.