jscomp_warning for redundant non-nullable typedef? #4265
              
                Unanswered
              
          
                  
                    
                      adrianholovaty
                    
                  
                
                  asked this question in
                Q&A
              
            Replies: 0 comments
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
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