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-9/

{
  "context": "This evaluation assesses how effectively the engineer uses ts-api-utils type guard functions to analyze and categorize TypeScript types. The focus is on proper usage of the package's type checking utilities for unions, intersections, literals, and object types.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Union type detection",
      "description": "Uses isUnionType() from ts-api-utils to identify union types (A | B) and correctly handles union type detection in the implementation.",
      "max_score": 20
    },
    {
      "name": "Intersection type detection",
      "description": "Uses isIntersectionType() from ts-api-utils to identify intersection types (A & B) and correctly handles intersection type detection in the implementation.",
      "max_score": 20
    },
    {
      "name": "Literal type detection",
      "description": "Uses the appropriate literal type guards from ts-api-utils (isStringLiteralType(), isNumberLiteralType(), isBooleanLiteralType(), isBigIntLiteralType()) to identify and categorize different kinds of literal types.",
      "max_score": 25
    },
    {
      "name": "Object type detection",
      "description": "Uses isObjectType() and/or isTupleType() from ts-api-utils to identify object types and tuples correctly.",
      "max_score": 15
    },
    {
      "name": "Intrinsic type detection",
      "description": "Uses isIntrinsicType() or specific intrinsic type guards from ts-api-utils (like isIntrinsicStringType(), isIntrinsicNumberType(), etc.) to identify built-in primitive types.",
      "max_score": 15
    },
    {
      "name": "Type constituent handling",
      "description": "Uses unionTypeParts() and/or intersectionTypeParts() from ts-api-utils to correctly extract and process constituent types from union and intersection types.",
      "max_score": 5
    }
  ]
}

Install with Tessl CLI

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

tile.json