You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior:
The argument passed to the return method should be optional. Not sure if this is possible with typescript.
Actual behavior:
file.ts(6,7): error TS2554: Expected 1 arguments, but got 0.
6 gen().return();
~~~~~~~~
typescript/lib/lib.es2015.generator.d.ts:26:12
26 return(value: TReturn): IteratorResult<T, TReturn>;
~~~~~~~~~~~~~~
An argument for 'value' was not provided.
Playground Link:
Playground is not available for 3.6.2
Related Issues: #30790 Strongly typed iterator PR. #32682 Other (async) iterator usability issues. #33239 Trouble implementing async iterator interface in 3.6.2 #33241 Unable to use done property of IteratorResult to narrow types in typescript 3.6.2