Interface ExpressionContext<T>

Additional information about the context in which a condition is used. This is used by providers that create guard clauses.

GuardClauseProvider

interface ExpressionContext<T> {
    parent: RefSyntaxNode<T>;
    root: RefSyntaxNode<T>;
}

Type Parameters

  • T

Properties

Properties

parent: RefSyntaxNode<T>

The direct parent syntax node of the condition. This is usually an if statement or a loop header

The "root" syntax node that contains the condition. This is the main constructs that wraps the condition, usually a function, or a loop