本文整理汇总了TypeScript中collection-utils.areEqual函数的典型用法代码示例。如果您正苦于以下问题:TypeScript areEqual函数的具体用法?TypeScript areEqual怎么用?TypeScript areEqual使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了areEqual函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: structuralEqualityStep
protected structuralEqualityStep(
other: EnumType,
_conflateNumbers: boolean,
_queue: (a: Type, b: Type) => void
): boolean {
return areEqual(this.cases, other.cases);
}
示例2: equals
equals(other: any): boolean {
if (!(other instanceof TypeIdentity)) return false;
if (this._kind !== other._kind) return false;
const n = this._components.length;
assert(n === other._components.length, "Components of a type kind's identity must have the same length");
for (let i = 0; i < n; i++) {
if (!areEqual(this._components[i], other._components[i])) return false;
}
return true;
}
示例3: equals
equals(other: any): boolean {
if (!super.equals(other)) return false;
if (!(other instanceof DecodingChoiceTransformer)) return false;
if (!areEqual(this.nullTransformer, other.nullTransformer)) return false;
if (!areEqual(this.integerTransformer, other.integerTransformer)) return false;
if (!areEqual(this.doubleTransformer, other.doubleTransformer)) return false;
if (!areEqual(this.boolTransformer, other.boolTransformer)) return false;
if (!areEqual(this.stringTransformer, other.stringTransformer)) return false;
if (!areEqual(this.arrayTransformer, other.arrayTransformer)) return false;
if (!areEqual(this.objectTransformer, other.objectTransformer)) return false;
return true;
}