Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export async function selectObjectType(
parentType?: string
): Promise {
const rawtypes = [...CreatableTypes.values()].sort(fieldOrder("label"))
const types = parentType
? rawtypes.filter(t => parentTypeId(t.typeId) === parentType)
: rawtypes
return window.showQuickPick(types.length > 0 ? types : rawtypes)
}