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
Dart supports guarded type promotion - could you guys please consider supporting this in Closure Compiler? I'm sure you're aware of the benefits but I will illustrate it below for anyone reading this who might not know what guarded type promotion is. Shamefully, I was completely unaware of it until recently.
/**
* @param {Event} event
*/
function listener(event) {
if (event instanceof MessageEvent) {
// no type casting is required here because instanceof is ensuring the
// event is a MessageEvent instance
console.info(event.data)
}
}
The following, on the other hand, can get really ugly as we all know.
Dart supports guarded type promotion - could you guys please consider supporting this in Closure Compiler? I'm sure you're aware of the benefits but I will illustrate it below for anyone reading this who might not know what guarded type promotion is. Shamefully, I was completely unaware of it until recently.
The following, on the other hand, can get really ugly as we all know.
The text was updated successfully, but these errors were encountered: