Simplify isExpression check (#17741)

This commit is contained in:
Andy 2017-08-24 10:27:07 -07:00 committed by GitHub
parent e2141ad469
commit c4ed554597

View file

@ -15220,7 +15220,7 @@ namespace ts {
// example, given a 'function wrap<T, U>(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