Skip to content

Commit

Permalink
fixed #2411 and typothing in script/quicktype comments: doesn't exist…
Browse files Browse the repository at this point in the history
…, in stead (#2412)

Co-authored-by: David Siegel <[email protected]>
  • Loading branch information
feefladder and dvdsgl authored Feb 14, 2024
1 parent d68b2ba commit f440afd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions packages/quicktype-core/src/input/JSONSchemaInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export class Ref {
get name(): string {
const path = Array.from(this.path);

for (;;) {
for (; ;) {
const e = path.pop();
if (e === undefined || e.kind === PathElementKind.Root) {
let name = this.addressURI !== undefined ? this.addressURI.filename() : "";
Expand Down Expand Up @@ -399,7 +399,7 @@ class Canonizer {
private readonly _map = new EqualityMap<Ref, Location>();
private readonly _schemaAddressesAdded = new Set<string>();

constructor(private readonly _ctx: RunContext) {}
constructor(private readonly _ctx: RunContext) { }

private addIDs(schema: any, loc: Location) {
if (schema === null) return;
Expand Down Expand Up @@ -536,7 +536,7 @@ class Resolver {
private readonly _ctx: RunContext,
private readonly _store: JSONSchemaStore,
private readonly _canonizer: Canonizer
) {}
) { }

private async tryResolveVirtualRef(
fetchBase: Location,
Expand All @@ -548,7 +548,7 @@ class Resolver {
// we don't know its $id mapping yet, which means we don't know where we
// will end up. What we do if we encounter a new schema is add all its
// IDs first, and then try to canonize again.
for (;;) {
for (; ;) {
const loc = this._canonizer.canonize(fetchBase, virtualRef);
const canonical = loc.canonicalRef;
assert(canonical.hasAddress, "Canonical ref can't be resolved without an address");
Expand Down Expand Up @@ -808,7 +808,7 @@ async function addTypesInSchema(
} else if (typeof items === "object") {
const itemsLoc = loc.push("items");
itemType = await toType(checkJSONSchema(items, itemsLoc.canonicalRef), itemsLoc, singularAttributes);
} else if (items !== undefined) {
} else if (items !== undefined && items !== true) {
return messageError("SchemaArrayItemsMustBeStringOrArray", withRef(loc, { actual: items }));
} else {
itemType = typeBuilder.getPrimitiveType("any");
Expand Down
2 changes: 1 addition & 1 deletion script/quicktype
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This runs quicktype, ensuring dependencies are installed
# and rebuilding quicktype first.
#
# Use script/quickertype to skip reinstalling dependencies
# Use script/quickesttype to skip reinstalling dependencies
# and rebuilding PureScript for 10s faster runs if you
# are just working on TargetLanguage code in TypeScript.

Expand Down

0 comments on commit f440afd

Please sign in to comment.