docs(README.md): update info about type spread operator in TS #69
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.
Refs: #2, #46
If you look at the example mentioned in #2, you will see it still raises an error with TS v3.8.2: https://www.typescriptlang.org/play/index.html#src=interface%20Congealed%3CT%2C%20U%3E%20%7B%0D%0A%20%20%20%20...T%0D%0A%20%20%20%20...U%0D%0A%7D
That's because the original PR dropped the support for type spread and kept only the object spread. Also to my understanding, the PR currently mentioned under the "shipped" link for TypeScript (microsoft/TypeScript#28234) is concerned only about spread in object literals, not types.
More examples: TypeScript vs. Flow (the Flow version uses exact types, which is usually a prerequisite for using object spread).
I have changed the relevant row for object type spread and added a new section section under "Flow-only concepts".