ExpressionFunctionBodyExt extension

Extension for the ExpressionFunctionBody class from the analyzer package. Adds helper methods for working with expressions in single-expression function bodies.

on
  • ExpressionFunctionBody

Methods

getExpressionOfExactType<T>() → T?

Available on ExpressionFunctionBody, provided by the ExpressionFunctionBodyExt extension

Returns the expression of the function body if it matches the type T.