-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the 'awaited' type operator (#35998)
* Add the 'awaited' type operator * Add script to manually add reviewers to a PR when GH 'Suggested Reviewers' breaks * Fix lint error in review script * Only defer generic awaited type for possible thenable * Add variance-like behavior for awaited * Switch awaited type params to 'unreliable' variance * fix typo in inferTypes * LKG without syntax in lib * LKG with new syntax in lib * Add 'strictAwaitedTypes' flag * Treat strictAwaitedTypes as strict-mode flag * Rename TAll, remove duplicate definition of 'race' * Apply suggestions from code review Co-Authored-By: ExE Boss <3889017+ExE-Boss@users.noreply.github.com> * Fix inference priority * Update comment to isGenericAwaitableType * Add overloads for then/catch to Promise * Add inference heuristic for T | PromiseLike<T> (for any PromiseLike) * Remove strictAwaitedTypes flag Co-authored-by: ExE Boss <3889017+ExE-Boss@users.noreply.github.com>
- Loading branch information
Showing
152 changed files
with
49,506 additions
and
42,643 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
/built/local/** | ||
/tests/** | ||
/lib/** | ||
/src/lib/*.generated.d.ts | ||
/src/lib/*.generated.d.ts | ||
|
||
# TODO: Remove the following once typescript-eslint supports `awaited`: | ||
/src/lib/es5.d.ts | ||
/src/lib/es2015.iterable.d.ts | ||
/src/lib/es2015.promise.d.ts | ||
/src/lib/es2018.promise.d.ts | ||
/src/lib/es2020.promise.d.ts | ||
/src/lib/esnext.promise.d.ts |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.