function importsForBuilder()

in src/plugins/builder.ts [363:417]


function importsForBuilder(
  objectType: ObjectSpec.Type,
  forBaseFile: boolean,
): ObjC.Import[] {
  const typeLookupImports: ObjC.Import[] =
    importsForTypeLookupsOfObjectType(objectType);

  const makePublicImports = makePublicImportsForValueType(objectType);
  const skipAttributeImports =
    !makePublicImports &&
    objectType.includes.indexOf('SkipImportsInImplementation') !== -1;

  const attributeImports: ObjC.Import[] = skipAttributeImports
    ? []
    : objectType.attributes
        .filter((attribute) =>
          ObjCImportUtils.shouldIncludeImportForType(
            objectType.typeLookups,
            attribute.type.name,
          ),
        )
        .map(function (attribute: ObjectSpec.Attribute): ObjC.Import {
          return ObjCImportUtils.importForAttribute(
            attribute.type.name,
            attribute.type.underlyingType,
            attribute.type.libraryTypeIsDefinedIn,
            attribute.type.fileTypeIsDefinedIn,
            objectType.libraryName,
            false,
          );
        });

  return [
    {
      file: 'Foundation.h',
      isPublic: true,
      requiresCPlusPlus: false,
      library: 'Foundation',
    },
    {
      file: objectType.typeName + '.h',
      isPublic: false,
      requiresCPlusPlus: false,
      library: objectType.libraryName,
    },
    ...conditionallyAddToSpread(!forBaseFile, {
      file: nameOfBuilderForValueTypeWithName(objectType.typeName) + '.h',
      isPublic: false,
      requiresCPlusPlus: false,
      library: null,
    }),
  ]
    .concat(typeLookupImports)
    .concat(attributeImports);
}