Utility functions for working with TypeScript's API, providing comprehensive tools for analyzing and manipulating TypeScript AST nodes, types, and compiler APIs.
79
{
"context": "This evaluation assesses how effectively the engineer uses the ts-api-utils library to detect function scope boundaries in TypeScript code. The focus is on proper usage of the isFunctionScopeBoundary function and related TypeScript Compiler API utilities for AST traversal.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses isFunctionScopeBoundary",
"description": "The implementation imports and uses the isFunctionScopeBoundary function from ts-api-utils to determine if a node creates a function scope boundary.",
"max_score": 40
},
{
"name": "Proper AST traversal",
"description": "The implementation correctly traverses the TypeScript AST using TypeScript's forEachChild or a similar visitor pattern to examine all nodes in the source file.",
"max_score": 20
},
{
"name": "Correct SourceFile handling",
"description": "The implementation properly creates a TypeScript SourceFile object from the input file using ts.createSourceFile or ts.createProgram with appropriate compiler options.",
"max_score": 15
},
{
"name": "Accurate line number extraction",
"description": "The implementation uses the SourceFile's getLineAndCharacterOfPosition method or similar to correctly determine line numbers for detected scope boundaries.",
"max_score": 10
},
{
"name": "Syntax kind reporting",
"description": "The implementation correctly reports the syntax kind name of scope boundary nodes using ts.SyntaxKind or node.kind with proper string conversion.",
"max_score": 10
},
{
"name": "Text extraction",
"description": "The implementation correctly extracts code text from nodes using node.getText() or sourceFile.text.substring() with the node's position information.",
"max_score": 5
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-ts-api-utilsevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10