Closed agohof closed 6 months ago
Yeah, we need to improve the transpiled output to exclude those enums. Good catch.
Any chance you'd be interested in trying to fix this? I think util.getExpressionInfo()
needs updated to exclude enums, constants, and interfaces.
When using enums to get values in a ternary if statement, the transpiled code will set the enums as params but it won't use them to get the results. Instead, it inserts the actual values directly in the return statements.
Example
Using the following enums:
This ternary operation:
Will be transpiled into the following code:
When compiled, there will be unused variable warnings because of the
ClosedCaptionsButtonSize
andThumbButtonSize
params.