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

Support the Pick utility type for a prop #414

Merged
merged 1 commit into from
Oct 19, 2023
Merged

Support the Pick utility type for a prop #414

merged 1 commit into from
Oct 19, 2023

Conversation

nmanu1
Copy link
Contributor

@nmanu1 nmanu1 commented Oct 18, 2023

This PR adds support for the Pick TypeScript utility type when defining the type of a prop in a component's prop interface. As mentioned in the previous PR, utility types are still not allowed when defining the overall type of the component's prop interface (i.e. props: Pick<MyProps, "blah">).

J=SLAP-2968
TEST=auto, manual

In the test site, see that using Pick<ObjectProp, "nestedBool"> instead of ObjectProp for the type of obj in BannerData correctly results in the prop editor for nestedBool being the only one that appears in the UI for that prop.

@nmanu1 nmanu1 merged commit b3b57a7 into main Oct 19, 2023
@nmanu1 nmanu1 deleted the dev/pick-utility branch October 19, 2023 15:00
@alextaing alextaing mentioned this pull request Oct 24, 2023
alextaing added a commit that referenced this pull request Oct 24, 2023
## Features
- We have introduced Collapsible Sidebars (#408).
- We now support aliased type imports (#411).
- The TypeScript utility types Omit, Pick, and Required are now
supported for props in a component's prop interface (#413, #414, #415).
- The Studio Preview can now display CSS and SCSS styling.
@alextaing alextaing mentioned this pull request Oct 30, 2023
alextaing added a commit that referenced this pull request Oct 30, 2023
## Features
- We have introduced Collapsible Sidebars (#408).
- We now support aliased type imports (#411).
- The TypeScript utility types Omit, Pick, and Required are now
supported for props in a component's prop interface (#413, #414, #415).
- The Studio Preview can now display CSS and SCSS styling (#418).
- Undo keyboard shortcuts (`cmd+z` for OS X, and `ctrl+z` for other
OSes) are now supported in Studio (#417).

## Changes
- `_server.tsx` and `_client.tsx` are now reserved template names for
PagesJS Repos (#423).

## Fixes
- Miscellaneous viewport bugs have been fixed (#424).
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 this pull request may close these issues.

2 participants