Skip to content

Add action to add a type annotation #442

@alexhwoods

Description

@alexhwoods

What we want

We will make it so that the "clear" / "change" action, when applied to "type", if there is no existing type annotation, will insert a : and leave the cursor afterwords so that the user can add a type.

For example:

function foo() {
  return "hello" // cursor at end of this line
}

User says “change type”, results in

function foo(): <cursor-here> {
  return "hello"
}

Implementation

We will leverage #210 to make it so that target returned from "type" knows how to insert itself

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions