Skip to content

Commit

Permalink
fix dep cycle for ObjectiveC
Browse files Browse the repository at this point in the history
  • Loading branch information
inferrinizzard committed May 5, 2024
1 parent 0bec808 commit a54d7d5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions packages/quicktype-core/src/language/Objective-C/language.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ 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 {
implementation: boolean;
interface: boolean;
}

export const DEFAULT_CLASS_PREFIX = "QT";

export const objectiveCOptions = {
features: new EnumOption("features", "Interface and implementation", [
["all", { interface: true, implementation: true }],
Expand Down
2 changes: 2 additions & 0 deletions packages/quicktype-core/src/language/Objective-C/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit a54d7d5

Please sign in to comment.