From f19a2f54ed9186d866350d53ed6341d95645c869 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Fri, 9 Oct 2015 09:02:42 -0700 Subject: [PATCH] Fixup comments --- src/compiler/checker.ts | 2 +- src/services/services.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 24b9f1651ac..7027cbd7568 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -7978,7 +7978,7 @@ namespace ts { } // An instance property must be accessed through an instance of the enclosing class if (type.flags & TypeFlags.ThisType) { - // get the original type -- represented as the type constraint of the this type + // get the original type -- represented as the type constraint of the 'this' type type = getConstraintOfTypeParameter(type); } diff --git a/src/services/services.ts b/src/services/services.ts index 5a8241a5c45..b707afa9ab5 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -4106,7 +4106,8 @@ namespace ts { let allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures(); if (!contains(allSignatures, signature.target) && !contains(allSignatures, signature)) { - // Get the first signature if there + // Get the first signature if there is one -- allSignatures may contain + // either the original signature or its target, so check for either signature = allSignatures.length ? allSignatures[0] : undefined; }