refactor: Renamed emitObject to emitGenericObject#35981
Closed
vzaidman wants to merge 3 commits into
Closed
Conversation
Summary: Pull Request resolved: facebook#35961 Pull Request resolved: facebook#35960 This fixes facebook#35864 This feature allows using `$Partial<Obj>` in flow and `Partial<Obj>` in TypeScript based on the spec mentioned here: https://flow.org/en/docs/types/utilities/#toc-partial. We currently only allow passing an Obj to Partial so ``` export type SomeObj = { a: string, b?: boolean, }; export type PartialSomeObj = Partial<SomeObj>; ``` should work. and also- ``` export type PartialSomeObj = Partial<{ a: string, b?: boolean, }>; ``` But not ``` export type PartialSomeObj = Partial<Partial<{ a: string, b?: boolean, }>>; ``` This can be improved in the future by a recursive unwrapping of the value inside the `Partial` annotation. Changelog: [General] [Added] - Allow the use of "Partial<T>" in Turbo Module specs. Reviewed By: christophpurrer, cipolleschi Differential Revision: D42640880 fbshipit-source-id: e0b863c6863c312cc7b77438b326bfa5ed845d33
Summary: This reflects better what the former `emitObject` was doing - emitting a generic object. It would also allow us to rename `emitPartial` to `emitObject` in the next diff whence the function name `emitObject` will be free. Changelog [Internal] [Changed] - Renamed emitObject to emitGenericObject Reviewed By: christophpurrer Differential Revision: D42740871 fbshipit-source-id: e9900a6e0441fe0a9278eca0b3d5bf95653706cf
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D42740871 |
Base commit: eaf465d |
vzaidman
added a commit
to vzaidman/react-native
that referenced
this pull request
Jan 30, 2023
Summary: Pull Request resolved: facebook#35981 This reflects better what the former `emitObject` was doing - emitting a generic object. It would also allow us to rename `emitPartial` to `emitObject` in the next diff whence the function name `emitObject` will be free. ## Changelog: [Internal] [Changed] - Renamed emitObject to emitGenericObject Reviewed By: christophpurrer Differential Revision: D42740871 fbshipit-source-id: 4598182b77467c4c84d1c9a2fc5d1a177b267d69
facebook-github-bot
pushed a commit
that referenced
this pull request
Jan 30, 2023
Summary: Pull Request resolved: #35981 This reflects better what the former `emitObject` was doing - emitting a generic object. It would also allow us to rename `emitPartial` to `emitObject` in the next diff whence the function name `emitObject` will be free. Changelog: [Internal] - Renamed emitObject to emitGenericObject Reviewed By: christophpurrer Differential Revision: D42740871 fbshipit-source-id: 1b9112464695b8abeccc95eed908b0b45a0e3bf2
|
This pull request was successfully merged by @vzaidman in 84c1547. When will my fix make it into a release? | Upcoming Releases |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
This reflects better what the former
emitObjectwas doing - emitting a generic object.It would also allow us to rename
emitPartialtoemitObjectin the next diff whence the function nameemitObjectwill be free.Changelog:
[Internal] [Changed] - Renamed emitObject to emitGenericObject
Reviewed By: christophpurrer
Differential Revision: D42740871