in src/pluggable-objc-file-creation.ts [706:747]
function createClassIfNecessary(
classMethods: ObjC.Method[],
instanceMethods: ObjC.Method[],
properties: ObjC.Property[],
instanceVariables: ObjC.InstanceVariable[],
functions: ObjC.Function[],
implementedProtocols: ObjC.ImplementedProtocol[],
comments: string[],
typeName: string,
baseClassName: string,
nullability: ObjC.ClassNullability,
subclassingRestricted: boolean,
visibility: ObjC.ClassVisibility | undefined,
): ObjC.Class | null {
if (
classMethods.length > 0 ||
instanceMethods.length > 0 ||
properties.length > 0 ||
instanceVariables.length > 0 ||
implementedProtocols.length > 0 ||
subclassingRestricted
) {
return {
baseClassName: baseClassName,
covariantTypes: [],
comments: ObjCCommentUtils.commentsAsBlockFromStringArray(comments),
classMethods: classMethods,
functions: functions,
inlineBlockTypedefs: [],
instanceMethods: instanceMethods,
name: typeName,
properties: properties,
instanceVariables: instanceVariables,
implementedProtocols: implementedProtocols,
nullability: nullability,
subclassingRestricted: subclassingRestricted,
visibility: visibility,
};
}
return null;
}