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

types: avoid ts-expect-error on generateServiceProviderMetadata #510

Conversation

midgleyc
Copy link
Contributor

@midgleyc midgleyc commented Dec 7, 2020

Description

In multiSamlStrategy, generateServiceProviderMetadata currently changes the signature from the base class, and uses a ts-expect-error so that compilation continues to work. However, the type files show errors because the subclass is no longer an instance of its base class.

This adds an overload to generateServiceProviderMetadata taking the original arguments and returning "never", while the implementation still checks the type of the callback to confirm we're using the right call.

Checklist:

  • Issue Addressed: [x]
  • Link to SAML spec: [ ]
  • Tests included? [ ]
  • Documentation updated? [ ]

@gugu
Copy link
Contributor

gugu commented Dec 7, 2020

I vote for #508 as it does not alter the base class

@gugu
Copy link
Contributor

gugu commented Dec 15, 2020

#508 is merged in master branch

@midgleyc midgleyc force-pushed the dont-expect-error-generateServiceProviderMetadata branch from 6d0e220 to 509e883 Compare December 15, 2020 11:22
@cjbarth
Copy link
Collaborator

cjbarth commented Dec 21, 2020

@midgleyc , did #508 fix your problem? Can this be closed?

@midgleyc
Copy link
Contributor Author

Sure, ignoring the error in the type file too works.

@cjbarth cjbarth closed this Dec 22, 2020
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.

3 participants