Skip to content

Use string literal type for AuthenticationState #279

@jamiehaywood

Description

@jamiehaywood

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions