Fix compile error in TS

Without a type annotation, TS expects the argument in the ctor to be a never[], hence "npm test" fails to even start
This commit is contained in:
Tomas Novella 2018-12-09 09:40:49 +01:00 committed by GitHub
parent 702220f151
commit 939afa9822
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,7 +13,7 @@ export class Item {
export class GildedRose { export class GildedRose {
items: Array<Item>; items: Array<Item>;
constructor(items = []) { constructor(items = [] as Array<Item>) {
this.items = items; this.items = items;
} }