include::../description.adoc[]

== Noncompliant Code Example

With a maximum number of 4 parameters:

[source,javascript]
----
function doSomething(param1, param2, param3, param4, param5) { 
...
}
----

== Compliant Solution

[source,javascript]
----
function doSomething(param1, param2, param3, param4) {
...
}
----

== Exceptions

The rule ignores constructors where parameters are *all* parameter properties:

[source,javascript]
----
class C {
  constructor(
    private param1: number,
    private param2: boolean,
    private param3: string,
    private param4: string[],
    private param5: number | string
  ) {}
}
----

The rule also ignores Angular component constructors:

[source,javascript]
----
import { Component } from '@angular/core';

@Component({/* ... */})
class Component {
  constructor(p1, p2, p3, p4, p5) {}
}
----

ifdef::env-github,rspecator-view[]

'''
== Implementation Specification
(visible only on this page)

include::message.adoc[]

include::../parameters.adoc[]

'''
== Comments And Links
(visible only on this page)

include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]
