ts-morph 28.x
Use ts-morph 28.x for in-memory TypeScript project analysis, AST navigation and manipulation, type checking, printing, diagnostics, and emission.
- For
ts-morph@28.0.0- Verified
- 2026-09-07, 8 examples executed
- Package
@modootoday/pmcp-ts-morph@28.0.0
What it covers
- Version boundary
- Project setup and virtual source files
- Finding source files and navigating nodes
- AST manipulation
- Type checking and diagnostics
- Standalone structure printing
- Emitting without filesystem output
- Utilities
- Persistence boundary
- Not covered
One example from this skill
This is the skill's own text, not a summary of it. It runs: that is what verifying means here.
import { strict as assert } from "node:assert";
import { Project, ScriptTarget } from "ts-morph";
const project = new Project({
compilerOptions: { target: ScriptTarget.ES3 },
});
const sourceFile = project.createSourceFile(
"src/example.ts",
"export const answer: number = 42;\n",
);
assert.equal(sourceFile.getVariableDeclarationOrThrow("answer").getType().getText(), "number");
assert.equal(project.getSourceFiles().length, 1);
What it did in the sandbox
Verifying this skill meant installing the package and running code against it with no route out. Nothing was observed. The full ledger lists every package examined, including the ones that never became a skill.
Nothing observed is not a finding of safety. It means one run, under one policy, produced nothing to report.
Getting it
With a subscription:
npx -y @modootoday/pmcp login
npx -y @modootoday/pmcp install @modootoday/pmcp-ts-morph
It installs as a dev dependency of your project, and the MCP server finds it there like any other skill.