本文整理匯總了TypeScript中immutable-class.immutableArraysEqual函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript immutableArraysEqual函數的具體用法?TypeScript immutableArraysEqual怎麽用?TypeScript immutableArraysEqual使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了immutableArraysEqual函數的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: it
it('getGranularities appropriately for number', () => {
var defaults = getGranularities('number');
var expectedDefaults = [0.1, 1, 10, 100, 1000].map(granularityFromJS);
expect(immutableArraysEqual(defaults, expectedDefaults), 'number defaults are returned').to.equal(true);
var bucketedBy = getGranularities('number', granularityFromJS(100), false);
var expectedGrans = [100, 500, 1000, 5000, 10000].map(granularityFromJS);
expect(immutableArraysEqual(bucketedBy, expectedGrans), 'bucketed by returns larger granularities').to.equal(true);
});
示例2: equals
public equals(other: Customization): boolean {
return Customization.isCustomization(other) &&
this.title === other.title &&
this.headerBackground === other.headerBackground &&
this.customLogoSvg === other.customLogoSvg &&
immutableArraysEqual(this.externalViews, other.externalViews);
}
示例3: equals
public equals(other: Dimension): boolean {
return Dimension.isDimension(other) &&
this.name === other.name &&
this.title === other.title &&
this.expression.equals(other.expression) &&
this.kind === other.kind &&
this.url === other.url &&
immutableArraysEqual(this.granularities, other.granularities);
}
示例4: equals
public equals(other: Dimension): boolean {
return Dimension.isDimension(other) &&
this.name === other.name &&
this.title === other.title &&
this.formula === other.formula &&
this.kind === other.kind &&
this.url === other.url &&
immutableArraysEqual(this.granularities, other.granularities) &&
granularityEquals(this.bucketedBy, other.bucketedBy);
}
示例5: immutableArraysEqual
export function immutableListsEqual<T extends Equalable>(listA: List<T>, listB: List<T>): boolean {
if (listA === listB) return true;
if (!listA !== !listB) return false;
return immutableArraysEqual(listA.toArray(), listB.toArray());
}
示例6: equals
public equals(other: LinkViewConfig): boolean {
return LinkViewConfig.isLinkViewConfig(other) &&
this.title === other.title &&
immutableArraysEqual(this.linkItems, other.linkItems);
}