@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
- Function:
parseWithTsMorph - Constants:
parser,_parser - Types:
ParsedItem,ParseOptions, and related item/member types
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
Live Demo
Recommended to test it in your browser. The test here might not work properly
Console
No logs yet.
