tessl install tessl/npm-ts-api-utils@2.0.0Utility functions for working with TypeScript's API, providing comprehensive tools for analyzing and manipulating TypeScript AST nodes, types, and compiler APIs.
Agent Success
Agent success rate when using this tile
79%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.98x
Baseline
Agent success rate without this tile
40%
A TypeScript tool that analyzes comments in TypeScript source code files and provides statistics and content extraction capabilities.
singleLine and multiLine counts @test@generates
/**
* Extracts all comments from a TypeScript source file.
*
* @param sourceCode - The TypeScript source code as a string
* @returns An array of comment text content (without comment delimiters)
*/
export function extractComments(sourceCode: string): string[];
/**
* Counts comments by type in a TypeScript source file.
*
* @param sourceCode - The TypeScript source code as a string
* @returns An object with singleLine and multiLine counts
*/
export function countCommentsByType(sourceCode: string): {
singleLine: number;
multiLine: number;
};
/**
* Generates statistics about comments in a TypeScript source file.
*
* @param sourceCode - The TypeScript source code as a string
* @returns An object with total count, total characters, and average length
*/
export function getCommentStatistics(sourceCode: string): {
totalComments: number;
totalCharacters: number;
averageLength: number;
};Provides utilities for working with TypeScript's Compiler API, including comment extraction capabilities.
Provides the TypeScript compiler API for parsing and analyzing TypeScript code.