Source:
private void walk(TypedVar symbol, boolean isDefault) { JSType type = symbol.getType(); if (!type.isInterface() && !type.isNoType()) valueSymbolsWalked += 1; if (type.isFunctionType()) { FunctionType ftype = (FunctionType) type; boolean ordinaryFunctionAppearingAsClass = type.isConstructor() && type.getDisplayName().equals("Function"); if (type.isOrdinaryFunction() || ordinaryFunctionAppearingAsClass) { emit("function"); emit(getUnqualifiedName(symbol)); visitFunctionDeclaration(ftype); emit(";"); emitBreak(); return; } if (type.isConstructor()) { emit("class"); } else if (type.isInterface()) { emit("interface"); } else { checkState(false, "Unexpected function type " + type); } emit(getUnqualifiedName(symbol)); visitTemplateTypes(ftype); if (ftype.getExtendedInterfacesCount() > 0) { emit("extends"); Iterator<ObjectType> it = ftype.getExtendedInterfaces().iterator(); while (it.hasNext()) { visitType(it.next()); if (it.hasNext()) { emit(","); } } } if (getSuperType(ftype) != null) { emit("extends"); visitType(getSuperType(ftype)); } Iterator<ObjectType> it = ftype.getOwnImplementedInterfaces().iterator(); if (it.hasNext()) { emit("implements"); while (it.hasNext()) { visitType(it.next()); if (it.hasNext()) { emit(","); } } } visitObjectType(ftype, ftype.getPrototype(), !ftype.isInterface()); } else { if (type.isEnumType()) { visitEnumType((EnumType) type); return; } if (type.isNoType()) { JSType registryType = typeRegistry.getType(symbol.getName()); if (registryType != null) { visitTypeAlias(registryType, getUnqualifiedName(symbol)); return; } } emit("var"); emit(getUnqualifiedName(symbol)); visitTypeDeclaration(type, false); emit(";"); emitBreak(); } }

Target:
private void walk(TypedVar symbol, boolean isDefault) { JSType type = symbol.getType(); if (!type.isInterface() && !type.isNoType()) valueSymbolsWalked++; if (type.isFunctionType()) { FunctionType ftype = (FunctionType) type; boolean ordinaryFunctionAppearingAsClass = type.isConstructor() && type.getDisplayName().equals("Function"); if (type.isOrdinaryFunction() || ordinaryFunctionAppearingAsClass) { emit("function"); emit(getUnqualifiedName(symbol)); visitFunctionDeclaration(ftype); emit(";"); emitBreak(); return; } if (type.isConstructor()) { emit("class"); } else if (type.isInterface()) { emit("interface"); } else { checkState(false, "Unexpected function type " + type); } emit(getUnqualifiedName(symbol)); visitTemplateTypes(ftype); if (ftype.getExtendedInterfacesCount() > 0) { emit("extends"); Iterator<ObjectType> it = ftype.getExtendedInterfaces().iterator(); while (it.hasNext()) { visitType(it.next()); if (it.hasNext()) { emit(","); } } } if (getSuperType(ftype) != null) { emit("extends"); visitType(getSuperType(ftype)); } Iterator<ObjectType> it = ftype.getOwnImplementedInterfaces().iterator(); if (it.hasNext()) { emit("implements"); while (it.hasNext()) { visitType(it.next()); if (it.hasNext()) { emit(","); } } } visitObjectType(ftype, ftype.getPrototype(), !ftype.isInterface()); } else { if (type.isEnumType()) { visitEnumType((EnumType) type); return; } if (type.isNoType()) { JSType registryType = typeRegistry.getType(symbol.getName()); if (registryType != null) { visitTypeAlias(registryType, getUnqualifiedName(symbol)); return; } } emit("var"); emit(getUnqualifiedName(symbol)); visitTypeDeclaration(type, false); emit(";"); emitBreak(); } }