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() {