Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function getPropInfoByPropName (propName: string): propInfo.PropInfo {
const all = Object.values(propInfo.all)
const prop = all.find(info => {
return info.propertyName == propName
})
if (prop == null) {
throw new Error(`Property "${propName}" does not exist.`)
}
return prop
}