Utility functions for working with TypeScript's API, providing comprehensive tools for analyzing and manipulating TypeScript AST nodes, types, and compiler APIs.
79
Type analysis utilities (intersectionConstituents, unionConstituents, isFalsyType, isPropertyReadonlyInType, isThenableType, typeIsLiteral)
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%
Comment extraction (forEachComment, iterateComments)
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%
Token traversal (forEachToken, iterateTokens)
Token traversal usage
100%
100%
SourceFile creation
100%
100%
Token counting
100%
100%
Identifier filtering
100%
100%
Scope detection (isFunctionScopeBoundary)
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%
Modifier checking (includesModifier)
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%
Type system getters (getCallSignaturesOfType, getPropertyOfType, getWellKnownSymbolPropertyOfType)
Uses getCallSignaturesOfType
0%
100%
Uses getPropertyOfType
0%
100%
Uses getWellKnownSymbolPropertyOfType
0%
100%
AST node type guards (isAnyKeyword, isBooleanKeyword, etc.)
Type keyword guards
0%
0%
Boolean literal guards
0%
0%
Modifier keyword guards
0%
0%
AST traversal
100%
100%
Syntax validation (isAssignmentKind, isNumericPropertyName, isValidPropertyAccess)
isAssignmentKind usage
0%
100%
Correct operator extraction
100%
100%
isNumericPropertyName usage
0%
100%
isValidPropertyAccess usage
0%
100%
Correct return mapping
0%
100%
Type guards for complex types (union, intersection, literal, object types)
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%
Advanced node utilities (isBindableObjectDefinePropertyCall, isInConstContext)
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