Shouldn't this be an empty array `[]` instead of an Array containing a `null`? The type `Array.<number>` says that the the array contains `number`s, but `null` is not a `number`. Similar comments apply elsewhere.