Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.map(enumOption => {
let enumValue: string = (enumOption.name as any) as string;
const comment = transformComment((enumOption.description as any) as string, 1);
if (this.config.enumValues[enumName] && this.config.enumValues[enumName].mappedValues && this.config.enumValues[enumName].mappedValues[enumValue]) {
enumValue = this.config.enumValues[enumName].mappedValues[enumValue];
}
return comment + indent(wrapWithSingleQuotes(enumValue));
})
.join(' |\n')
.map(enumOption => {
const comment = transformComment((enumOption.description as any) as string, 1);
const optionName = this.convertName(enumOption, { transformUnderscore: true, useTypesPrefix: false });
let enumValue: string = (enumOption.name as any) as string;
if (this.config.enumValues[typeName] && this.config.enumValues[typeName].mappedValues && this.config.enumValues[typeName].mappedValues[enumValue]) {
enumValue = this.config.enumValues[typeName].mappedValues[enumValue];
}
return comment + indent(`${optionName}: ${wrapWithSingleQuotes(enumValue)}`);
})
.join(', \n')