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 getObjectDetails(uri: Uri | undefined): Promise<details> {
const hierarchy = this.getHierarchy(uri)
let devclass: string = this.guessParentByType(hierarchy, PACKAGE)
const objType = await this.guessOrSelectObjectType(hierarchy)
// user didn't pick one...
if (!objType) return
const name = await this.askName(objType.typeId)
if (!name) return
const description = await this.askInput("description", false)
if (!description) return
const responsible = this.server.client.username.toUpperCase()
const parentType = parentTypeId(objType.typeId)
let parentName
if (parentType !== PACKAGE) {
parentName = this.guessParentByType(hierarchy, "FUGR/F")
if (!parentName) [parentName, devclass] = await this.askParent(parentType)
if (!parentName) return
}
if (!devclass) {
const packageResult = await this.server.objectFinder.findObject(
"Select package",
PACKAGE
)
if (!packageResult) return
devclass = packageResult.name
}
if (parentType === PACKAGE) parentName = devclass</details>
? rawtypes.filter(t => parentTypeId(t.typeId) === parentType)
: rawtypes