-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 doc details for $Shape. #6694
Conversation
@@ -578,6 +578,23 @@ function makeParamStore<T>(storeClass: Class<ParamStore<T>>, data: T): ParamStor | |||
(makeParamStore(ParamStore, 1): ParamStore<boolean>); // failed because of the second parameter | |||
``` | |||
|
|||
## `Shape<T>` <a class="toc" id="toc-shape" href="#toc-shape"></a> | |||
|
|||
Copies the shape of the type supplied, but marks every field optional. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe not use "Shape" in the definition of "Shape"? How does "Copies an existing type and makes each of its properties optional" sound?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
User is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: Docs for `$Shape` were introduced in facebook#6694, but that PR had three major errors: - the section was not linked from the table of contents - the type `$Shape<T>` was misspelled as `Shape<T>` in the header - the code block was not terminated, so the entirety of the rest of the page was marked as code, [like this][1]—clearly no one previewed the page before deploying! [1]: https://archive.fo/CqH7D#87% Test Plan: After much effort, managed to get the website to build locally. Visited <http://localhost:8080/en/docs/types/utilities/#toc-shape> and checked that the three issues mentioned above are all fixed. wchargin-branch: fix-shape-docs
Summary: Docs for `$Shape` were introduced in facebook#6694, but that PR had three major errors: - the section was not linked from the table of contents - the type `$Shape<T>` was misspelled as `Shape<T>` in the header - the code block was not terminated, so the entirety of the rest of the page was marked as code, [like this][1]—clearly no one previewed the page before deploying! [1]: https://archive.fo/CqH7D#87% Closes facebook#6692. Test Plan: After much effort, managed to get the website to build locally. Visited <http://localhost:8080/en/docs/types/utilities/#toc-shape> and checked that the three issues mentioned above are all fixed. (For posterity, steps taken to get the build working are listed here: <facebook#6708 (comment)>.) wchargin-branch: fix-shape-docs
Summary: Docs for `$Shape` were introduced in facebook#6694, but that PR had four major errors: - the section was not linked from the table of contents; - the type `$Shape<T>` was misspelled as `Shape<T>` in the header; - the code block did not have `// @flow`, so lacked error annotations; - the code block was not terminated, so the entirety of the rest of the page was marked as code, [like this][1]—clearly no one previewed the page before deploying! [1]: https://archive.fo/CqH7D#87% This patch fixes those errors. While in the area, we clean up the comments reading "Error" and "OK" to (a) eliminate the horizontal scrollbar and (b) match the style elsewhere on the page. Closes facebook#6692. Test Plan: After much effort, managed to get the website to build locally. Visited <http://localhost:8080/en/docs/types/utilities/#toc-shape> and checked that the four issues mentioned above are all fixed. (For posterity, steps taken to get the build working are listed here: <facebook#6708 (comment)>.) wchargin-branch: fix-shape-docs
Summary: Docs for `$Shape` were introduced in #6694, but that PR had four major errors: - the section was not linked from the table of contents; - the type `$Shape<T>` was misspelled as `Shape<T>` in the header; - the code block did not have `// flow`, so lacked error annotations; - the code block was not terminated, so the entirety of the rest of the page was marked as code, [like this][1]—clearly no one previewed the page before deploying! [1]: https://archive.fo/CqH7D#87% This patch fixes those errors. While in the area, we clean up the comments reading "Error" and "OK" to (a) eliminate the horizontal scrollbar and (b) match the style elsewhere on the page. Closes #6692. Pull Request resolved: #6708 Reviewed By: panagosg7 Differential Revision: D9249420 Pulled By: jbrown215 fbshipit-source-id: a54de957c5ac744ce7c483c4be0cbfd182dfee02
No description provided.