Add missing Immutable-List parameter

Reviewed By: kassens

Differential Revision: D4636523

fbshipit-source-id: 99bbf32005073ef534c8b7d42109d9a1a1c2f945
This commit is contained in:
Matt Mahoney 2017-03-01 22:50:20 -08:00 committed by Facebook Github Bot
parent dc334b0e55
commit fea8745845
1 changed files with 8 additions and 3 deletions

View File

@ -1,5 +1,10 @@
/**
* Copyright 2004-present Facebook. All Rights Reserved.
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule NavigationRouteStack
* @flow
@ -135,7 +140,7 @@ class RouteStack {
invariant(this._routeNodes.indexOf(route) === -1, 'route must be unique');
// When pushing, removes the rest of the routes past the current index.
var routeNodes = this._routeNodes.withMutations((list: List) => {
var routeNodes = this._routeNodes.withMutations((list: List<RouteNode>) => {
list.slice(0, this._index + 1).push(new RouteNode(route));
});
@ -232,7 +237,7 @@ class RouteStack {
return new Set(items);
}
_update(index: number, routeNodes: List): RouteStack {
_update(index: number, routeNodes: List<RouteNode>): RouteStack {
if (this._index === index && this._routeNodes === routeNodes) {
return this;
}