CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-ts-api-utils

tessl install tessl/npm-ts-api-utils@2.0.0

Utility 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%

rubric.jsonevals/scenario-10/

{
  "context": "This criteria evaluates how well the engineer uses ts-api-utils functions to analyze TypeScript AST nodes for bindable Object.defineProperty calls and const contexts. The evaluation focuses exclusively on the correct usage of isBindableObjectDefinePropertyCall and isInConstContext functions from the ts-api-utils package.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Import ts-api-utils",
      "description": "Correctly imports the required functions (isBindableObjectDefinePropertyCall and isInConstContext) from the ts-api-utils package",
      "max_score": 10
    },
    {
      "name": "Use isBindableObjectDefinePropertyCall",
      "description": "Uses isBindableObjectDefinePropertyCall to check if Object.defineProperty call expressions are bindable (statically analyzable) when traversing AST nodes",
      "max_score": 25
    },
    {
      "name": "Handle bindable calls",
      "description": "Correctly identifies and processes bindable Object.defineProperty calls by extracting relevant information (line number, property name) when isBindableObjectDefinePropertyCall returns true",
      "max_score": 15
    },
    {
      "name": "Handle non-bindable calls",
      "description": "Correctly handles non-bindable Object.defineProperty calls (e.g., with computed property names) by checking the return value of isBindableObjectDefinePropertyCall",
      "max_score": 10
    },
    {
      "name": "Use isInConstContext",
      "description": "Uses isInConstContext to check if expressions (object literals, array literals) are in const contexts when traversing AST nodes",
      "max_score": 25
    },
    {
      "name": "Identify const contexts",
      "description": "Correctly identifies expressions in const contexts (as const assertions, const type parameters) by properly calling isInConstContext and extracting relevant information (line number, expression type)",
      "max_score": 10
    },
    {
      "name": "Distinguish non-const contexts",
      "description": "Correctly distinguishes expressions not in const contexts by checking the return value of isInConstContext and handling them appropriately",
      "max_score": 5
    }
  ]
}

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/ts-api-utils@2.0.x
tile.json