From c4ed55459773092597d0dc1cb500bf176daa62d0 Mon Sep 17 00:00:00 2001 From: Andy Date: Thu, 24 Aug 2017 10:27:07 -0700 Subject: [PATCH] Simplify `isExpression` check (#17741) --- src/compiler/checker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 4a07f349c9a..24a9a868c4a 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -15220,7 +15220,7 @@ namespace ts { // example, given a 'function wrap(cb: (x: T) => U): (x: T) => U' and a call expression // 'let f: (x: string) => number = wrap(s => s.length)', we infer from the declared type of 'f' to the // return type of 'wrap'. - if (isExpression(node)) { + if (node.kind !== SyntaxKind.Decorator) { const contextualType = getContextualType(node); if (contextualType) { // We clone the contextual mapper to avoid disturbing a resolution in progress for an