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

add RecursivePartial #14

Open
uladkasach opened this issue Jun 13, 2023 · 0 comments
Open

add RecursivePartial #14

uladkasach opened this issue Jun 13, 2023 · 0 comments

Comments

@uladkasach
Copy link
Member

/**
 * a type declaration for recursive partial values
 */
type RecursivePartial<T> = {
  [P in keyof T]?: T[P] extends (infer U)[]
    ? RecursivePartial<U>[]
    : T[P] extends object | undefined
    ? RecursivePartial<T[P]>
    : T[P];
};

https://stackoverflow.com/a/51365037/3068233

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

No branches or pull requests

1 participant