const AlertNotifyWhenTypeValues = [ 'onActionGroupChange' , 'onActiveAlert' , 'onThrottleInterval' , ] as const ; export type AlertNotifyWhenType = typeof AlertNotifyWhenTypeValues [ number ] ; export function validateNotifyWhenType ( notifyWhen ) { if ( AlertNotifyWhenTypeValues . includes ( notifyWhen as AlertNotifyWhenType ) ) { return ; } return `string is not a valid AlertNotifyWhenType: ${ notifyWhen }` ; }