Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private async validateObject(objDetails: NewObjectOptions) {
let validateOptions: ValidateOptions
if (isGroupType(objDetails.objtype))
validateOptions = {
description: objDetails.description,
fugrname: objDetails.parentName,
objname: objDetails.name,
objtype: objDetails.objtype as GroupTypeIds
}
else if (objDetails.objtype === PACKAGE && hasPackageOptions(objDetails)) {
validateOptions = {
description: objDetails.description,
objname: objDetails.name,
objtype: objDetails.objtype as PackageTypeId,
packagename: objDetails.parentName,
swcomp: objDetails.swcomp,
packagetype: objDetails.packagetype,
transportLayer: objDetails.transportLayer
}
} else
validateOptions = {
description: objDetails.description,
objname: objDetails.name,
objtype: objDetails.objtype as NonGroupTypeIds,
packagename: objDetails.parentName
}