src/com/google/javascript/jscomp/TypeValidator.java
/**
   * Expect the type to be a number or string or symbol, or a type convertible to a number or
   * string. If the expectation is not met, issue a warning at the provided node's source code
   * position.
   */
Expect the type to be a number or string or symbol, or a type convertible to a number or
string. If the expectation is not met, issue a warning at the provided node's source code
position.
Expect the type to be a number or string or symbol or a type convertible to a number or string . If the expectation is not met issue a warning at the provided node ' s source code position .
void expectStringOrNumberOrSymbol(NodeTraversal t, Node n, JSType type, String msg) {
    if (!type.matchesNumberContext()
        && !type.matchesStringContext()
        && !type.matchesSymbolContext()) {
      mismatch(t, n, msg, type, NUMBER_STRING_SYMBOL);
    } else {
      expectStringOrNumberOrSymbolStrict(n, type, msg);
    }
  }
void expectStringOrNumberOrSymbol ( NodeTraversal t , Node n , JSType type , String msg ) { if ( ! type . matchesNumberContext ( ) && ! type . matchesStringContext ( ) && ! type . matchesSymbolContext ( ) ) { mismatch ( t , n , msg , type , NUMBER_STRING_SYMBOL ) ; } else { expectStringOrNumberOrSymbolStrict ( n , type , msg ) ; } }
Expect the type to be a number or string or symbol, or a type convertible to a number or
 string.
Expect the type to be a number or string or symbol or a type convertible to a number or string .