Looking at this code:

```
class Customer {
  id: string;
  name: string;
}

private customers = [
  { id: '1234', name: 'Foo'},
  { id: '3241', name: 'Bar'}
]

getCustomers(): Customer[] {
    return this.customers.sort((a,b) => {
        return a[name] < b[name];
    });
}

```

you would notice that `getCustomers()` **returns a boolean**, which is not allowed since it's being used as a compare function that **expects a number**. 

The code above would return an error: `Type 'boolean' is not assignable to type 'number'.` That's clear in the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort)

However, this code snippet: <https://plnkr.co/DITVzCSqHHB1uNrTxFit/>
is from an Angular tutorial and works fine.
Is there something different between the typescript or javascript used in Plunker vs other IDEs? (I'm using VSCode with Angular CLI)