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

ConditionalPickDeep does not work with deep interfaces #773

Closed
ozum opened this issue Nov 30, 2023 · 0 comments · Fixed by #776
Closed

ConditionalPickDeep does not work with deep interfaces #773

ozum opened this issue Nov 30, 2023 · 0 comments · Fixed by #776

Comments

@ozum
Copy link

ozum commented Nov 30, 2023

Hi,

If the deep property is an interface, ConditionalPickDeep does not pick the nested attribute.

Example:

type S = "SOME STRING";

interface B {
  b: S;
}

interface C {
  b: B;
  c: S;
}

type Test = ConditionalPickDeep<C, S>;

// Expected: type Test = { b: B, c: S }
// Actual: type Test = { c: S }

However the code below works as expected:

type S = "SOME STRING";

type B = {
  b: S;
}

interface C {
  b: B;
  c: S;
}

type Test = ConditionalPickDeep<C, S>;

// Expected: type Test = { b: B, c: S }
// Actual: type Test = { b: B, c: S }

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • The funding will be given to active contributors.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
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 a pull request may close this issue.

1 participant