We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Actually, it is as simple as
import dotProp from 'dot-prop-immutable' export function pick<T> (el: T, select: (string | number)[]): Partial<T> { let p = {} as Partial<T> select.map((k) => { p = dotProp.set(p, k, dotProp.get(el, k)) }) return p } export function omit<T> (el: T, deSelect: (string | number)[]): Partial<T> { let p = el as Partial<T> deSelect.map((k) => { p = dotProp.delete(el, k) }) return p }
However, I cannot make it strongly typed for select / deSelect that contains no dot...
select
deSelect
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Actually, it is as simple as
However, I cannot make it strongly typed for
select
/deSelect
that contains no dot...The text was updated successfully, but these errors were encountered: