Commit graph

8 commits

Author SHA1 Message Date
Ron Buckton e8bf9584aa
Improve type checking and inference for Generators and Async Generators (#30790)
* Improve typing for Generators and Async Generators

* Add TReturn and TNext to Iterator, IterableIterator, etc.

* Update ts internal Iterator to be assignable from global Iterator

* Make 'done' optional in IteratorYieldResult

* Revert Iterable and IterableIterator to simpler versions plus other fixes

* Add additional inference tests

* Added additional tests

* PR cleanup and minor async iteration type fix

* Updated diagnostics message and added non-strict tests

* Fix expected arity of Iterator/AsyncIterator
2019-07-03 21:55:59 -07:00
Kanchalai Tanglertsampan 1415cf4ea2 Update tests and baselines to declare class declaration before use 2017-02-24 17:48:06 -08:00
Ron Buckton 30aff2f6d3 Rename and simplify 'iterationMode' option 2016-12-30 14:39:51 -08:00
Ron Buckton 38b7757e57 Tests for iterationMode=iterable 2016-11-18 17:55:06 -08:00
Jason Freeman 197a42a692 Optimize direct Iterable reference in getIteratedType 2015-03-25 18:38:14 -07:00
Jason Freeman 4a0af76064 Add tests for iterator spread in call 2015-03-25 18:03:45 -07:00
Jason Freeman 376574d1be Add tests for iterator spread in an array literal 2015-03-25 18:03:42 -07:00
Anders Hejlsberg 86a9c80ff8 Adding tests and accepting new baselines 2014-12-12 10:56:22 -08:00