diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 3760dd6a19f..a272ac15e72 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -16406,7 +16406,7 @@ namespace ts { function isPotentiallyUncalledDecorator(decorator: Decorator, signatures: Signature[]) { return signatures.length && every(signatures, signature => signature.minArgumentCount === 0 && - signature.parameters.length < getEffectiveArgumentCount(decorator, /*args*/ undefined, signature)) + signature.parameters.length < getEffectiveArgumentCount(decorator, /*args*/ undefined, signature)); } /** diff --git a/tests/baselines/reference/decoratorOnClassMethod6.errors.txt b/tests/baselines/reference/decoratorOnClassMethod6.errors.txt index ab09a01f19b..befe582025c 100644 --- a/tests/baselines/reference/decoratorOnClassMethod6.errors.txt +++ b/tests/baselines/reference/decoratorOnClassMethod6.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/decorators/class/method/decoratorOnClassMethod6.ts(4,5): error TS1329: A decorator function must accept some number of arguments, but this expression takes none. Did you mean to call it first? +tests/cases/conformance/decorators/class/method/decoratorOnClassMethod6.ts(4,5): error TS1329: This function cannot be used as a decorator. Did you mean to call it first? ==== tests/cases/conformance/decorators/class/method/decoratorOnClassMethod6.ts (1 errors) ==== @@ -7,5 +7,5 @@ tests/cases/conformance/decorators/class/method/decoratorOnClassMethod6.ts(4,5): class C { @dec ["method"]() {} ~~~~ -!!! error TS1329: A decorator function must accept some number of arguments, but this expression takes none. Did you mean to call it first? +!!! error TS1329: This function cannot be used as a decorator. Did you mean to call it first? } \ No newline at end of file diff --git a/tests/baselines/reference/decoratorOnClassProperty11.errors.txt b/tests/baselines/reference/decoratorOnClassProperty11.errors.txt index 8e778300aa6..771ca46b572 100644 --- a/tests/baselines/reference/decoratorOnClassProperty11.errors.txt +++ b/tests/baselines/reference/decoratorOnClassProperty11.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/decorators/class/property/decoratorOnClassProperty11.ts(4,5): error TS1329: A decorator function must accept some number of arguments, but this expression takes none. Did you mean to call it first? +tests/cases/conformance/decorators/class/property/decoratorOnClassProperty11.ts(4,5): error TS1329: This function cannot be used as a decorator. Did you mean to call it first? ==== tests/cases/conformance/decorators/class/property/decoratorOnClassProperty11.ts (1 errors) ==== @@ -7,5 +7,5 @@ tests/cases/conformance/decorators/class/property/decoratorOnClassProperty11.ts( class C { @dec prop; ~~~~ -!!! error TS1329: A decorator function must accept some number of arguments, but this expression takes none. Did you mean to call it first? +!!! error TS1329: This function cannot be used as a decorator. Did you mean to call it first? } \ No newline at end of file