export enum Cluster { ARC = "arc" , GENERIC = "generic" } param str returns export const parseCluster = ( str ) : Cluster | undefined => Cluster [ Object . keys ( Cluster ) . filter ( ( k ) => Cluster [ k ] . toString ( ) . toLowerCase ( ) === str . toLowerCase ( ) ) [ 0 ] as keyof typeof Cluster ] ;