Expand description
TypeScript DiffParser implementation.
Parses git diffs between two refs and extracts all functions whose bodies changed. This processes SOURCE files (.ts/.tsx), not .d.ts declaration files.
§Flow
git diff --name-status from_ref..to_ref→ list of changed files- Filter to
.ts/.tsx/.js/.jsxsource files (skip tests, configs, .d.ts) - For each file,
git show from_ref:pathandgit show to_ref:path - Parse both versions with OXC
- Extract all function-like declarations from both ASTs
- Match by qualified name, compare bodies
- Return
Vec<ChangedFunction>for all functions with differing bodies
Structs§
- TsDiff
Parser - TypeScript/JavaScript DiffParser implementation.