Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add default to PageRoute type parameter #632

Merged
merged 1 commit into from
Apr 4, 2022

Conversation

grantbdev
Copy link
Contributor

Description

Add default to PageRoute type parameter to match the default for the WithPageAuthRequiredOptions type and make it easier for the generic type to be used.

The generic type arguments for URL queries were added here: #554 and these changes were released in v1.7.0.

For codebases that were already importing the PageRoute type, the introduction of the new required type argument failed type-checking with this error:

Generic type 'PageRoute' requires 2 type argument(s). ts(2314)

It is easily fixed by providing a value for the new type argument, but by adding the default into this package it makes it easier for users of the package since they do not have to update their codebases.

Testing

Since this is a modification of the type definition, no tests have been added.

  • This change adds test coverage for new/changed/fixed functionality

Checklist

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

Add default to PageRoute type parameter
to match the default for the WithPageAuthRequiredOptions type
and make it easier for the generic type to be used.
@grantbdev grantbdev requested a review from a team as a code owner April 1, 2022 21:49
@vercel
Copy link

vercel bot commented Apr 1, 2022

@grantbdev is attempting to deploy a commit to the Auth0 Team on Vercel.

A member of the Team first needs to authorize it.

@adamjmcgrath adamjmcgrath merged commit 0a452f9 into auth0:main Apr 4, 2022
@adamjmcgrath
Copy link
Contributor

Thanks @grantbdev!

@adamjmcgrath adamjmcgrath mentioned this pull request May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants