Version 1.1.31#1585
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds deprecation notices for Awaited, Promise, AsyncIterator, Iterator.
The Promise, AsyncIterator and Iterator types are considered higher-order types whose functions and signatures can technically be expressed by the 1.x type system. In addition, these types are not entirely portable to languages that lack asynchronous primitives, or iterators. As these types add a lot of overhead for very little utility, a decision has been made to remove them in the next version.
The Awaited action is being removed as Promise is no longer supported. An Awaited fallback may be possible via Type.Generic + Recursive Unwrap, but would not have the same inference performance as the native supported version. A fallback may be considered for the next version regardless.
Promise
The following is the planned fallback for Promise
AsyncIterator
The following is the planned fallback for AsyncIterator
Iterator
The following is the planned fallback for Iterator
These types are being removed to add a degree of cross language interoperability, and to reduce overall library bundle size. These types were originally added to express RPC interface return types, but have not be utilized in years. Their omission is considered to be low impact.