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.
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
Symbol
pub fn getSymbol(self: FunctionLikeDeclaration) -> Symbol;
FunctionLikeDeclaration::getIndex
- Parameter
self
:FunctionLikeDeclaration
- Return
int
pub fn getIndex(self: FunctionLikeDeclaration) -> int;
FunctionLikeDeclaration::getParentOid
/**
* Gets the parent oid of this node.
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
int
pub fn getParentOid(self: FunctionLikeDeclaration) -> int;
FunctionLikeDeclaration::getLastChild
/**
* Gets the last child of this node parent.
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
Node
pub fn getLastChild(self: FunctionLikeDeclaration) -> Node;
FunctionLikeDeclaration::getEndColumnNumber
- Parameter
self
:FunctionLikeDeclaration
- Return
int
pub fn getEndColumnNumber(self: FunctionLikeDeclaration) -> int;
FunctionLikeDeclaration::getParent
/**
* Gets the parent node of this node.
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
Node
pub fn getParent(self: FunctionLikeDeclaration) -> Node;
FunctionLikeDeclaration::getTypeNode
/**
* Gets the type node.
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
TypeNode
pub fn getTypeNode(self: FunctionLikeDeclaration) -> TypeNode;
FunctionLikeDeclaration::getDecoratorCount
/**
* Gets the number of decorators of this FunctionLikeDeclaration.
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
int
pub fn getDecoratorCount(self: FunctionLikeDeclaration) -> int;
FunctionLikeDeclaration::hasParameter
/**
* Determine this FunctionLikeDeclaration contains any parameter.
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
bool
pub fn hasParameter(self: FunctionLikeDeclaration) -> bool;
FunctionLikeDeclaration::getATypeParameter
/**
* Gets a type parameter.
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
*TypeParameter
pub fn getATypeParameter(self: FunctionLikeDeclaration) -> *TypeParameter;
FunctionLikeDeclaration::getTypeParameterCount
/**
* Gets the count of type parameters.
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
int
pub fn getTypeParameterCount(self: FunctionLikeDeclaration) -> int;
FunctionLikeDeclaration::getBody
/**
* Gets the body of this function-like declaration
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
BlockStatement
pub fn getBody(self: FunctionLikeDeclaration) -> BlockStatement;
FunctionLikeDeclaration::__all__
Data constraint method.
- Parameter
db
:JavascriptDB
- Return
*FunctionLikeDeclaration
pub fn __all__(db: JavascriptDB) -> *FunctionLikeDeclaration;
FunctionLikeDeclaration::getParameterFirstIndex
- Parameter
self
:FunctionLikeDeclaration
- Return
int
pub fn getParameterFirstIndex(self: FunctionLikeDeclaration) -> int;
FunctionLikeDeclaration::getAnAncestorEnclosingFunction
/**
* Gets an ancestor enclosing function of it
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
*FunctionLikeDeclaration
pub fn getAnAncestorEnclosingFunction(self: FunctionLikeDeclaration) -> *FunctionLikeDeclaration;
FunctionLikeDeclaration::getTypeParameter
/**
* Gets the `i`th type parameter.
*/
- Parameter
self
:FunctionLikeDeclaration
- Parameter
i
:int
- Return
TypeParameter
pub fn getTypeParameter(self: FunctionLikeDeclaration, i: int) -> TypeParameter;
FunctionLikeDeclaration::getAComment
/**
* Gets the comments related to it
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
*Comment
pub fn getAComment(self: FunctionLikeDeclaration) -> *Comment;
FunctionLikeDeclaration::getDecorator
/**
* Gets the `i`th decorator of this FunctionLikeDeclaration.
*/
- Parameter
self
:FunctionLikeDeclaration
- Parameter
i
:int
- Return
Decorator
pub fn getDecorator(self: FunctionLikeDeclaration, i: int) -> Decorator;
FunctionLikeDeclaration::getParameterCount
/**
* Gets the count of parameters.
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
int
pub fn getParameterCount(self: FunctionLikeDeclaration) -> int;
FunctionLikeDeclaration::getAParameter
/**
* Gets a parameter.
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
*Parameter
pub fn getAParameter(self: FunctionLikeDeclaration) -> *Parameter;
FunctionLikeDeclaration::getAModifier
/**
* Gets a modifier of this FunctionLikeDeclaration.
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
*Modifier
pub fn getAModifier(self: FunctionLikeDeclaration) -> *Modifier;
FunctionLikeDeclaration::getKind
/**
* Get the syntax kind of this node
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
int
pub fn getKind(self: FunctionLikeDeclaration) -> int;
FunctionLikeDeclaration::getParameter
/**
* Gets the `i`th parameter.
*/
- Parameter
self
:FunctionLikeDeclaration
- Parameter
i
:int
- Return
Parameter
pub fn getParameter(self: FunctionLikeDeclaration, i: int) -> Parameter;
FunctionLikeDeclaration::getName
/**
* Gets the name of this function-like declaration
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
string
pub fn getName(self: FunctionLikeDeclaration) -> string;
FunctionLikeDeclaration::isGenerator
/**
* Determines whether this FunctionLikeDeclaration is a generator.
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
bool
pub fn isGenerator(self: FunctionLikeDeclaration) -> bool;
FunctionLikeDeclaration::getRelativePath
/**
* Gets the relative path of this node.
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
string
pub fn getRelativePath(self: FunctionLikeDeclaration) -> string;
FunctionLikeDeclaration::getEnclosingFunction
/**
* Gets the enclosing function of it
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
FunctionLikeDeclaration
pub fn getEnclosingFunction(self: FunctionLikeDeclaration) -> FunctionLikeDeclaration;
FunctionLikeDeclaration::getAReturnStatement
- Parameter
self
:FunctionLikeDeclaration
- Return
*ReturnStatement
pub fn getAReturnStatement(self: FunctionLikeDeclaration) -> *ReturnStatement;
FunctionLikeDeclaration::getATrailingComment
/**
* Gets the trailing comments of it
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
*Comment
pub fn getATrailingComment(self: FunctionLikeDeclaration) -> *Comment;
FunctionLikeDeclaration::getAnAncestor
/**
* Gets an ancestor of this node.
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
*Node
pub fn getAnAncestor(self: FunctionLikeDeclaration) -> *Node;
FunctionLikeDeclaration::getChild
/**
* Gets the `i`th child of this node.
*/
- Parameter
self
:FunctionLikeDeclaration
- Parameter
i
:int
- Return
Node
pub fn getChild(self: FunctionLikeDeclaration, i: int) -> Node;
FunctionLikeDeclaration::getACallSite
/**
* Gets a call site of this function-like declaration
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
*MayInvokeExpression
pub fn getACallSite(self: FunctionLikeDeclaration) -> *MayInvokeExpression;
FunctionLikeDeclaration::getModifier
/**
* Gets the `i`th modifier of this FunctionLikeDeclaration.
*/
- Parameter
self
:FunctionLikeDeclaration
- Parameter
i
:int
- Return
Modifier
pub fn getModifier(self: FunctionLikeDeclaration, i: int) -> Modifier;
FunctionLikeDeclaration::getTypeParameterFirstIndex
- Parameter
self
:FunctionLikeDeclaration
- Return
int
pub fn getTypeParameterFirstIndex(self: FunctionLikeDeclaration) -> int;
FunctionLikeDeclaration::getModifierCount
/**
* Gets the number of modifiers of this FunctionLikeDeclaration.
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
int
pub fn getModifierCount(self: FunctionLikeDeclaration) -> int;
FunctionLikeDeclaration::getCyclomaticComplexity
/**
* Gets the cyclomatic complexity of this function-like declaration
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
int
pub fn getCyclomaticComplexity(self: FunctionLikeDeclaration) -> int;
FunctionLikeDeclaration::getRoot
/**
* Gets the root top-level of this node.
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
TopLevelDO
pub fn getRoot(self: FunctionLikeDeclaration) -> TopLevelDO;
FunctionLikeDeclaration::getNameNode
/**
* Gets the name node, which is a PropertyName.
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
PropertyName
pub fn getNameNode(self: FunctionLikeDeclaration) -> PropertyName;
FunctionLikeDeclaration::getChildCount
/**
* Gets the number of child nodes.
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
int
pub fn getChildCount(self: FunctionLikeDeclaration) -> int;
FunctionLikeDeclaration::getAReturnedExpression
- Parameter
self
:FunctionLikeDeclaration
- Return
*Expression
pub fn getAReturnedExpression(self: FunctionLikeDeclaration) -> *Expression;
FunctionLikeDeclaration::getAChild
/**
* Gets a child node of this node.
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
*Node
pub fn getAChild(self: FunctionLikeDeclaration) -> *Node;
FunctionLikeDeclaration::getStartColumnNumber
- Parameter
self
:FunctionLikeDeclaration
- Return
int
pub fn getStartColumnNumber(self: FunctionLikeDeclaration) -> int;
FunctionLikeDeclaration::getStartLineNumber
- Parameter
self
:FunctionLikeDeclaration
- Return
int
pub fn getStartLineNumber(self: FunctionLikeDeclaration) -> int;
FunctionLikeDeclaration::getEndLineNumber
- Parameter
self
:FunctionLikeDeclaration
- Return
int
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.
*/
- Parameter
self
:FunctionLikeDeclaration
- Parameter
level
:int
- Return
Node
pub fn getAnAncestorByLevel(self: FunctionLikeDeclaration, level: int) -> Node;
FunctionLikeDeclaration::getADescendant
/**
* Gets a descendant of this node.
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
*Node
pub fn getADescendant(self: FunctionLikeDeclaration) -> *Node;
FunctionLikeDeclaration::getALeadingComment
/**
* Gets the leading comments of it
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
*Comment
pub fn getALeadingComment(self: FunctionLikeDeclaration) -> *Comment;
FunctionLikeDeclaration::getADecorator
/**
* Gets a decorator of this FunctionLikeDeclaration.
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
*Decorator
pub fn getADecorator(self: FunctionLikeDeclaration) -> *Decorator;
FunctionLikeDeclaration::getFile
/**
* Gets the file of this node.
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
File
pub fn getFile(self: FunctionLikeDeclaration) -> File;
FunctionLikeDeclaration::getLocation
/**
* Gets the location of this node.
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
Location
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.
*/
- Parameter
self
:FunctionLikeDeclaration
- Parameter
level
:int
- Return
*Node
pub fn getADescendantByLevel(self: FunctionLikeDeclaration, level: int) -> *Node;
FunctionLikeDeclaration::getText
/**
* Gets the text of this node.
*/
- Parameter
self
:FunctionLikeDeclaration
- Return
string
pub fn getText(self: FunctionLikeDeclaration) -> string;