Description
Represents the reflected node of a decorator call
Methods
-
getName
codeThe name of the decorator
getName(): string
Returns
string
:The name of the decorator
-
getTSNode
codeThe internal TypeScript node
getTSNode(): Decorator
Returns
Decorator
:The TypeScript AST node related to this reflected node
-
getContext
codeThe context includes useful APIs that are shared across all the reflected symbols. Some APIs include the parsed configuration options, the system interface, the type checker
getContext(): ProjectContext
Returns
ProjectContext
:The analyser context
-
getJSDoc
codeThe reflected documentation comment
getJSDoc(): CommentNode
Returns
CommentNode
:The JSDoc node
-
hasArguments
codeIf there are arguments supplied
hasArguments(): boolean
Returns
boolean
:True if there are arguments, otherwise false
-
getArguments
codeThe values of the arguments supplied in the call
getArguments(): unknown[]
Returns
unknown[]
:An array with the argument expression values
-
getLine
codeThe line number where the decorator is defined (not where it’s used)
getLine(): number | null
Returns
number | null
:The start line position
-
getPath
codeThe source file path where the decorator is defined (not where it’s used)
getPath(): string
Returns
string
:The relative source file path where the declaration is defined
-
serialize
codeSerializes the reflected node
serialize(): Decorator
Returns
Decorator
:The reflected node as a serializable object