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 analyzes TypeScript code properties and validates property access patterns. The tool should identify assignments, validate property names, and suggest appropriate property access syntax.
Detects assignment operations in TypeScript code.
= operator, identifies it as an assignment @test+= operator, identifies it as an assignment @test===, identifies it as not an assignment @testAnalyzes and categorizes property names in object literals.
Validates property names for dot notation access and recommends appropriate access syntax.
@generates
import * as ts from "typescript";
/**
* Analyzes a binary expression to determine if it represents an assignment operation.
*
* @param expression - The binary expression to analyze
* @returns true if the expression is an assignment, false otherwise
*/
export function isAssignment(expression: ts.BinaryExpression): boolean;
/**
* Determines if a property name is numeric.
*
* @param propertyName - The property name to analyze
* @returns true if the property name is numeric, false otherwise
*/
export function isNumericProperty(propertyName: string): boolean;
/**
* Recommends the appropriate property access syntax for a given property name.
*
* @param propertyName - The property name to validate
* @returns "dot" if dot notation can be used, "bracket" if bracket notation must be used
*/
export function recommendAccessSyntax(propertyName: string): "dot" | "bracket";Provides TypeScript AST analysis utilities.
@satisfied-by
TypeScript compiler API for AST node types.
@satisfied-by