Evaluates the given expression to a constant value and checks if it matches the expected type.
The expression to evaluate.
The expected kind of the result.
The evaluated value if it matches the expected type, undefined otherwise.
Evaluates the given expression to a constant value and checks if it matches the expected type.