From a54d7d5a6c5ed56edce061bf76b810efa9d6d3e5 Mon Sep 17 00:00:00 2001 From: inferrinizzard Date: Sun, 5 May 2024 15:57:37 -0700 Subject: [PATCH] fix dep cycle for ObjectiveC --- .../src/language/Objective-C/ObjectiveCRenderer.ts | 3 ++- packages/quicktype-core/src/language/Objective-C/language.ts | 3 +-- packages/quicktype-core/src/language/Objective-C/utils.ts | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/quicktype-core/src/language/Objective-C/ObjectiveCRenderer.ts b/packages/quicktype-core/src/language/Objective-C/ObjectiveCRenderer.ts index e4bd7517d..faca214c8 100644 --- a/packages/quicktype-core/src/language/Objective-C/ObjectiveCRenderer.ts +++ b/packages/quicktype-core/src/language/Objective-C/ObjectiveCRenderer.ts @@ -12,8 +12,9 @@ import { ArrayType, type ClassProperty, ClassType, EnumType, MapType, Type, Unio import { isAnyOrNull, matchType, nullableFromUnion } from "../../TypeUtils"; import { forbiddenPropertyNames, keywords } from "./constants"; -import { DEFAULT_CLASS_PREFIX, type MemoryAttribute, type objectiveCOptions } from "./language"; +import { type MemoryAttribute, type objectiveCOptions } from "./language"; import { + DEFAULT_CLASS_PREFIX, forbiddenForEnumCases, propertyNameStyle, splitExtension, diff --git a/packages/quicktype-core/src/language/Objective-C/language.ts b/packages/quicktype-core/src/language/Objective-C/language.ts index 9c4984df6..cb34271f9 100644 --- a/packages/quicktype-core/src/language/Objective-C/language.ts +++ b/packages/quicktype-core/src/language/Objective-C/language.ts @@ -4,6 +4,7 @@ import { TargetLanguage } from "../../TargetLanguage"; import { type FixMeOptionsAnyType, type FixMeOptionsType } from "../../types"; import { ObjectiveCRenderer } from "./ObjectiveCRenderer"; +import { DEFAULT_CLASS_PREFIX } from "./utils"; export type MemoryAttribute = "assign" | "strong" | "copy"; export interface OutputFeatures { @@ -11,8 +12,6 @@ export interface OutputFeatures { interface: boolean; } -export const DEFAULT_CLASS_PREFIX = "QT"; - export const objectiveCOptions = { features: new EnumOption("features", "Interface and implementation", [ ["all", { interface: true, implementation: true }], diff --git a/packages/quicktype-core/src/language/Objective-C/utils.ts b/packages/quicktype-core/src/language/Objective-C/utils.ts index 7e83f5610..cdff7db57 100644 --- a/packages/quicktype-core/src/language/Objective-C/utils.ts +++ b/packages/quicktype-core/src/language/Objective-C/utils.ts @@ -12,6 +12,8 @@ import { import { booleanPrefixes, forbiddenPropertyNames } from "./constants"; +export const DEFAULT_CLASS_PREFIX = "QT"; + export function typeNameStyle(prefix: string, original: string): string { const words = splitIntoWords(original); const result = combineWords(