CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-babel--helper-get-function-arity

Helper function to get function arity by analyzing parameter lists for assignment patterns and rest parameters

95

1.06x
Overview
Eval results
Files

rubric.jsonevals/scenario-2/

{
  "context": "This criteria evaluates how effectively the engineer uses the @babel/helper-get-function-arity package to analyze different JavaScript function types. The focus is on proper usage of the package's API and integration with @babel/types for handling multiple function type variants.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses getFunctionArity function",
      "description": "Imports and correctly calls the default export 'getFunctionArity' from @babel/helper-get-function-arity package to analyze function nodes",
      "max_score": 30
    },
    {
      "name": "Accepts t.Function type",
      "description": "Implementation correctly accepts the t.Function union type from @babel/types, which includes FunctionDeclaration, FunctionExpression, ArrowFunctionExpression, ObjectMethod, ClassMethod, and ClassPrivateMethod",
      "max_score": 25
    },
    {
      "name": "Handles parameter analysis",
      "description": "Correctly leverages getFunctionArity's built-in parameter analysis that detects AssignmentPattern (default parameters) and RestElement (rest parameters) to determine effective arity",
      "max_score": 25
    },
    {
      "name": "Integrates @babel/types",
      "description": "Properly imports and uses @babel/types for type definitions and type guards when working with function AST nodes",
      "max_score": 20
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-babel--helper-get-function-arity

tile.json