You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.
I think re-implementing the inference that x is a Banana in that if block, then renaming the variable and introducing a new free symbol, might be too clever for ts2dart.
as long as the function is small and has a single return like above, it is likely that dart2js will be able to inline it and correctly propagate that x is banana in the true branch. The easiest way to know for sure is to test it out explicitly and look at the dart2js output.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
TS 1.6 introduces user-defined type guard functions:
It could help with type inference (ie removing explicit cast) in Angular.
Do we want to support this in ts2dart ?
It should transpile to
/ref microsoft/TypeScript#1007
The text was updated successfully, but these errors were encountered: