react-aad icon indicating copy to clipboard operation
react-aad copied to clipboard

Change AuthenticationState to string literal type

Open jamiehaywood opened this issue 5 years ago • 0 comments
trafficstars

Purpose

  • VSCode gives much nicer intellisense for string literal types over enums.
  • It looks cleaner when writing the code rather than having AuthenticationState.Authenticated, you have 'Authenticated' string literal.
  • No need for an import of the enum, because intellisense infers the type.

Does this introduce a breaking change?

[ ] Yes
[x] No

Pull Request Type

What kind of change does this Pull Request introduce?

[ ] Bugfix
[x] Feature
[xd] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[x] Documentation content changes
[ ] Other... Please describe:

Other Information

This shouldn't be a breaking change, because:

AuthenticationState.Authenticated === 'Authenticated' // true

jamiehaywood avatar Oct 08 '20 16:10 jamiehaywood