From 4fcb707ea827abbc3e686b77c3778d0a02705cc8 Mon Sep 17 00:00:00 2001 From: Mark Probst Date: Sat, 19 May 2018 23:20:15 -0700 Subject: [PATCH] Get rid of OrderedSet in TypeBuilder --- src/quicktype-core/TypeBuilder.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/quicktype-core/TypeBuilder.ts b/src/quicktype-core/TypeBuilder.ts index fb1a2aa4..70e91b37 100644 --- a/src/quicktype-core/TypeBuilder.ts +++ b/src/quicktype-core/TypeBuilder.ts @@ -1,4 +1,4 @@ -import { Map, OrderedSet, is } from "immutable"; +import { Map, is } from "immutable"; import { PrimitiveTypeKind, @@ -197,7 +197,7 @@ export class TypeBuilder { } const nullType = this.getPrimitiveType("null"); if (!(t instanceof UnionType)) { - return this.getUnionType(attributes, OrderedSet([tref, nullType])); + return this.getUnionType(attributes, new Set([tref, nullType])); } const [maybeNull, nonNulls] = removeNullFromUnion(t); if (maybeNull !== null) return tref; @@ -211,7 +211,7 @@ export class TypeBuilder { protected addForwardingIntersection(forwardingRef: TypeRef, tref: TypeRef): TypeRef { this._addedForwardingIntersection = true; - return this.addType(forwardingRef, tr => new IntersectionType(tr, OrderedSet([tref])), undefined); + return this.addType(forwardingRef, tr => new IntersectionType(tr, new Set([tref])), undefined); } protected forwardIfNecessary(forwardingRef: TypeRef | undefined, tref: undefined): undefined;