TypeScript Compiler API wrapper for static analysis and programmatic code changes.
This report summarizes scanner evidence for dsherret/ts-morph, a TypeScript project with 6,220 GitHub stars. SynthScan examined 133,182 lines of code across 1270 source files, recording 279 pattern matches distributed across 3 syntactic categories. The legacy adjusted pattern signal is 2.1 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 274 finding(s).
Are imports declared and package/API names verified? 5 finding(s).
Are wrappers, guards, and repeated structures necessary? 274 finding(s).
Which changes need focused human review? 279 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 279 distinct pattern matches across 3 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/emitting.md | 104 | function numericLiteralToStringLiteral(node: ts.Node, context: ts.TransformationContext) { | CODE |
| LOW | …/ts-morph/scripts/config/isAllowedMixinForStructure.ts | 1 | export function isAllowedMixinForStructure(mixinName: string, structureName: string) { | CODE |
| LOW | …orph/scripts/verification/ensureArrayInputsReadonly.ts | 13 | export function ensureArrayInputsReadonly(inspector: TsMorphInspector, addProblem: (problem: Problem) => void) { | CODE |
| LOW | …ipts/verification/validatePublicApiClassMemberNames.ts | 13 | export function validatePublicApiClassMemberNames(inspector: TsMorphInspector, addProblem: (problem: Problem) => void) { | CODE |
| LOW | …ipts/verification/validateCompilerNodeToWrappedType.ts | 13 | export function validateCompilerNodeToWrappedType(inspector: TsMorphInspector, addProblem: (problem: Problem) => void) { | CODE |
| LOW | …verification/ensureClassesImplementStructureMethods.ts | 11 | export function ensureClassesImplementStructureMethods(inspector: TsMorphInspector, addProblem: (problem: Problem) => vo | CODE |
| LOW | …pts/verification/ensureMixinNotAppliedMultipleTimes.ts | 15 | export function ensureMixinNotAppliedMultipleTimes(inspector: TsMorphInspector, addProblem: (problem: Problem) => void) | CODE |
| LOW | …/scripts/verification/ensureOverloadStructuresMatch.ts | 13 | export function ensureOverloadStructuresMatch(inspector: TsMorphInspector, addProblem: (problem: Problem) => void) { | CODE |
| LOW | …h/scripts/verification/ensureStructuresMatchClasses.ts | 14 | export function ensureStructuresMatchClasses(inspector: TsMorphInspector, addProblem: (problem: Problem) => void) { | CODE |
| LOW | …es/ts-morph/scripts/verification/validateCodeFences.ts | 30 | function getDisallowedReferenceNodes() { | CODE |
| LOW | …s/ts-morph/scripts/verification/ensureOrThrowExists.ts | 49 | function doesReturnTypeRequireOrThrow(returnType: tsMorph.Type) { | CODE |
| LOW | …orph/scripts/generation/createGetStructureFunctions.ts | 15 | export function createGetStructureFunctions(structures: Structure[]) { | CODE |
| LOW | …s-morph/scripts/generation/createKindToNodeMappings.ts | 89 | function withDefaultIndexSignature(interfaceStructure: tsMorph.InterfaceDeclarationStructure) { | CODE |
| LOW | …s/ts-morph/scripts/generation/createDeclarationFile.ts | 86 | function makeJsDocsOneLineIfPossible() { | CODE |
| LOW⚡ | …orph/scripts/generation/createForEachStructureChild.ts | 28 | export function createForEachStructureChild(inspector: TsMorphInspector) { | CODE |
| LOW⚡ | …orph/scripts/generation/createForEachStructureChild.ts | 37 | function clearPreviouslyGeneratedFunctions(sourceFile: tsMorph.SourceFile) { | CODE |
| LOW⚡ | …orph/scripts/generation/createForEachStructureChild.ts | 45 | function updateForEachStructureChild(sourceFile: tsMorph.SourceFile, structureInfos: StructureInfo[]) { | CODE |
| LOW | …orph/scripts/generation/createForEachStructureChild.ts | 209 | function getTypeOrUnionElementTypes(type: tsMorph.Type) { | CODE |
| LOW | …-morph/scripts/generation/createStructureTypeGuards.ts | 11 | export function createStructureTypeGuards(inspector: TsMorphInspector) { | CODE |
| LOW | …-morph/scripts/generation/createStructureTypeGuards.ts | 26 | function clearPreviouslyGeneratedMethods(typeGuardsExpr: tsMorph.ObjectLiteralExpression) { | CODE |
| LOW | …ph/scripts/generation/createStructurePrinterFactory.ts | 10 | export function createStructurePrinterFactory(inspector: TsMorphInspector) { | CODE |
| LOW | …ph/scripts/generation/createStructurePrinterFactory.ts | 94 | function isAllowedStructurePrinter(name: string) { | CODE |
| LOW | …ration/declarationFile/getCodeBlockWriterStatements.ts | 9 | export function getCodeBlockWriterStatements(project: tsMorph.Project): tsMorph.StatementStructures[] { | CODE |
| LOW | …ration/declarationFile/getDeclarationFileStatements.ts | 3 | export function getDeclarationFileStatements(mainFile: tsMorph.SourceFile) { | CODE |
| LOW | packages/ts-morph/lib/ts-morph.d.ts | 859 | export declare function getCompilerOptionsFromTsConfig(filePath: string, options?: CompilerOptionsFromTsConfigOptions): | CODE |
| LOW | packages/ts-morph/src/Project.ts | 149 | function getTsConfigCompilerOptions() { | CODE |
| LOW | packages/ts-morph/src/Project.ts | 442 | function getFilePathOrSearchFunction(fileSystemWrapper: TransactionalFileSystem): StandardizedFilePath | ((file: Sou | CODE |
| LOW | packages/ts-morph/src/Project.ts | 703 | function normalizeAmbientModuleName(moduleName: string) { | CODE |
| LOW | …/textManipulators/ChangingChildOrderTextManipulator.ts | 95 | function fillSpacingBeforeInsertion() { | CODE |
| LOW | …/textManipulators/ChangingChildOrderTextManipulator.ts | 105 | function fillSpacingAfterInsertion() { | CODE |
| LOW | …ges/ts-morph/src/manipulation/code/getNewInsertCode.ts | 32 | function getFormattingKindTextWithIndent(formattingKind: FormattingKind) { | CODE |
| LOW | …s/ts-morph/src/manipulation/manipulations/insertion.ts | 31 | export function insertIntoParentTextRange(opts: InsertIntoParentTextRangeOptions) { | CODE |
| LOW | …s/ts-morph/src/manipulation/manipulations/insertion.ts | 88 | export function insertIntoCommaSeparatedNodes(opts: InsertIntoCommaSeparatedNodesOptions) { | CODE |
| LOW | …s/ts-morph/src/manipulation/manipulations/insertion.ts | 188 | function appendNodeTrailingCommentRanges(node: Node) { | CODE |
| LOW | …s/ts-morph/src/manipulation/manipulations/insertion.ts | 202 | function getPreviousNonCommentNode() { | CODE |
| LOW | …s/ts-morph/src/manipulation/manipulations/insertion.ts | 260 | export function insertIntoBracesOrSourceFile(opts: InsertIntoBracesOrSourceFileOptions) { | CODE |
| LOW | …s/ts-morph/src/manipulation/manipulations/insertion.ts | 370 | export function insertIntoBracesOrSourceFileWithGetChildrenWithComments(opts: InsertIntoBracesOrSourceFileWithGetChildre | CODE |
| LOW | …/ts-morph/src/manipulation/manipulations/replaction.ts | 34 | export function replaceSourceFileTextForFormatting(opts: { sourceFile: SourceFile; newText: string }) { | CODE |
| LOW | …/ts-morph/src/manipulation/manipulations/replaction.ts | 41 | export function replaceSourceFileTextStraight(opts: { sourceFile: SourceFile; newText: string }) { | CODE |
| LOW | …/ts-morph/src/manipulation/manipulations/replaction.ts | 53 | export function replaceSourceFileTextForRename(opts: { sourceFile: SourceFile; renameLocations: RenameLocation[]; newNam | CODE |
| LOW | …/ts-morph/src/manipulation/manipulations/replaction.ts | 74 | export function replaceTextPossiblyCreatingChildNodes(opts: ReplaceTextPossiblyCreatingChildNodesOptions) { | CODE |
| LOW | …/ts-morph/src/manipulation/manipulations/replaction.ts | 100 | export function replaceSourceFileForFilePathMove(opts: ReplaceSourceFileForFilePathMoveOptions) { | CODE |
| LOW | …/ts-morph/src/manipulation/manipulations/replaction.ts | 115 | export function replaceSourceFileForCacheUpdate(sourceFile: SourceFile) { | CODE |
| LOW | …ges/ts-morph/src/manipulation/manipulations/removal.ts | 115 | export function removeCommaSeparatedChild(child: Node) { | CODE |
| LOW⚡ | …ges/ts-morph/src/manipulation/manipulations/removal.ts | 148 | export function removeOverloadableStatementedNodeChild(node: Node & OverloadableNode) { | CODE |
| LOW⚡ | …ges/ts-morph/src/manipulation/manipulations/removal.ts | 155 | export function removeStatementedNodeChild(node: Node) { | CODE |
| LOW⚡ | …ges/ts-morph/src/manipulation/manipulations/removal.ts | 159 | export function removeStatementedNodeChildren(nodes: Node[]) { | CODE |
| LOW | …ges/ts-morph/src/manipulation/manipulations/removal.ts | 170 | export function removeClausedNodeChildren(nodes: Node[]) { | CODE |
| LOW | …rph/src/manipulation/nodeHandlers/RenameNodeHandler.ts | 41 | function handleImportOrExportSpecifier(compilerFactory: CompilerFactory) { | CODE |
| LOW | …h/src/manipulation/textSeek/getNextNonWhitespacePos.ts | 9 | export function getPreviousNonWhitespacePos(text: string, pos: number) { | CODE |
| LOW | …ulation/textSeek/getPosAtStartOfLineOrNonWhitespace.ts | 1 | export function getPosAtStartOfLineOrNonWhitespace(fullText: string, pos: number) { | CODE |
| LOW | …src/manipulation/textSeek/getPosAtEndOfPreviousLine.ts | 1 | export function getPosAtEndOfPreviousLine(fullText: string, pos: number) { | CODE |
| LOW | …n/textSeek/getPosAtEndOfPreviousLineOrNonWhitespace.ts | 1 | export function getPosAtEndOfPreviousLineOrNonWhitespace(fullText: string, pos: number) { | CODE |
| LOW | …nipulation/textSeek/getPosAfterPreviousNonBlankLine.ts | 1 | export function getPosAfterPreviousNonBlankLine(text: string, pos: number) { | CODE |
| LOW | …anipulation/formatting/getInterfaceMemberFormatting.ts | 4 | export function getInterfaceMemberFormatting(parent: InterfaceDeclaration, member: Node) { | CODE |
| LOW | …lation/formatting/getStatementedNodeChildFormatting.ts | 5 | export function getStatementedNodeChildFormatting(parent: Node, member: Node) { | CODE |
| LOW | …lation/formatting/getStatementedNodeChildFormatting.ts | 12 | export function getClausedNodeChildFormatting(parent: Node, member: Node) { | CODE |
| LOW | …src/manipulation/helpers/getMixinStructureFunctions.ts | 67 | export function fromExtendsClauseableNode(node: compiler.ExtendsClauseableNode): MakeRequired<structures.ExtendsClauseab | CODE |
| LOW | …src/manipulation/helpers/getMixinStructureFunctions.ts | 74 | export function fromImplementsClauseableNode(node: compiler.ImplementsClauseableNode): MakeRequired<structures.Implement | CODE |
| LOW | …src/manipulation/helpers/getMixinStructureFunctions.ts | 87 | export function fromQuestionTokenableNode(node: compiler.QuestionTokenableNode): MakeRequired<structures.QuestionTokenab | CODE |
| 214 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | packages/ts-morph/lib/ts-morph.d.ts | 3493 | print(options?: PrintNodeOptions): string; | CODE |
| HIGH | packages/ts-morph/src/compiler/ast/common/Node.ts | 231 | print(options: PrintNodeOptions = {}): string { | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | …morph/src/tests/compiler/ast/module/sourceFileTests.ts | 1677 | * Lorem ipsum | COMMENT |
| LOW⚡ | …morph/src/tests/compiler/ast/module/sourceFileTests.ts | 1685 | doTest(code, code.indexOf("Lorem ipsum") - 3, { line: 3, column: 1 }); | CODE |
| LOW⚡ | …morph/src/tests/compiler/ast/module/sourceFileTests.ts | 1686 | doTest(code, code.indexOf("Lorem ipsum") + "Lorem ipsum".length, { line: 3, column: " * Lorem ipsum".length + 1 }) | CODE |