in src/object-spec-creation.ts [275:315]
export function fileWriteRequest(
request: Request,
plugins: List.List<ObjectSpec.Plugin>,
): Either.Either<Error.Error[], FileWriter.FileWriteRequest> {
const pluginsToRun = pluginsToRunForValueType(
plugins,
request.typeInformation,
);
const wrappedPlugins: List.List<ObjectSpecObjCPlugIn> = List.map(
objcPluginForObjectSpecPlugin,
pluginsToRun,
);
const typeInfoProvider: PluggableObjCFileCreation.ObjCGenerationTypeInfoProvider<ObjectSpec.Type> =
{
additionalTypesForType: (type) =>
additionalTypesForType(pluginsToRun, type),
typeNameForType: typeNameForType,
commentsForType: commentsForType,
visibilityForType: visibilityForType,
};
const requestWithUpdatedType = {
diagnosticIgnores: request.diagnosticIgnores,
baseClassLibraryName: request.baseClassLibraryName,
baseClassName: request.baseClassName,
path: request.path,
outputPath: request.outputPath,
outputFlags: request.outputFlags,
typeInformation: typeInformationWithAllAttributesFromPlugins(
request.typeInformation,
pluginsToRun,
),
};
return PluggableObjCFileCreation.fileWriteRequest(
requestWithUpdatedType,
typeInfoProvider,
wrappedPlugins,
);
}