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

Incorrect return type for extract method #4335

Open
ben-tilden opened this issue Jan 5, 2025 · 0 comments
Open

Incorrect return type for extract method #4335

ben-tilden opened this issue Jan 5, 2025 · 0 comments

Comments

@ben-tilden
Copy link

Description

The return type for extract is derived incorrectly which leads to typing inconsistencies.

A fix is already open for review.

In the ExtractedValue type, V['value'] is not distributed across conditionals as expected, leading to incorrect typing for extract's return type.

Current Behavior

type Value = ExtractedValue<ExtractValue, ExtractMap> is string | string[] | undefined.

Expected Behavior

type Value = ExtractedValue<ExtractValue, ExtractMap> should be unknown, based on ExtractDescriptorFn's unknown return type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant