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%
Build a utility that counts and categorizes tokens in TypeScript source code.
@generates
/**
* Counts the total number of tokens in TypeScript source code
* @param sourceCode - TypeScript source code as a string
* @returns The total count of tokens
*/
export function countTokens(sourceCode: string): number;
/**
* Extracts all identifier token texts from TypeScript source code
* @param sourceCode - TypeScript source code as a string
* @returns Array of identifier strings found in the source
*/
export function extractIdentifiers(sourceCode: string): string[];Provides TypeScript AST token traversal utilities for iterating over tokens in source code.
@satisfied-by
TypeScript compiler API for parsing source code and working with AST nodes.
@satisfied-by