10000 Add docs for Record flow types by leebyron · Pull Request #1343 · immutable-js/immutable-js · GitHub
[go: up one dir, main page]

Skip to content

Add docs for Record flow types #1343

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

Merged
merged 1 commit into from
Oct 5, 2017
Merged

Add docs for Record flow types #1343

merged 1 commit into from
Oct 5, 2017

Conversation

leebyron
Copy link
Collaborator
@leebyron leebyron commented Oct 5, 2017

Added a section to the Record documentation describing how to use RecordFactory<T> and RecordOf<T> and updated some flow tests to better match those usages.

Added a section to the Record documentation describing how to use `RecordFactory<T>` and `RecordOf<T>` and updated some flow tests to better match those usages.
* **Flow Typing Records:**
*
* Immutable.js exports two Flow types designed to make it easier to use
* Records with flow typed code, `RecordOf<T>` and `RecordFactory<T>`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh my gosh, thank you I've been hoping for this.

*
* // Use RecordOf<T> for defining new instances of that Record.
* export type Point3D = RecordOf<Point3DFields>;
* const some3DPoint: Point3D = makePoint3D({ x: 10, y: 20, z: 30 });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check it out @peggyrayzis! Well typed Records!

Copy link
Contributor
@rgbkrk rgbkrk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These examples make perfect sense to me! Thank you.

@leebyron
Copy link
Collaborator Author
leebyron commented Oct 5, 2017

Thanks for the extra pair of eyes, @rgbkrk!

@leebyron leebyron merged commit a976172 into master Oct 5, 2017
@leebyron leebyron deleted the record-flow-type-docs branch October 5, 2017 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0