static ImmutableSet<ObjectType> withPropertyRequired(Set<ObjectType> objs, String pname) {
   ImmutableSet.Builder<ObjectType> newObjs = ImmutableSet.builder();
   for (ObjectType obj : objs) {
     newObjs.add(obj.withPropertyRequired(pname));
   }
   return newObjs.build();
 }
Esempio n. 2
0
 public JSType withPropertyRequired(String pname) {
   return (isUnknown() || this.objs == null)
       ? this
       : new JSType(
           this.mask, this.location, ObjectType.withPropertyRequired(this.objs, pname), typeVar);
 }