Generated-output differences

quicktype output changed between the PR base and tested PR merge revisions.
← Back to the pull request
6test cases
6files differ
5modified
1new
0deleted
34changed lines
+21 −13insertions / deletions
Base 66df8a7480383ad7d4784464b395df83fd482c7f · PR merge 69eb1b54ec6b89f0ffe1eadd7e33752df45b37cf · Head 9bbab8d415c95567b7cbca90dbbcffb4438904ea · raw patch
Test case

test/inputs/schema/minmaxlength.schema

1 generated file · +7 −7
Mschema-typescript-effect-schemadefault / TopLevel.ts+7 −7
@@ -2,12 +2,12 @@ import * as S from "effect/Schema";
22
33
44 export class TopLevel extends S.Class<TopLevel>("TopLevel")({
5- "intersection": S.String.pipe(S.minLength(4)).pipe(S.maxLength(5)),
6- "inUnion": S.Union(S.Number, S.String.pipe(S.minLength(3)).pipe(S.maxLength(5))),
7- "maxlength": S.String.pipe(S.maxLength(5)),
8- "minlength": S.String.pipe(S.minLength(3)),
9- "minMaxIntersection": S.String.pipe(S.minLength(3)).pipe(S.maxLength(5)),
10- "minmaxlength": S.String.pipe(S.minLength(3)).pipe(S.maxLength(5)),
5+ "intersection": S.String.pipe(S.filter(value => Array.from(value).length >= 4)).pipe(S.filter(value => Array.from(value).length <= 5)),
6+ "inUnion": S.Union(S.Number, S.String.pipe(S.filter(value => Array.from(value).length >= 3)).pipe(S.filter(value => Array.from(value).length <= 5))),
7+ "maxlength": S.String.pipe(S.filter(value => Array.from(value).length <= 5)),
8+ "minlength": S.String.pipe(S.filter(value => Array.from(value).length >= 3)),
9+ "minMaxIntersection": S.String.pipe(S.filter(value => Array.from(value).length >= 3)).pipe(S.filter(value => Array.from(value).length <= 5)),
10+ "minmaxlength": S.String.pipe(S.filter(value => Array.from(value).length >= 3)).pipe(S.filter(value => Array.from(value).length <= 5)),
1111 "minMaxUnion": S.String,
12- "union": S.String.pipe(S.minLength(3)).pipe(S.maxLength(6)),
12+ "union": S.String.pipe(S.filter(value => Array.from(value).length >= 3)).pipe(S.filter(value => Array.from(value).length <= 6)),
1313 }) {}
Test case

test/inputs/schema/optional-const-ref.schema

1 generated file · +2 −2
Mschema-typescript-effect-schemadefault / TopLevel.ts+2 −2
@@ -9,9 +9,9 @@ export class Coordinate extends S.Class<Coordinate>("Coordinate")({
99 export class TopLevel extends S.Class<TopLevel>("TopLevel")({
1010 "coordinates": S.optional(S.NullOr(S.Array(Coordinate))),
1111 "count": S.optional(S.NullOr(S.Int.pipe(S.greaterThanOrEqualTo(1)).pipe(S.lessThanOrEqualTo(100)))),
12- "label": S.optional(S.NullOr(S.String.pipe(S.minLength(2)).pipe(S.maxLength(16)))),
12+ "label": S.optional(S.NullOr(S.String.pipe(S.filter(value => Array.from(value).length >= 2)).pipe(S.filter(value => Array.from(value).length <= 16)))),
1313 "requiredCoordinates": S.Array(Coordinate),
1414 "requiredCount": S.Int.pipe(S.greaterThanOrEqualTo(1)).pipe(S.lessThanOrEqualTo(100)),
15- "requiredLabel": S.String.pipe(S.minLength(2)).pipe(S.maxLength(16)),
15+ "requiredLabel": S.String.pipe(S.filter(value => Array.from(value).length >= 2)).pipe(S.filter(value => Array.from(value).length <= 16)),
1616 "weight": S.optional(S.NullOr(S.Number.pipe(S.greaterThanOrEqualTo(0.5)).pipe(S.lessThanOrEqualTo(99.5)))),
1717 }) {}
Test case

test/inputs/schema/optional-constraints.schema

1 generated file · +1 −1
Mschema-typescript-effect-schemadefault / TopLevel.ts+1 −1
@@ -5,6 +5,6 @@ export class TopLevel extends S.Class<TopLevel>("TopLevel")({
55 "optDouble": S.optional(S.NullOr(S.Number.pipe(S.greaterThanOrEqualTo(0.5)).pipe(S.lessThanOrEqualTo(99.5)))),
66 "optInt": S.optional(S.NullOr(S.Int.pipe(S.greaterThanOrEqualTo(0)).pipe(S.lessThanOrEqualTo(100)))),
77 "optPattern": S.optional(S.NullOr(S.String.pipe(S.pattern(new RegExp("^[a-z]+$"))))),
8- "optString": S.optional(S.NullOr(S.String.pipe(S.minLength(3)).pipe(S.maxLength(10)))),
8+ "optString": S.optional(S.NullOr(S.String.pipe(S.filter(value => Array.from(value).length >= 3)).pipe(S.filter(value => Array.from(value).length <= 10)))),
99 "reqZeroMin": S.Int.pipe(S.greaterThanOrEqualTo(0)).pipe(S.lessThanOrEqualTo(100)),
1010 }) {}
Test case

test/inputs/schema/renaming-bug.schema

1 generated file · +2 −2
Mschema-typescript-effect-schemadefault / TopLevel.ts+2 −2
@@ -42,7 +42,7 @@ export class Speed extends S.Class<Speed>("Speed")({
4242
4343 export class Vehicle extends S.Class<Vehicle>("Vehicle")({
4444 "brand": S.optional(S.NullOr(S.String)),
45- "id": S.optional(S.NullOr(S.String.pipe(S.minLength(1)))),
45+ "id": S.optional(S.NullOr(S.String.pipe(S.filter(value => Array.from(value).length >= 1)))),
4646 "speed": S.optional(S.NullOr(Speed)),
4747 "subModule": S.optional(S.NullOr(S.Boolean)),
4848 "type": S.optional(S.NullOr(VehicleType)),
@@ -83,7 +83,7 @@ export class Color extends S.Class<Color>("Color")({
8383
8484 export class Berry extends S.Class<Berry>("Berry")({
8585 "color": S.optional(S.NullOr(Color)),
86- "name": S.optional(S.NullOr(S.String.pipe(S.minLength(1)))),
86+ "name": S.optional(S.NullOr(S.String.pipe(S.filter(value => Array.from(value).length >= 1)))),
8787 "shapes": S.optional(S.NullOr(S.Array(Shape))),
8888 }) {}
Test case

test/inputs/schema/schema-constraints.schema

1 generated file · +1 −1
Mschema-typescript-effect-schemadefault / TopLevel.ts+1 −1
@@ -2,6 +2,6 @@ import * as S from "effect/Schema";
22
33
44 export class TopLevel extends S.Class<TopLevel>("TopLevel")({
5- "minMaxLength": S.String.pipe(S.minLength(5)).pipe(S.maxLength(5)),
5+ "minMaxLength": S.String.pipe(S.filter(value => Array.from(value).length >= 5)).pipe(S.filter(value => Array.from(value).length <= 5)),
66 "percent": S.Number.pipe(S.greaterThanOrEqualTo(0)).pipe(S.lessThanOrEqualTo(1)),
77 }) {}
Test case

test/inputs/typescript-effect-schema/unicode-codepoint-length.schema

1 generated file · +8 −0
Aschema-typescript-effect-schemadefault / TopLevel.ts+8 −0
@@ -0,0 +1,8 @@
1+import * as S from "effect/Schema";
2+
3+
4+export class TopLevel extends S.Class<TopLevel>("TopLevel")({
5+ "exact": S.String.pipe(S.filter(value => Array.from(value).length >= 2)).pipe(S.filter(value => Array.from(value).length <= 2)).pipe(S.pattern(new RegExp("^[^!]+$"))),
6+ "maximum": S.String.pipe(S.filter(value => Array.from(value).length <= 1)),
7+ "minimum": S.String.pipe(S.filter(value => Array.from(value).length >= 2)),
8+}) {}
No generated files match these filters.