Codiga has joined Datadog!

Read the Blog
Skip to main content

Function Definition AST JavaScript Object

The FunctionDefinition object matches a JavaScript function declaration.

The astType value for this node is functiondefinition.

Code Pattern

This object captures the following code block.

def my_function(arg1 = default_value, arg2 = other_value):


  • isAsync (type boolean): if this is an async function
  • name (type AstString): name of the function
  • returnType (type AstString): return type of the function
  • parameters (type FunctionDefinitionParameters): list of parameters for the function