Ability to inline a value
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 238
- Avg merge
- 2m
- Merged PRs (30d)
- 1
Description
For example, something like this (rough idea):
```
// input
const someValue = 5;
const otherVar = someValue;
// then in the code to do the manipulation
sourceFile.getVariableDeclarationOrThrow("otherVar").getInitializerIfKindOrThrow(...).inlineWithValue();
// output
const someValue = 5;
const otherVar = 5;
```
Also:
```ts
// input
const someValue = 5;
const otherVar = someValue;
// then in the code to do the manipulation
sourceFile.getVariableDeclarationOrThrow("someValue").inline();
// output
const otherVar = 5;
```
This should be able to work across projects that use ES6 modules... so it should be able to import any dependencies. It would be useful to use #247 with this.
Contributor guide
Assessment
This issue has not been assessed yet.