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
A continued thanks for Closure Compiler, which is such a great tool!
Over the years, I've been inconsistent of my own use of Closure Compiler typedefs for primitives. Sometimes, I do this:
@type {boolean}
And sometimes I do this:
@type {!boolean}
According to the wiki, primitives (boolean, number, string) are treated as non-nullable by default, so technically that exclamation point in my second example is redundant.
It would be great if the compiler could warn me of that redundancy. Is there a jscomp_warning flag I can pass to the compiler to alert me for these redundant exclamation points?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
A continued thanks for Closure Compiler, which is such a great tool!
Over the years, I've been inconsistent of my own use of Closure Compiler typedefs for primitives. Sometimes, I do this:
@type {boolean}And sometimes I do this:
@type {!boolean}According to the wiki, primitives (boolean, number, string) are treated as non-nullable by default, so technically that exclamation point in my second example is redundant.
It would be great if the compiler could warn me of that redundancy. Is there a
jscomp_warningflag I can pass to the compiler to alert me for these redundant exclamation points?Beta Was this translation helpful? Give feedback.
All reactions