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 #438

Closed
dninomiya opened this issue Aug 17, 2022 · 4 comments · Fixed by #444
Closed

ConditionalPickDeep #438

dninomiya opened this issue Aug 17, 2022 · 4 comments · Fixed by #444
Labels
help wanted Extra attention is needed type addition

Comments

@dninomiya
Copy link

Would it be possible to consider adding a deep option?
Thanks for the useful library.

import type {ConditionalPick} from 'type-fest';

interface Example {
	a: string;
	b: string | number;
	c: {
		d: string;
	}
}

type StringKeysOnly = ConditionalPick<Example, string, {deep: true}>;
//=> {a: string, {c: {d: string}}}

Thanks for the useful library.

@skarab42
Copy link
Collaborator

Yes I think it could be useful I'll see what I can do.

@sindresorhus
Copy link
Owner

Sounds useful, but it should be a separate type: ConditionalPickDeep.

@sindresorhus sindresorhus added help wanted Extra attention is needed type addition labels Aug 25, 2022
@sindresorhus sindresorhus changed the title Suggestion: deep option of ConditionalPick ConditionalPickDeep Aug 25, 2022
@skarab42
Copy link
Collaborator

@dninomiya @sindresorhus Done in #444

@dninomiya
Copy link
Author

@skarab42 @sindresorhus
appreciate!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed type addition
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants