Skip to content

Commit

Permalink
fix dep cycle for Ruby
Browse files Browse the repository at this point in the history
  • Loading branch information
inferrinizzard committed May 5, 2024
1 parent a54d7d5 commit 0f97dc6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/quicktype-core/src/language/Ruby/RubyRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import {
import { matchType, nullableFromUnion, removeNullFromUnion } from "../../TypeUtils";

import { globals } from "./constants";
import { Strictness, type rubyOptions } from "./language";
import { forbiddenForObjectProperties, memberNameStyle, simpleNameStyle, stringEscape } from "./utils";
import { type rubyOptions } from "./language";
import { Strictness, forbiddenForObjectProperties, memberNameStyle, simpleNameStyle, stringEscape } from "./utils";

export class RubyRenderer extends ConvenienceRenderer {
public constructor(
Expand Down
7 changes: 1 addition & 6 deletions packages/quicktype-core/src/language/Ruby/language.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ import { TargetLanguage } from "../../TargetLanguage";
import { type FixMeOptionsAnyType, type FixMeOptionsType } from "../../types";

import { RubyRenderer } from "./RubyRenderer";

export enum Strictness {
Strict = "Strict::",
Coercible = "Coercible::",
None = "Types::"
}
import { Strictness } from "./utils";

export const rubyOptions = {
justTypes: new BooleanOption("just-types", "Plain types only", false),
Expand Down
6 changes: 6 additions & 0 deletions packages/quicktype-core/src/language/Ruby/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ import {

import * as keywords from "./constants";

export enum Strictness {
Strict = "Strict::",
Coercible = "Coercible::",
None = "Types::"
}

export const forbiddenForObjectProperties = Array.from(new Set([...keywords.keywords, ...keywords.reservedProperties]));
function unicodeEscape(codePoint: number): string {
return "\\u{" + intToHex(codePoint, 0) + "}";
Expand Down

0 comments on commit 0f97dc6

Please sign in to comment.