56 lines
1.0 KiB
Plaintext
Raw Normal View History

2023-08-10 16:54:47 +02:00
:language: javascript
2023-08-10 16:54:47 +02:00
include::../rule.adoc[]
=== Exceptions
The rule ignores TypeScript parameter properties when counting parameters:
[source,javascript]
----
class C {
constructor(
private param1: number, // ignored
param2: boolean, // counted
public param3: string, // ignored
readonly param4: string[], // ignored
param5: number | string // counted
2023-08-10 16:54:47 +02:00
) {} // Compliant by exception
}
----
The rule also ignores Angular component constructors:
[source,javascript]
----
import { Component } from '@angular/core';
@Component({/* ... */})
class Component {
2023-08-10 16:54:47 +02:00
constructor(p1, p2, p3, p4, p5) {} // Compliant by exception
}
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
* Key: max
** Description: Maximum authorized number of parameters
** Default Value: 7
include::../parameters.adoc[]
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]