dsherret / dsherret/ts-morph

Inserting type parameters for node with kind ArrowFunction

Open
#1,680 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
6.2k
Forks
238
Avg merge
2m
Merged PRs (30d)
1

Description

I'm trying to manipulate existing file with `SyntaxKind.ArrowFunction` in them. But when I call:

`arrowFn.addTypeParameters(["T"])` it gives an error:

> Not implemented scenario inserting type parameters for node with kind ArrowFunction.

Contributor guide

Open the contributing guide

Research direction

Start at the addTypeParameters API for the ArrowFunction node and trace the path that produces the “Not implemented scenario” error. Compare it with the existing handling for other node kinds, then add coverage for calling arrowFn.addTypeParameters(["T"]) and confirm that arrow-function type parameters are inserted successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.