Skip to content

Conversation

jnv
Copy link
Contributor

@jnv jnv commented Feb 28, 2020

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".

@jnv jnv changed the title Type spread operator is not supported by TypeScript docs(README.md): update info about type spread operator in TS Feb 28, 2020
@niieani niieani merged commit 848af47 into niieani:master Feb 29, 2020
@niieani
Copy link
Owner

niieani commented Feb 29, 2020

Awesome!

Díky moc @jnv! 🙇

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