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

Fix Typescript compilation for 4.6.3

Open steaks opened this issue 1 year ago • 0 comments

By submitting a PR to this repository, you agree to the terms within the Auth0 Code of Conduct. Please see the contributing guidelines for how to create and submit a high-quality PR for this repo.

Description

Fixes #811. This PR fixes compilation for on Typescript 4.6.3. It still works on 4.9.

I tried the simplest solution - casting the variable to the known type.

References

Include any links supporting this change such as a:

-#811

  • Auth0 Community post
  • StackOverflow post
  • Support forum thread
  • Related pull requests/issues from other repos

If there are no references, simply delete this section.

Testing

  1. Change typescript version to 4.6.3 in package.json
  2. Change moduleResolution to node in tsconfig.json
  3. npm install (may need to clean first)
  4. npx tsc -b
  5. See no compilation errors

Developed on Ubuntu 22.04.5 LTS. Tested in Chrome 129.0.6668.58 (Official Build) (64-bit). Tested in Firefox 131.0.3 (64-bit).

Checklist

  • [x] I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • [x] All active GitHub checks for tests, formatting, and security are passing
  • [x] The correct base branch is being used, if not the default branch

steaks avatar Oct 21 '24 02:10 steaks