Skip to content

Conversation

@knutwannheden
Copy link
Contributor

Convert:

if (true) {
    function helper() {
        return 42;
    }
}
const result = helper();

to:

let helper;
if (true) {
    helper = function() {
        return 42;
    };
}
const result = helper();

Convert:

```ts
if (true) {
    function helper() {
        return 42;
    }
}
const result = helper();
```

to:

```ts
let helper;
if (true) {
    helper = function() {
        return 42;
    };
}
const result = helper();
```
@github-project-automation github-project-automation bot moved this to In Progress in OpenRewrite Oct 23, 2025
@knutwannheden knutwannheden marked this pull request as draft October 23, 2025 19:48
# Conflicts:
#	rewrite-javascript/rewrite/src/index.ts
#	rewrite-javascript/rewrite/src/javascript/migrate/es6/index.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants