From fbdb14833ad2865bec8a8df173bafbcef04f2910 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Wed, 13 Sep 2017 14:58:35 -0700 Subject: [PATCH] Improve naming of getPartialTypeFromFalsyUnion --- src/compiler/checker.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index ff796879071..e4696363ebb 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -7833,7 +7833,7 @@ namespace ts { } if (left.flags & TypeFlags.Union) { // if the union is `false | T` make all the properties of T optional - const wl = getPartialTypeFromFalseUnion(left as UnionType); + const wl = getPartialTypeFromFalsyUnion(left as UnionType); if (wl) { left = wl; } @@ -7842,7 +7842,7 @@ namespace ts { } } if (right.flags & TypeFlags.Union) { - const wr = getPartialTypeFromFalseUnion(right as UnionType); + const wr = getPartialTypeFromFalsyUnion(right as UnionType); if (wr) { right = wr; } @@ -7921,7 +7921,7 @@ namespace ts { return prop.flags & SymbolFlags.Method && find(prop.declarations, decl => isClassLike(decl.parent)); } - function getPartialTypeFromFalseUnion(type: UnionType): Type | undefined { + function getPartialTypeFromFalsyUnion(type: UnionType): Type | undefined { if (type.types.length === 2) { // getFalsyFlagsOfTypes // getTypeFacts