# Class Functions::Constructor

A constructor defined in a class.

## Direct supertypes

## Indirect supertypes

- @ast_node
- @ast_node_with_symbol
- @cfg_node
- @dataflownode
- @expr
- @exprorstmt
- @exprortype
- @exprparent
- @function
- @functionexpr
- @locatable
- @parameterized
- @sourceline
- @stmt_container
- @stmtparent
- @type_parameterized
- @typed_ast_node
- @typeexpr_parent
- ASTNode
- ControlFlowNode
- Documentable
- Expr
- ExprOrStmt
- ExprOrType
- Function
- Locatable
- Parameterized
- StmtContainer
- TypeParameterized
- ValueNode

## Inherited predicates

accessesGlobal | Holds if this expression accesses the global variable | from Expr |

analyze | Gets type inference results for this element. | from ValueNode |

declaresArguments | Holds if this function declares a parameter or local variable named | from Function |

describe | Gets a description of this function. | from Function |

describeControlFlowNode | For internal use. | from ControlFlowNode |

flow | Gets the data flow node associated with this program element. | from ValueNode |

getABodyStmt | Gets a statement in the body of this function. | from Function |

getAChild | Gets a child node of this node. | from ASTNode |

getAChildExpr | Gets a child expression of this node. | from ASTNode |

getAChildStmt | Gets a child statement of this node. | from ASTNode |

getAParameter | Gets a parameter of this function. | from Function |

getAPredecessor | Gets a node preceding this node in the CFG. | from ControlFlowNode |

getAReturnStmt | Gets a return statement in the body of this function, if any. | from Function |

getAReturnedExpr | Gets an expression that could be returned by this function, if any. | from Function |

getAStmt | Gets a statement that belongs to this container. | from StmtContainer |

getASuccessor | Gets a node succeeding this node in the CFG. | from ControlFlowNode |

getAToken | Gets a token belonging to this element. | from ASTNode |

getATypeParameter | Gets any type parameter declared on this function or type. | from TypeParameterized |

getArgumentsVariable | Gets the | from Function |

getBasicBlock | Gets the basic block this node belongs to. | from ControlFlowNode |

getBody | Gets the body of this function. | from Function |

getBodyStmt | Gets the | from Function |

getCanonicalName | Gets the canonical name for this function, as determined by the TypeScript compiler. | from Function |

getChild | Gets the | from ASTNode |

getChildExpr | Gets the | from ASTNode |

getChildStmt | Gets the | from ASTNode |

getChildTypeExpr | Gets the | from ASTNode |

getContainer | Gets the statement container (function or toplevel) in which this expression appears. | from Expr |

getCyclomaticComplexity | Gets the cyclomatic complexity of this function. | from Function |

getDocumentation | Gets the JSDoc comment associated with this expression or type or its parent statement, if any. | from ExprOrType |

getEnclosingContainer | Gets the enclosing function or toplevel of this function. | from FunctionExpr |

getEnclosingFunction | Gets the function in which this expression or type appears, if any. | from ExprOrType |

getEnclosingStmt | Gets the statement in which this function expression appears. | from FunctionExpr |

getEndLine | Gets the line on which this element ends. | from Locatable |

getEntry | Gets the (unique) entry node of the control flow graph for this toplevel or function. | from StmtContainer |

getEntryBB | Gets the entry basic block of this function, that is, the basic block containing the entry node of its CFG. | from StmtContainer |

getExit | Gets the (unique) exit node of the control flow graph for this toplevel or function. | from StmtContainer |

getFile | Gets the file this program element comes from. | from Locatable |

getFirstControlFlowNode | Gets the first control flow node belonging to this syntactic entity. | from ASTNode |

getFirstToken | Gets the first token belonging to this element. | from ASTNode |

getFunctionBoundary | Gets the innermost enclosing function or top-level, possibly this container itself if it is a function or top-level. | from StmtContainer |

getId | Gets the identifier specifying the name of this function, if any. | from Function |

getIntValue | Gets the constant integer value this expression evaluates to, if any. | from Expr |

getKind | Gets the kind of this expression, which is an integer value representing the expression’s node type. | from Expr |

getLastToken | Gets the last token belonging to this element. | from ASTNode |

getLocation | Gets this element’s location. | from ASTNode |

getName | Gets the name of this function expression, if any. | from FunctionExpr |

getNumBodyStmt | Gets the number of statements in the body of this function. | from Function |

getNumChild | Gets the number of child nodes of this node. | from ASTNode |

getNumChildExpr | Gets the number of child expressions of this node. | from ASTNode |

getNumChildStmt | Gets the number of child statements of this node. | from ASTNode |

getNumLines | Gets the number of lines covered by this element. | from Locatable |

getNumParameter | Gets the number of parameters declared by this element. | from Parameterized |

getNumTypeParameter | Gets the number of type parameters declared on this function or type. | from TypeParameterized |

getNumberOfLines | Gets the number of lines in this function. | from Function |

getNumberOfLinesOfCode | Gets the number of lines containing code in this function. | from Function |

getNumberOfLinesOfComments | Gets the number of lines containing comments in this function. | from Function |

getParameter | Gets the | from Function |

getParameterByName | Gets the parameter named | from Function |

getParameterVariable | Gets a variable of the given name that is a parameter of this element. | from Parameterized |

getParent | Gets the parent node of this node, if any. | from ASTNode |

getParentExpr | Gets the expression that is the parent of this expression in the AST, if any. | from Expr |

getReturnTypeAnnotation | Gets the return type annotation on this function, if any. | from Function |

getScope | Gets the scope induced by this toplevel or function, if any. | from StmtContainer |

getStart | Gets the (unique) CFG node at which execution of this toplevel or function begins. | from StmtContainer |

getStartBB | Gets the start basic block of this function, that is, the basic block containing the start node of its CFG. | from StmtContainer |

getStartLine | Gets the line on which this element starts. | from Locatable |

getStringValue | Gets the constant string value this expression evaluates to, if any. | from Expr |

getThisBinder | Gets the function whose | from Function |

getThisBindingContainer | Gets the function or top-level whose | from Function |

getThisTypeAnnotation | Gets the type annotation for the special | from Function |

getTopLevel | Gets the toplevel syntactic unit to which this element belongs. | from ASTNode |

getType | Gets the static type of this expression, as determined by the TypeScript type system. | from Expr |

getTypeParameter | Gets the | from Function |

getUnderlyingReference | Gets the innermost reference that this expression evaluates to, if any. | from ExprOrType |

getUnderlyingValue | Gets the innermost expression that this expression evaluates to. | from ExprOrType |

getVariable | Gets the variable holding this function. | from Function |

hasBody | Holds if this function has a body. | from Function |

hasMappedArgumentsVariable | Holds if this function has a mapped | from Function |

hasRestParameter | Holds if the last parameter of this function is a rest parameter. | from Function |

hasTrailingComma | Holds if the parameter list of this function has a trailing comma. | from Function |

hasTypeParameters | Holds if this function or type declares any type parameters. | from TypeParameterized |

inExternsFile | Holds if this syntactic entity belongs to an externs file. | from ASTNode |

isAFinalNode | Holds if this is a final node, that is, a CFG node where execution of a toplevel or function terminates. | from ControlFlowNode |

isAbstract | Holds if this function is part of an abstract class member. | from Function |

isAccessor | Holds if this function expression is a property accessor. | from FunctionExpr |

isAmbient | Holds if this is part of an ambient declaration or type annotation in a TypeScript file. | from Function |

isAsync | Holds if this function is an asynchronous function. | from Function |

isBranch | Holds if this is a node with more than one successor. | from ControlFlowNode |

isGenerator | Holds if this function is a generator function. | from Function |

isGetter | Holds if this function expression is a property getter. | from FunctionExpr |

isImpure | Holds if this expression is impure, that is, its evaluation could have side effects. | from FunctionExpr |

isJoin | Holds if this is a node with more than one predecessor. | from ControlFlowNode |

isNonConstructible | Holds if this function cannot be invoked using | from Function |

isPure | Holds if this expression is pure, that is, is its evaluation is guaranteed to be side effect-free. | from Expr |

isSetter | Holds if this function expression is a property setter. | from FunctionExpr |

isStart | Holds if this is a start node, that is, the CFG node where execution of a toplevel or function begins. | from ControlFlowNode |

isStrict | Holds if the code in this container is executed in ECMAScript strict mode. | from Function |

isUnreachable | Holds if this node is unreachable, that is, it has no predecessors in the CFG. Entry nodes are always considered reachable. | from ControlFlowNode |

mayHaveBooleanValue | Holds if this expression may evaluate to | from Expr |

mayHaveStringValue | Holds if this expression may evaluate to | from Expr |

mayReferToParameter | Holds if this expression may refer to the initial value of parameter | from Expr |

stripParens | Gets this expression, with any surrounding parentheses removed. | from Expr |

toString | Gets a textual representation of this element. | from Expr |

usesArgumentsObject | Holds if the body of this function refers to the function’s | from Function |