Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return typeNames.reduce((items, typeName) => {
const schemaType = schema.get(typeName)
if (!isActionEnabled(schemaType, 'create')) {
return items
}
return items.concat(
getParameterlessTemplatesBySchemaType(typeName).map(
(tpl): InitialValueTemplateItem => ({
type: 'initialValueTemplateItem',
id: tpl.id,
templateId: tpl.id
})
)
)
}, templateItems)
}