SonarJS linter helper functions
Preparing search index...
getMainFunctionTokenLocation
Function getMainFunctionTokenLocation
getMainFunctionTokenLocation
<
T
=
string
>
(
fn
:
FunctionLike
,
parent
:
undefined
|
Node
,
context
:
RuleContext
<
string
,
T
[]
>
,
)
:
SourceLocation
Returns a location of the "main" function token:
function name for a function declaration, method or accessor
"function" keyword for a function expression
"=>" for an arrow function
Type Parameters
T
=
string
Parameters
fn
:
FunctionLike
parent
:
undefined
|
Node
context
:
RuleContext
<
string
,
T
[]
>
Returns
SourceLocation
Settings
Theme
OS
Light
Dark
ESlint dev guide
SonarJS linter helper functions
Loading...
Returns a location of the "main" function token: