aws / aws/aws-sdk-js-codemod

[Feature]: Replace TSTypeReference inside NewExpression

Open
#657 2 comments 0 reactions 0 assignees View on GitHub
enhancement p3
Dominant language
TypeScript
Stars
89
Forks
13
Avg merge
9h 59m
Merged PRs (30d)
1

Description

### Self-service

- [ ] I'd be willing to implement this feature

### Problem

Codemod does not transform TSTypeReference inside NewExpression

Example input:
```ts
import AWS from "aws-sdk";
const arr = new Array();
```

Returned output:
```ts
const arr = new Array();
```

### Solution

Replace TSTypeReference inside NewExpression

```ts
import { StackResourceSummary } from "@aws-sdk/client-cloudformation";
const arr = new Array();
```

### Alternatives

N/A

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. Locate the codemod logic that processes NewExpression and the related TSTypeReference handling, then add coverage for the Array example and verify that the output uses the imported StackResourceSummary type.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.