From 62fb5e85e4d432faa241778b06015a636738f8d1 Mon Sep 17 00:00:00 2001 From: Yui T Date: Wed, 25 Nov 2015 17:33:11 -0800 Subject: [PATCH] Include debug assert --- src/services/services.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/services/services.ts b/src/services/services.ts index b53ff02e195..ea5a4a027cc 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1901,7 +1901,7 @@ namespace ts { sourceMapText = text; } else { - Debug.assert(outputText === undefined, "Unexpected multiple outputs for the file: " + name); + Debug.assert(outputText === undefined, `Unexpected multiple outputs for the file: '${name}'`); outputText = text; } }, @@ -4248,7 +4248,8 @@ namespace ts { else { // Method/function type parameter let declaration = getDeclarationOfKind(symbol, SyntaxKind.TypeParameter); - declaration = declaration ? declaration.parent : undefined; + Debug.assert(declaration !== undefined); + declaration = declaration.parent; if (declaration) { if (isFunctionLikeKind(declaration.kind)) {