From 82386564d497772632c4bbd18e25048e4cb6368c Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Wed, 9 Dec 2015 15:58:57 -0800 Subject: [PATCH] destructuring applied --- src/compiler/binder.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 837260e5e1b..2682a5938d1 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -1277,13 +1277,14 @@ namespace ts { } function checkTypePredicate(node: TypePredicateNode) { - if (node.parameterName && node.parameterName.kind === SyntaxKind.Identifier) { - checkStrictModeIdentifier(node.parameterName as Identifier); + const { parameterName, type } = node; + if (parameterName && parameterName.kind === SyntaxKind.Identifier) { + checkStrictModeIdentifier(parameterName as Identifier); } - if (node.parameterName && node.parameterName.kind === SyntaxKind.ThisType) { + if (parameterName && parameterName.kind === SyntaxKind.ThisType) { seenThisKeyword = true; } - bind(node.type); + bind(type); } function bindSourceFileIfExternalModule() {