CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-ts-api-utils

Utility functions for working with TypeScript's API, providing comprehensive tools for analyzing and manipulating TypeScript AST nodes, types, and compiler APIs.

79

1.97x
Overview
Eval results
Files

rubric.jsonevals/scenario-3/

{
  "context": "This criteria evaluates how effectively an engineer uses ts-api-utils' token traversal functionality (forEachToken and iterateTokens) to count tokens and extract identifiers from TypeScript source code. The focus is on correct usage of the package's API rather than general code quality.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Token traversal usage",
      "description": "Uses ts-api-utils token traversal functions (forEachToken or iterateTokens) to iterate over tokens in the source code rather than manually parsing",
      "max_score": 30
    },
    {
      "name": "SourceFile creation",
      "description": "Correctly creates a TypeScript SourceFile object using TypeScript compiler API (createSourceFile) to parse the input source code string",
      "max_score": 20
    },
    {
      "name": "Token counting",
      "description": "Implements countTokens function by using forEachToken or iterateTokens to count all tokens in the source file",
      "max_score": 25
    },
    {
      "name": "Identifier filtering",
      "description": "Implements extractIdentifiers function by using forEachToken or iterateTokens and correctly filters tokens by checking SyntaxKind.Identifier",
      "max_score": 25
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-ts-api-utils

tile.json