mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-10 15:25:54 -06:00
Accepted baselines.
This commit is contained in:
parent
966f370712
commit
08ef6e4bea
@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -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?
|
||||
}
|
||||
@ -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?
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user