From 58b5d29c5299809605ac8a9c2cb1ac5217f7261f Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Tue, 10 Nov 2015 13:05:30 -0800 Subject: [PATCH] Improve comment --- src/compiler/checker.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 37c70731fca..97f274ab74d 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2915,11 +2915,13 @@ namespace ts { } } + /** + * An unapplied type parameter has its symbol still the same as the matching argument symbol. + * Since parameters are applied outer-to-inner, only the last outer parameter needs to be checked. + */ function areAllOuterTypeParametersApplied(type: Type): boolean { const outerTypeParameters = (type).outerTypeParameters; if (outerTypeParameters) { - // an unapplied type parameter is one - // whose argument symbol is still the same as the parameter symbol const last = outerTypeParameters.length - 1; const typeArguments = (type).typeArguments; return outerTypeParameters[last].symbol !== typeArguments[last].symbol;