react-aad
react-aad copied to clipboard
Use string literal type for AuthenticationState
trafficstars
Is your feature request related to a problem? Please describe.
Not a problem per se, but VSCode gives much nicer intellisense for string literal types over enums. It also looks cleaner when writing the code rather than having AuthenticationState.Authenticated, you have 'Authenticated' string literal.
Describe the solution you'd like Change:
export enum AuthenticationState {
Unauthenticated = 'Unauthenticated',
InProgress = 'InProgress',
Authenticated = 'Authenticated',
}
to
export type AuthenticationState = 'Unauthenticated' | 'InProgress' | 'Authenticated';
Describe alternatives you've considered N/A
Additional context