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

Evaluation results

56%

26%

Type Analysis Reporter

Type analysis utilities (intersectionConstituents, unionConstituents, isFalsyType, isPropertyReadonlyInType, isThenableType, typeIsLiteral)

Criteria
Without context
With context

Union constituent extraction

0%

0%

Intersection constituent extraction

0%

0%

Falsy type detection

100%

100%

Literal type detection

0%

100%

Thenable type detection

100%

80%

Readonly property analysis

0%

100%

99%

-1%

Comment Analyzer

Comment extraction (forEachComment, iterateComments)

Criteria
Without context
With context

Uses comment extraction

100%

100%

Parses with TypeScript

100%

100%

Handles comment types

100%

100%

Extracts comment text

100%

93%

Iterates all comments

100%

100%

100%

Token Counter

Token traversal (forEachToken, iterateTokens)

Criteria
Without context
With context

Token traversal usage

100%

100%

SourceFile creation

100%

100%

Token counting

100%

100%

Identifier filtering

100%

100%

100%

TypeScript Scope Analyzer

Scope detection (isFunctionScopeBoundary)

Criteria
Without context
With context

Uses isFunctionScopeBoundary

100%

100%

Proper AST traversal

100%

100%

Correct SourceFile handling

100%

100%

Accurate line number extraction

100%

100%

Syntax kind reporting

100%

100%

Text extraction

100%

100%

100%

90%

Class Member Analyzer

Modifier checking (includesModifier)

Criteria
Without context
With context

Uses includesModifier function

0%

100%

Checks public modifier

0%

100%

Checks private modifier

0%

100%

Checks protected modifier

0%

100%

Checks readonly modifier

0%

100%

Checks static modifier

0%

100%

Checks abstract modifier

0%

100%

Handles combined modifiers

100%

100%

100%

100%

Type Inspector

Type system getters (getCallSignaturesOfType, getPropertyOfType, getWellKnownSymbolPropertyOfType)

Criteria
Without context
With context

Uses getCallSignaturesOfType

0%

100%

Uses getPropertyOfType

0%

100%

Uses getWellKnownSymbolPropertyOfType

0%

100%

20%

TypeScript AST Node Classifier

AST node type guards (isAnyKeyword, isBooleanKeyword, etc.)

Criteria
Without context
With context

Type keyword guards

0%

0%

Boolean literal guards

0%

0%

Modifier keyword guards

0%

0%

AST traversal

100%

100%

100%

90%

TypeScript Code Property Analyzer

Syntax validation (isAssignmentKind, isNumericPropertyName, isValidPropertyAccess)

Criteria
Without context
With context

isAssignmentKind usage

0%

100%

Correct operator extraction

100%

100%

isNumericPropertyName usage

0%

100%

isValidPropertyAccess usage

0%

100%

Correct return mapping

0%

100%

100%

100%

TypeScript Type Analyzer

Type guards for complex types (union, intersection, literal, object types)

Criteria
Without context
With context

Union type detection

0%

100%

Intersection type detection

0%

100%

Literal type detection

0%

100%

Object type detection

0%

100%

Intrinsic type detection

0%

100%

Type constituent handling

0%

100%

15%

-12%

TypeScript Code Analyzer

Advanced node utilities (isBindableObjectDefinePropertyCall, isInConstContext)

Criteria
Without context
With context

Import ts-api-utils

0%

0%

Use isBindableObjectDefinePropertyCall

0%

0%

Handle bindable calls

66%

33%

Handle non-bindable calls

80%

60%

Use isInConstContext

0%

0%

Identify const contexts

60%

20%

Distinguish non-const contexts

60%

40%

Install with Tessl CLI

npx tessl i tessl/npm-ts-api-utils
Evaluated
Agent
Codex

Table of Contents