Skip to content

Commit c4ed554

Browse files
author
Andy
authored
Simplify isExpression check (microsoft#17741)
1 parent e2141ad commit c4ed554

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15220,7 +15220,7 @@ namespace ts {
1522015220
// example, given a 'function wrap<T, U>(cb: (x: T) => U): (x: T) => U' and a call expression
1522115221
// 'let f: (x: string) => number = wrap(s => s.length)', we infer from the declared type of 'f' to the
1522215222
// return type of 'wrap'.
15223-
if (isExpression(node)) {
15223+
if (node.kind !== SyntaxKind.Decorator) {
1522415224
const contextualType = getContextualType(node);
1522515225
if (contextualType) {
1522615226
// We clone the contextual mapper to avoid disturbing a resolution in progress for an

0 commit comments

Comments
 (0)