quicktype-core 23.0.83 → 23.0.85

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -300,30 +300,6 @@ class CrystalRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
300
300
  this.emitCommentLines(this.leadingComments);
301
301
  return;
302
302
  }
303
- this.emitMultiline(`# Example code that deserializes and serializes the model:
304
- #
305
- # require "json"
306
- #
307
- # class Location
308
- # include JSON::Serializable
309
- #
310
- # @[JSON::Field(key: "lat")]
311
- # property latitude : Float64
312
- #
313
- # @[JSON::Field(key: "lng")]
314
- # property longitude : Float64
315
- # end
316
- #
317
- # class House
318
- # include JSON::Serializable
319
- # property address : String
320
- # property location : Location?
321
- # end
322
- #
323
- # house = House.from_json(%({"address": "Crystal Road 1234", "location": {"lat": 12.3, "lng": 34.5}}))
324
- # house.address # => "Crystal Road 1234"
325
- # house.location # => #<Location:0x10cd93d80 @latitude=12.3, @longitude=34.5>
326
- `);
327
303
  }
328
304
  emitSourceStructure() {
329
305
  this.emitLeadingComments();
@@ -1,11 +1,11 @@
1
1
  import { StringTypeMapping } from "TypeBuilder";
2
2
  import { ConvenienceRenderer } from "../ConvenienceRenderer";
3
- import { Namer } from "../Naming";
3
+ import { Name, Namer } from "../Naming";
4
4
  import { RenderContext } from "../Renderer";
5
5
  import { BooleanOption, Option, OptionValues } from "../RendererOptions";
6
6
  import { Sourcelike } from "../Source";
7
7
  import { TargetLanguage } from "../TargetLanguage";
8
- import { ClassProperty, Type } from "../Type";
8
+ import { ClassProperty, EnumType, ObjectType, Type } from "../Type";
9
9
  export declare const typeScriptZodOptions: {
10
10
  justSchema: BooleanOption;
11
11
  };
@@ -18,7 +18,7 @@ export declare class TypeScriptZodTargetLanguage extends TargetLanguage {
18
18
  }): TypeScriptZodRenderer;
19
19
  }
20
20
  export declare class TypeScriptZodRenderer extends ConvenienceRenderer {
21
- private readonly _options;
21
+ protected readonly _options: OptionValues<typeof typeScriptZodOptions>;
22
22
  constructor(targetLanguage: TargetLanguage, renderContext: RenderContext, _options: OptionValues<typeof typeScriptZodOptions>);
23
23
  protected forbiddenNamesForGlobalNamespace(): string[];
24
24
  protected nameStyle(original: string, upper: boolean): string;
@@ -26,12 +26,12 @@ export declare class TypeScriptZodRenderer extends ConvenienceRenderer {
26
26
  protected makeUnionMemberNamer(): Namer;
27
27
  protected namerForObjectProperty(): Namer;
28
28
  protected makeEnumCaseNamer(): Namer;
29
- private importStatement;
29
+ protected importStatement(lhs: Sourcelike, moduleName: Sourcelike): Sourcelike;
30
30
  protected emitImports(): void;
31
- typeMapTypeForProperty(p: ClassProperty): Sourcelike;
32
- typeMapTypeFor(t: Type, required?: boolean): Sourcelike;
33
- private emitObject;
34
- private emitEnum;
31
+ protected typeMapTypeForProperty(p: ClassProperty): Sourcelike;
32
+ protected typeMapTypeFor(t: Type, required?: boolean): Sourcelike;
33
+ protected emitObject(name: Name, t: ObjectType): void;
34
+ protected emitEnum(e: EnumType, enumName: Name): void;
35
35
  protected emitSchemas(): void;
36
36
  protected emitSourceStructure(): void;
37
37
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quicktype-core",
3
- "version": "23.0.83",
3
+ "version": "23.0.85",
4
4
  "description": "The quicktype engine as a library",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/index.js",