assert length

This commit is contained in:
Arthur Ozga 2017-05-01 16:37:27 -07:00
parent df3630b92c
commit 7d1d22ce4b

View file

@ -122,9 +122,8 @@ namespace ts {
/* @internal */
export function hasChangesInResolutions<T>(names: string[], newResolutions: T[], oldResolutions: Map<T>, comparer: (oldResolution: T, newResolution: T) => boolean): boolean {
if (names.length !== newResolutions.length) {
return true;
}
Debug.assert(names.length === newResolutions.length);
for (let i = 0; i < names.length; i++) {
const newResolution = newResolutions[i];
const oldResolution = oldResolutions && oldResolutions.get(names[i]);