diff --git a/front_end/ui/ListModel.js b/front_end/ui/ListModel.js index 67a7ab180e..6dfa5a27c7 100644 --- a/front_end/ui/ListModel.js +++ b/front_end/ui/ListModel.js @@ -2,9 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// @ts-nocheck -// TODO(crbug.com/1011811): Enable TypeScript compiler checks - import * as Common from '../common/common.js'; /** @@ -17,6 +14,7 @@ export class ListModel extends Common.ObjectWrapper.ObjectWrapper { */ constructor(items) { super(); + /** @type {!Array} */ this._items = items || []; } @@ -146,7 +144,7 @@ export class ListModel extends Common.ObjectWrapper.ObjectWrapper { // Splice may fail with too many arguments. const before = this._items.slice(0, from); const after = this._items.slice(to); - this._items = [].concat(before, items, after); + this._items = [...before, ...items, ...after]; } this._replaced(from, removed, items.length); return removed;