Helper function to get function arity by analyzing parameter lists for assignment patterns and rest parameters
95
{
"context": "This evaluation assesses how well the engineer uses the @babel/helper-get-function-arity package to solve the function parameter counting problem. The focus is entirely on proper usage of the package's API and integration with Babel's type system.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Import getFunctionArity",
"description": "Correctly imports the default export 'getFunctionArity' from @babel/helper-get-function-arity package",
"max_score": 20
},
{
"name": "Call getFunctionArity",
"description": "Calls the getFunctionArity function with the function AST node parameter to determine the required parameter count",
"max_score": 40
},
{
"name": "Return arity value",
"description": "Returns the value obtained from getFunctionArity as the result of getRequiredParamCount",
"max_score": 25
},
{
"name": "Import Babel types",
"description": "Imports @babel/types for the Function type definition used in the type signature",
"max_score": 15
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-babel--helper-get-function-aritydocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10