Cache the regularized form of union types (#37749)

* Cache the regularized form of union types

* Inline function because why not

* Introduce two fastpasths into isRelatedTo
This commit is contained in:
Wesley Wigham
2020-04-02 23:54:24 -07:00
committed by GitHub
parent 349ae45a2c
commit 6d25c01d09
6 changed files with 50129 additions and 2 deletions

View File

@@ -4653,6 +4653,8 @@ namespace ts {
export interface UnionType extends UnionOrIntersectionType {
/* @internal */
resolvedReducedType: Type;
/* @internal */
regularType: UnionType;
}
export interface IntersectionType extends UnionOrIntersectionType {