We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Partial
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
Hey @mattpocock . Thanks for your effort and time spent on this course. I'd suggest adding Partial Example. What do you think of that?
/** * How do we make _only_ the id property mandatory? */ interface User { id: string; firstName: string; lastName: string; address: string; age: number; sex: string; } /** * Answer1 - optional properties */ interface User { id: string; firstName?: string; lastName?: string; address?: string; age?: number; sex?: string; }; /** * Answer2 - Partial properties */ interface User { id: string; } & Partial<{ firstName: string; lastName: string; address: string; age: number; sex: string; }>
The text was updated successfully, but these errors were encountered:
Thanks for the suggestion, but this will likely live in a separate module.
Sorry, something went wrong.
No branches or pull requests
Hey @mattpocock .
Thanks for your effort and time spent on this course.
I'd suggest adding
Partial
Example.What do you think of that?
The text was updated successfully, but these errors were encountered: