Accepted baselines.

This commit is contained in:
Daniel Rosenwasser 2017-09-29 16:42:46 -07:00
parent 966f370712
commit 08ef6e4bea
3 changed files with 5 additions and 5 deletions

View File

@ -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));
}
/**

View File

@ -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?
}

View File

@ -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?
}