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
fix(angular): Support strict: true
#890
Conversation
🦋 Changeset detectedLatest commit: 8964373 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
loginMechanisms: Required<AuthContext>['config']['loginMechanisms']; | ||
socialProviders: Required<AuthContext>['config']['socialProviders']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is adding Required
going to cause any of the frameworks to complain if these props aren't passed into the authenticator
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, because the parent machine have default values for loginMechanisms
and socialProviders
even if these props weren't passed by the end user:
amplify-ui/packages/ui/src/machines/authenticator/index.ts
Lines 164 to 172 in 8964373
loginMechanisms: loginMechanisms ?? cliLoginMechanisms, | |
signUpAttributes: | |
signUpAttributes ?? | |
Array.from( | |
new Set([ | |
...cliVerificationMechanisms, | |
...cliSignUpAttributes, | |
]) | |
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Issue #, if available: Fixes #889
Description of changes: This sets
strict
to true onexamples/angular
, as it is defaults totrue
on Angular 12+. Also refreshesyarn.lock
to get aws-amplify/amplify-js#8984 patch.Resolves the following errors:
'aws-exports.js' implicitly has an 'any' type
Element implicitly has an 'any' type because index expression is not of type 'number'.
Property 'socialProviders' does not exist on type '{ loginMechanisms?: ("username" | "email" | "phone_number")[] | undefined; signUpAttributes?: SignUpAttribute[] | undefined; socialProviders?: SocialProvider[] | undefined; } | undefined'.
Could not find a declaration file for module 'graphql/error/GraphQLError'
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.