Skip to content

fix: omit endpoint polymorphs from resolved config types #1626

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

Merged
merged 1 commit into from
Jun 23, 2025

Conversation

kuhe
Copy link
Contributor

@kuhe kuhe commented Jun 20, 2025

EndpointResolvedConfig is now universal for all clients. In it, endpoint?: Provider<Endpoint> is declared.

Because the input type of endpoint is ?: string | Provider<string> | Endpoint | Provider<Endpoint> | EndpointV2 | Provider<EndpointV2> the resolved type combining the EndpointResolvedConfig and ClientResolvedEndpointParameters is then

(string | Provider<string> | Endpoint | Provider<Endpoint> | EndpointV2 | Provider<EndpointV2>) & Provider<Endpoint>

This is confusingly verbose, and functionally equivalent to simply Provider<Endpoint> due to intersection. Omitting the field from the resolved config will allow the type to simply be Provider<Endpoint>.

@kuhe kuhe requested a review from a team as a code owner June 20, 2025 19:44
@kuhe kuhe merged commit dec7fbb into smithy-lang:main Jun 23, 2025
11 checks passed
@kuhe kuhe deleted the fix/endpoint-params branch June 23, 2025 13:33
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