export enum Method { KUBECONFIG = "kubeconfig" , SERVICE_ACCOUNT = "service-account" , SERVICE_PRINCIPAL = "service-principal" } param str returns export const parseMethod = ( str ) : Method | undefined => Method [ Object . keys ( Method ) . filter ( ( k ) => Method [ k ] . toString ( ) . toLowerCase ( ) === str . toLowerCase ( ) ) [ 0 ] as keyof typeof Method ] ;