Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function complexScalarTypeNames(spec: schema.ScalarProperty): string[] {
if (schema.isComplexProperty(spec) && !schema.isListProperty(spec) && !schema.isMapProperty(spec)) {
return [spec.Type];
} else if (schema.isUnionProperty(spec)) {
return spec.Types || [];
}
return [];
}