fixed usage of array type (#24)

This commit is contained in:
kajetansw 2019-03-02 17:57:05 +01:00 committed by Dumitru
parent 15b1b550a4
commit 4592b199e6

View file

@ -317,7 +317,7 @@ This is by far the most important rule in software engineering. When functions d
**Bad:**
```ts
function emailClients(clients: Client) {
function emailClients(clients: Client[]) {
clients.forEach((client) => {
const clientRecord = database.lookup(client);
if (clientRecord.isActive()) {
@ -330,7 +330,7 @@ function emailClients(clients: Client) {
**Good:**
```ts
function emailClients(clients: Client) {
function emailClients(clients: Client[]) {
clients.filter(isActiveClient).forEach(email);
}