3 ms·
TypeScript 2.8, due next month, is shaping up to be an interesting release! It introduces a feature called "conditional types [0]" which opens up a lot of type-
by AriaMinaei 9y ago
TypeScript 2.8, due next month, is shaping up to be an interesting release! It introduces a feature called "conditional types [0]" which opens up a lot of type-level programming opportunities.
Flow also has the `$Call<>` type (type-level function application), but unfortunately as with most of its features, it didn't go through community testing/input before release, and thus it has bugs that render it useless for what I assume to be very common use-cases.
[0] https://github.com/Microsoft/TypeScript/pull/21316 https://github.com/Microsoft/TypeScript/pull/21316
- mpawelski 9y agoJust curious, what are the problems/bugs with `$Call<>` that you are talking about? note: I only used TypeScript, not Flow)
- AriaMinaei 9y agoI think this demonstrates some of the bugs: https://flow.org/try/#0PTAEAEDMBsHsHcBQiCWA7ALgUwE6QIYDGWoASlkRigG5YDyARgFYA8dAXKAN4C+AfN0ShQABxywRLANKcAJFKwBPAM5s+fABRSAlHIDC+aNBYARLIRQATLABVFIrABpQsgKLQsAWyyY7Dts5S6og8yOjYeEQk5JQ0WACCODj4iiwAagJcQqDo1gAeGmgArp4MuLouBkam5la29k6gGSFhmLgExGQUhFS0AEKweemZ2UVoDIMaFWktiBgNoGYW1n4kALzZAGSgGmycvJp02qBrAjE9cYysdHzaWzvpzvGcicmpGZrxx6ddsbSvKWGd2E212GQ0aW+Z26vSwAyGGW0AG5kPMHKAbFhlBgruYMCdBMJsThOMT0ABzRzZWDMfbZIkYHAASTQV1JjIpVOEwmKpVwLLZoF5ZRwXO5+CSKQFtNAANSwtwfDFoR4KLmC0x2NxPXOVEgKCwlgJsiqxiWdVWzk1OOYeL4aushGgEpI1AloGwWpl1u1GF1KH1hrVGk9NqYADoxBINAByYkxir+-qDFhktDk25qkAuABicHgrjyDh6riSsBwGIAFihlKBoOgSIR8EVlFiPfBYKBWyIJfhsKBcOIcMpnLA0NBFKAxyRYJBQPBq4RK6ByVgMLXlCgPGhiJZECGsWHI+IRLH44mYXF4SwFThM8hszZqxvK7AitAjWhYPiyqB8GgBzLUVQAYIp8RQcDlHYfdQyuY9oxjGkmATeDTzjRlpWQ7RkQfMAnxrLtX3fI1DGUTse2UEcQLAnJ8UsWAsTQGMMGgg8vQjKM0KQlDONjW9MITTgkzhFNb3vRBs1kPMEELYsMFLIcqwIwdyyo0D8UgcsPUrEh4HEdNQBwCgyLQVjYOYVDY247RLJjfjWWYQTfguZMhjTDMcKAA https://flow.org/try/#0PTAEAEDMBsHsHcBQiCWA7ALgUwE6QIYDGWoAS...