code: public boolean declareType(StaticScope scope, String name, JSType type) {
      checkState(!name.isEmpty());
      if (getTypeForScopeInternal(getCreationScope(scope, name), name) != null) {
        return false;
      }
  
      register(scope, type, name);
      return true;
    }
docs: Records declared global type names. This makes resolution faster
  and more robust in the common case.
  
  @param name The name of the type to be recorded.
  @param type The actual type being associated with the name.
  @return True if this name is not already defined, false otherwise.