FunctionDeclaration

/**
* A FunctionDeclaration.
*/

Inherit from FunctionLikeDeclaration

Primary key: id: int

schema FunctionDeclaration extends FunctionLikeDeclaration {
  @primary id: int
}

FunctionDeclaration::getText

/**
* Gets the text of this node.
*/
pub fn getText(self: FunctionDeclaration) -> string;

FunctionDeclaration::getADescendantByLevel

/**
* Gets a descendant of this node by the level of the hierarchy.
*
* @param level: the number of levels to go up in the hierarchy.
*/
pub fn getADescendantByLevel(self: FunctionDeclaration, level: int) -> *Node;

FunctionDeclaration::getLocation

/**
* Gets the location of this node.
*/
pub fn getLocation(self: FunctionDeclaration) -> Location;

FunctionDeclaration::getFile

/**
* Gets the file of this node.
*/
pub fn getFile(self: FunctionDeclaration) -> File;

FunctionDeclaration::getADecorator

/**
* Gets a decorator of this FunctionLikeDeclaration.
*/
pub fn getADecorator(self: FunctionDeclaration) -> *Decorator;

FunctionDeclaration::getALeadingComment

/**
* Gets the leading comments of it
*/
pub fn getALeadingComment(self: FunctionDeclaration) -> *Comment;

FunctionDeclaration::getADescendant

/**
* Gets a descendant of this node. 
*/
pub fn getADescendant(self: FunctionDeclaration) -> *Node;

FunctionDeclaration::getAnAncestorByLevel

/**
* Gets an ancestor of this node by the level of the hierarchy.
*
* @param level: the number of levels to go up in the hierarchy.
*/
pub fn getAnAncestorByLevel(self: FunctionDeclaration, level: int) -> Node;

FunctionDeclaration::isGenerator

/**
* Determines whether this FunctionLikeDeclaration is a generator.
*/
pub fn isGenerator(self: FunctionDeclaration) -> bool;

FunctionDeclaration::getKind

/**
* Get the syntax kind of this node
*/
pub fn getKind(self: FunctionDeclaration) -> int;

FunctionDeclaration::getAModifier

/**
* Gets a modifier of this FunctionLikeDeclaration.
*/
pub fn getAModifier(self: FunctionDeclaration) -> *Modifier;

FunctionDeclaration::getAComment

/**
* Gets the comments related to it
*/
pub fn getAComment(self: FunctionDeclaration) -> *Comment;

FunctionDeclaration::getBody

/**
* Gets the body of this function-like declaration
*/
pub fn getBody(self: FunctionDeclaration) -> BlockStatement;

FunctionDeclaration::getTypeParameterCount

/**
* Gets the count of type parameters.
*/
pub fn getTypeParameterCount(self: FunctionDeclaration) -> int;

FunctionDeclaration::getSymbol

/**
* Gets the symbol associated with this node.
*/
pub fn getSymbol(self: FunctionDeclaration) -> Symbol;

FunctionDeclaration::getAnAncestorEnclosingFunction

/**
* Gets an ancestor enclosing function of it
*/
pub fn getAnAncestorEnclosingFunction(self: FunctionDeclaration) -> *FunctionLikeDeclaration;

FunctionDeclaration::getTypeParameter

/**
* Gets the `i`th type parameter.
*/
pub fn getTypeParameter(self: FunctionDeclaration, i: int) -> TypeParameter;

FunctionDeclaration::getIndex

pub fn getIndex(self: FunctionDeclaration) -> int;

FunctionDeclaration::getAParameter

/**
* Gets a parameter.
*/
pub fn getAParameter(self: FunctionDeclaration) -> *Parameter;

FunctionDeclaration::getEnclosingFunction

/**
* Gets the enclosing function of it
*/
pub fn getEnclosingFunction(self: FunctionDeclaration) -> FunctionLikeDeclaration;

FunctionDeclaration::getRelativePath

/**
* Gets the relative path of this node.
*/
pub fn getRelativePath(self: FunctionDeclaration) -> string;

FunctionDeclaration::getParameterCount

/**
* Gets the count of parameters.
*/
pub fn getParameterCount(self: FunctionDeclaration) -> int;

FunctionDeclaration::getParameterFirstIndex

pub fn getParameterFirstIndex(self: FunctionDeclaration) -> int;

FunctionDeclaration::__all__

Data constraint method.

pub fn __all__(db: JavascriptDB) -> *FunctionDeclaration;

FunctionDeclaration::hasParameter

/**
* Determine this FunctionLikeDeclaration contains any parameter.
*/
pub fn hasParameter(self: FunctionDeclaration) -> bool;

FunctionDeclaration::getATypeParameter

/**
* Gets a type parameter.
*/
pub fn getATypeParameter(self: FunctionDeclaration) -> *TypeParameter;

FunctionDeclaration::getTypeNode

/**
* Gets the type node.
*/
pub fn getTypeNode(self: FunctionDeclaration) -> TypeNode;

FunctionDeclaration::getLastChild

/**
* Gets the last child of this node parent.
*/
pub fn getLastChild(self: FunctionDeclaration) -> Node;

FunctionDeclaration::getParent

/**
* Gets the parent node of this node.
*/
pub fn getParent(self: FunctionDeclaration) -> Node;

FunctionDeclaration::getEndColumnNumber

pub fn getEndColumnNumber(self: FunctionDeclaration) -> int;

FunctionDeclaration::getDecorator

/**
* Gets the `i`th decorator of this FunctionLikeDeclaration.
*/
pub fn getDecorator(self: FunctionDeclaration, i: int) -> Decorator;

FunctionDeclaration::getDecoratorCount

/**
* Gets the number of decorators of this FunctionLikeDeclaration.
*/
pub fn getDecoratorCount(self: FunctionDeclaration) -> int;

FunctionDeclaration::getName

/**
* Gets the name of this function-like declaration
*/
pub fn getName(self: FunctionDeclaration) -> string;

FunctionDeclaration::getParameter

/**
* Gets the `i`th parameter.
*/
pub fn getParameter(self: FunctionDeclaration, i: int) -> Parameter;

FunctionDeclaration::getParentOid

/**
* Gets the parent oid of this node.
*/
pub fn getParentOid(self: FunctionDeclaration) -> int;

FunctionDeclaration::getAReturnStatement

pub fn getAReturnStatement(self: FunctionDeclaration) -> *ReturnStatement;

FunctionDeclaration::getATrailingComment

/**
* Gets the trailing comments of it
*/
pub fn getATrailingComment(self: FunctionDeclaration) -> *Comment;

FunctionDeclaration::getAnAncestor

/**
* Gets an ancestor of this node. 
*/
pub fn getAnAncestor(self: FunctionDeclaration) -> *Node;

FunctionDeclaration::getChild

/**
* Gets the `i`th child of this node.
*/
pub fn getChild(self: FunctionDeclaration, i: int) -> Node;

FunctionDeclaration::getACallSite

/**
* Gets a call site of this function-like declaration
*/
pub fn getACallSite(self: FunctionDeclaration) -> *MayInvokeExpression;

FunctionDeclaration::getModifier

/**
* Gets the `i`th modifier of this FunctionLikeDeclaration.
*/
pub fn getModifier(self: FunctionDeclaration, i: int) -> Modifier;

FunctionDeclaration::getTypeParameterFirstIndex

pub fn getTypeParameterFirstIndex(self: FunctionDeclaration) -> int;

FunctionDeclaration::getModifierCount

/**
* Gets the number of modifiers of this FunctionLikeDeclaration.
*/
pub fn getModifierCount(self: FunctionDeclaration) -> int;

FunctionDeclaration::getCyclomaticComplexity

/**
* Gets the cyclomatic complexity of this function-like declaration
*/
pub fn getCyclomaticComplexity(self: FunctionDeclaration) -> int;

FunctionDeclaration::getRoot

/**
* Gets the root top-level of this node. 
*/
pub fn getRoot(self: FunctionDeclaration) -> TopLevelDO;

FunctionDeclaration::getNameNode

/**
* Gets the name node, which is a PropertyName.
*/
pub fn getNameNode(self: FunctionDeclaration) -> PropertyName;

FunctionDeclaration::getChildCount

/**
* Gets the number of child nodes.
*/
pub fn getChildCount(self: FunctionDeclaration) -> int;

FunctionDeclaration::getAReturnedExpression

pub fn getAReturnedExpression(self: FunctionDeclaration) -> *Expression;

FunctionDeclaration::getAChild

/**
* Gets a child node of this node.
*/
pub fn getAChild(self: FunctionDeclaration) -> *Node;

FunctionDeclaration::getStartColumnNumber

pub fn getStartColumnNumber(self: FunctionDeclaration) -> int;

FunctionDeclaration::getStartLineNumber

pub fn getStartLineNumber(self: FunctionDeclaration) -> int;

FunctionDeclaration::getEndLineNumber

pub fn getEndLineNumber(self: FunctionDeclaration) -> int;