Change function to arrow function

Hello 

When a function does not exist and it is called in the source code, there is a create function <insert name> that generate this code:

function $functionName$ ( $parameterNames$ ) {
$content$
}

Is it possible to tweak this behavior to generate an arrow function instead? Like this:

const $functionName$ = ( $parameterNames$ ) => {
$content$
};

Thank you

2 comments
Comment actions Permalink

there is no such option; but you can convert the generated function to arrow function once it's created - hit alt+Enter on it and choose Convert to variable holding arrow function from the popup

0
Comment actions Permalink
there is no such option; but you can convert the generated function to arrow function once it's created - hit `alt+Enter` on it and choose **Convert to variable holding arrow function** from the popup ![](https://intellij-support.jetbrains.com/hc/user_images/gSFm1nu-vHn2k3czEI5i5w.png)
0

Please sign in to leave a comment.