FunctionLikeDeclaration

/**
* A function-like declaration, including:
*  - MethodDeclaration,
*  - Constructor,
*  - GetAccessor,
*  - SetAccessor,
*  - FunctionExpression,
*  - ArrowFunction,
*  - FunctionDeclaration,
*/

Inherit from FunctionLike

Primary key: id: int

schema FunctionLikeDeclaration extends FunctionLike {
  @primary id: int
}

FunctionLikeDeclaration::getSymbol

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

FunctionLikeDeclaration::getIndex

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

FunctionLikeDeclaration::getParentOid

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

FunctionLikeDeclaration::getLastChild

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

FunctionLikeDeclaration::getEndColumnNumber

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

FunctionLikeDeclaration::getParent

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

FunctionLikeDeclaration::getTypeNode

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

FunctionLikeDeclaration::getDecoratorCount

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

FunctionLikeDeclaration::hasParameter

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

FunctionLikeDeclaration::getATypeParameter

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

FunctionLikeDeclaration::getTypeParameterCount

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

FunctionLikeDeclaration::getBody

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

FunctionLikeDeclaration::__all__

Data constraint method.

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

FunctionLikeDeclaration::getParameterFirstIndex

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

FunctionLikeDeclaration::getAnAncestorEnclosingFunction

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

FunctionLikeDeclaration::getTypeParameter

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

FunctionLikeDeclaration::getAComment

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

FunctionLikeDeclaration::getDecorator

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

FunctionLikeDeclaration::getParameterCount

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

FunctionLikeDeclaration::getAParameter

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

FunctionLikeDeclaration::getAModifier

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

FunctionLikeDeclaration::getKind

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

FunctionLikeDeclaration::getParameter

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

FunctionLikeDeclaration::getName

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

FunctionLikeDeclaration::isGenerator

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

FunctionLikeDeclaration::getRelativePath

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

FunctionLikeDeclaration::getEnclosingFunction

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

FunctionLikeDeclaration::getAReturnStatement

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

FunctionLikeDeclaration::getATrailingComment

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

FunctionLikeDeclaration::getAnAncestor

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

FunctionLikeDeclaration::getChild

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

FunctionLikeDeclaration::getACallSite

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

FunctionLikeDeclaration::getModifier

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

FunctionLikeDeclaration::getTypeParameterFirstIndex

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

FunctionLikeDeclaration::getModifierCount

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

FunctionLikeDeclaration::getCyclomaticComplexity

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

FunctionLikeDeclaration::getRoot

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

FunctionLikeDeclaration::getNameNode

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

FunctionLikeDeclaration::getChildCount

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

FunctionLikeDeclaration::getAReturnedExpression

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

FunctionLikeDeclaration::getAChild

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

FunctionLikeDeclaration::getStartColumnNumber

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

FunctionLikeDeclaration::getStartLineNumber

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

FunctionLikeDeclaration::getEndLineNumber

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

FunctionLikeDeclaration::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: FunctionLikeDeclaration, level: int) -> Node;

FunctionLikeDeclaration::getADescendant

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

FunctionLikeDeclaration::getALeadingComment

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

FunctionLikeDeclaration::getADecorator

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

FunctionLikeDeclaration::getFile

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

FunctionLikeDeclaration::getLocation

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

FunctionLikeDeclaration::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: FunctionLikeDeclaration, level: int) -> *Node;

FunctionLikeDeclaration::getText

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