Matches closure expressions that represent class constructor definitions.
This pattern only matches nodes of type expression.
Properties
constructorDefinition produces a record that contains the following property:
| Name | Type | Description |
|---|---|---|
functionSymbol |
symbol |
The symbol that represents the defined constructor |
Inherits properties from:
Example
The constructorDefinition pattern matches the constructor definition in the following case:
class Base {
constructor() {
this.baseField = 21;
}
};
In this instance, the .functionSymbol property is the symbol that represents the constructor.