CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-flow-remove-types

Fast, zero-configuration Flow type annotation removal tool for JavaScript with CLI and programmatic APIs

84

1.09x
Overview
Eval results
Files

rubric.jsonevals/scenario-6/

{
  "context": "This criteria evaluates how effectively the engineer uses the flow-remove-types package to remove class-specific type features (type parameters, implements clauses, and property type annotations) from Flow-typed JavaScript code. The evaluation focuses on correct API usage and proper handling of the three main class type features.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses flowRemoveTypes function",
      "description": "The solution imports and correctly invokes the flowRemoveTypes() function from the flow-remove-types package to transform the input source code",
      "max_score": 25
    },
    {
      "name": "Returns transformed string",
      "description": "The solution calls .toString() on the result object returned by flowRemoveTypes() to extract the transformed JavaScript code as a string",
      "max_score": 15
    },
    {
      "name": "Type parameters removal",
      "description": "The implementation successfully removes class type parameters (e.g., class Container<T> becomes class Container) by using flowRemoveTypes, as verified by the test cases",
      "max_score": 20
    },
    {
      "name": "Implements clause removal",
      "description": "The implementation successfully removes implements clauses from class declarations (e.g., class Foo implements Bar becomes class Foo) by using flowRemoveTypes, as verified by the test cases",
      "max_score": 20
    },
    {
      "name": "Property type annotations removal",
      "description": "The implementation successfully removes type annotations from class properties (e.g., prop: string becomes prop) while preserving initialized values, as verified by the test cases",
      "max_score": 20
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-flow-remove-types

tile.json