@Override public boolean isSubtype(JSType that) { return isSubtype(that, null, SubtypingMode.NORMAL); }
registerNativeType(JSTypeNative.FUNCTION_PROTOTYPE, FUNCTION_PROTOTYPE); NoType NO_TYPE = new NoType(this); registerNativeType(JSTypeNative.NO_TYPE, NO_TYPE);
/** * Emits a type that is not resolved by closure. Depending on compilation options (whether we * are assuming forward declarations or not) we either emit the defaultEmit string passed, or * the literal string that was in the original code. Special care is taken for templatized * types. */ private void emitNoResolvedTypeOrDefault(NoType type, String defaultEmit) { if (!opts.partialInput || !type.isNoResolvedType()) { emit(defaultEmit); return; } // When processing partial inputs, this case handles implicitly forward declared types // for which we just emit the literal type written along with any type parameters. NoResolvedType nType = (NoResolvedType) type; // TODO(rado): Find a case where this happens for extends/implements and add // a test for it. if (nType.getReferenceName() == null) { emit(defaultEmit); return; } emitNoResolvedTypeAsumingForwardDeclare(type); }
NoType noType = new NoType(this); registerNativeType(JSTypeNative.NO_TYPE, noType);
@Override public boolean isSubtype(JSType that) { return isSubtype(that, null); }