Merge pull request #648 from quicktype/save-types-added
Do actually keep track of types added
This commit is contained in:
Коммит
02e6840c7a
|
@ -811,7 +811,7 @@ export class UnionAccumulator<TArray, TClass, TMap> implements UnionTypeProvider
|
|||
}
|
||||
|
||||
export class TypeRefUnionAccumulator extends UnionAccumulator<TypeRef, TypeRef, TypeRef> {
|
||||
private readonly _typesAdded: Set<Type> = Set();
|
||||
private _typesAdded: Set<Type> = Set();
|
||||
|
||||
// There is a method analogous to this in the IntersectionAccumulator. It might
|
||||
// make sense to find a common interface.
|
||||
|
@ -819,6 +819,7 @@ export class TypeRefUnionAccumulator extends UnionAccumulator<TypeRef, TypeRef,
|
|||
if (this._typesAdded.has(t)) {
|
||||
return emptyTypeAttributes;
|
||||
}
|
||||
this._typesAdded = this._typesAdded.add(t);
|
||||
|
||||
const attributes = t.getAttributes();
|
||||
let unionAttributes: TypeAttributes | undefined = undefined;
|
||||
|
|
Загрузка…
Ссылка в новой задаче