[TypeScript] Replace enum reference to its value

Suppose there is an enum:

enum SomeEnum {
  EnumOption = 'Enum option value',
}

Is there any chance to automatically replace this:

const value = SomeEnum.EnumOption;

with:

const value = 'Enum option value';?

I mean using "Refactor" option or somehow.

0
1 comment
Avatar
Permanently deleted user

Actually I figured it out right after created a topic.

The answer is: Right click on the enum reference --> Refactor --> Inline (Ctrl + Alt + N)

1

Please sign in to leave a comment.