Generated-output differences

quicktype output changed between the PR base and tested PR merge revisions.
← Back to the pull request
293test cases
295files differ
295modified
0new
0deleted
4,208changed lines
+2,123 −2,085insertions / deletions
Base 1c4cad7f1ba262f3587ab684ce67a0df96b6d285 · PR merge e6a6fd9a688e944b14c5f73116437c286a68e5df · Head d9fccd2965ed8717a8586f048204dcdaff5f3eef · raw patch
Test case

test/inputs/json/misc/00c36.json

1 generated file · +3 −3
Mtypescript-zoddefault / TopLevel.ts+3 −3
@@ -17,7 +17,7 @@ export type Value = z.infer<typeof ValueSchema>;
1717 export const CountrySchema = z.object({
1818 "id": IdSchema,
1919 "value": ValueSchema,
20-});
20+}).strict();
2121 export type Country = z.infer<typeof CountrySchema>;
2222
2323 export const FluffyTopLevelSchema = z.object({
@@ -25,7 +25,7 @@ export const FluffyTopLevelSchema = z.object({
2525 "pages": z.number().int(),
2626 "per_page": z.string().regex(/^-?\d+$/),
2727 "total": z.number().int(),
28-});
28+}).strict();
2929 export type FluffyTopLevel = z.infer<typeof FluffyTopLevelSchema>;
3030
3131 export const PurpleTopLevelSchema = z.object({
@@ -34,7 +34,7 @@ export const PurpleTopLevelSchema = z.object({
3434 "decimal": z.string().regex(/^-?\d+$/),
3535 "indicator": CountrySchema,
3636 "value": z.string(),
37-});
37+}).strict();
3838 export type PurpleTopLevel = z.infer<typeof PurpleTopLevelSchema>;
3939
4040 export const TopLevelSchema = z.array(z.union([z.array(PurpleTopLevelSchema), FluffyTopLevelSchema]));
Test case

test/inputs/json/misc/00ec5.json

1 generated file · +12 −12
Mtypescript-zoddefault / TopLevel.ts+12 −12
@@ -9,14 +9,14 @@ export type Type = z.infer<typeof TypeSchema>;
99 export const PropertySchema = z.object({
1010 "description": z.string(),
1111 "type": TypeSchema,
12-});
12+}).strict();
1313 export type Property = z.infer<typeof PropertySchema>;
1414
1515 export const InfoSchema = z.object({
1616 "description": z.string(),
1717 "title": z.string(),
1818 "version": z.string(),
19-});
19+}).strict();
2020 export type Info = z.infer<typeof InfoSchema>;
2121
2222 export const ParameterSchema = z.object({
@@ -26,33 +26,33 @@ export const ParameterSchema = z.object({
2626 "name": z.string(),
2727 "required": z.boolean(),
2828 "type": TypeSchema,
29-});
29+}).strict();
3030 export type Parameter = z.infer<typeof ParameterSchema>;
3131
3232 export const SchemaSchema = z.object({
3333 "$ref": z.string(),
34-});
34+}).strict();
3535 export type Schema = z.infer<typeof SchemaSchema>;
3636
3737 export const ProviderSchema = z.object({
3838 "properties": z.record(z.string(), PropertySchema),
39-});
39+}).strict();
4040 export type Provider = z.infer<typeof ProviderSchema>;
4141
4242 export const The200Schema = z.object({
4343 "description": z.string(),
4444 "schema": SchemaSchema,
45-});
45+}).strict();
4646 export type The200 = z.infer<typeof The200Schema>;
4747
4848 export const DefinitionsSchema = z.object({
4949 "Provider": ProviderSchema,
50-});
50+}).strict();
5151 export type Definitions = z.infer<typeof DefinitionsSchema>;
5252
5353 export const ResponsesSchema = z.object({
5454 "200": The200Schema,
55-});
55+}).strict();
5656 export type Responses = z.infer<typeof ResponsesSchema>;
5757
5858 export const GetSchema = z.object({
@@ -61,17 +61,17 @@ export const GetSchema = z.object({
6161 "responses": ResponsesSchema,
6262 "summary": z.string(),
6363 "tags": z.array(z.string()),
64-});
64+}).strict();
6565 export type Get = z.infer<typeof GetSchema>;
6666
6767 export const BusinessServiceProvidersSearchSchema = z.object({
6868 "get": GetSchema,
69-});
69+}).strict();
7070 export type BusinessServiceProvidersSearch = z.infer<typeof BusinessServiceProvidersSearchSchema>;
7171
7272 export const PathsSchema = z.object({
7373 "/business_service_providers/search": BusinessServiceProvidersSearchSchema,
74-});
74+}).strict();
7575 export type Paths = z.infer<typeof PathsSchema>;
7676
7777 export const TopLevelSchema = z.object({
@@ -83,5 +83,5 @@ export const TopLevelSchema = z.object({
8383 "produces": z.array(z.string()),
8484 "schemes": z.array(z.string()),
8585 "swagger": z.string(),
86-});
86+}).strict();
8787 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/010b1.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -13,7 +13,7 @@ export const TopLevelElementSchema = z.object({
1313 "males": z.number().int(),
1414 "total": z.number().int(),
1515 "year": z.number().int(),
16-});
16+}).strict();
1717 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
1818
1919 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/misc/016af.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -4,10 +4,10 @@ import * as z from "zod";
44 export const TotalPopulationSchema = z.object({
55 "date": z.string(),
66 "population": z.number().int(),
7-});
7+}).strict();
88 export type TotalPopulation = z.infer<typeof TotalPopulationSchema>;
99
1010 export const TopLevelSchema = z.object({
1111 "total_population": z.array(TotalPopulationSchema),
12-});
12+}).strict();
1313 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/033b1.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -5,5 +5,5 @@ export const TopLevelSchema = z.object({
55 "base": z.string(),
66 "date": z.string(),
77 "rates": z.record(z.string(), z.number()),
8-});
8+}).strict();
99 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/050b0.json

1 generated file · +5 −5
Mtypescript-zoddefault / TopLevel.ts+5 −5
@@ -44,26 +44,26 @@ export type Title = z.infer<typeof TitleSchema>;
4444 export const IdentifierSchema = z.object({
4545 "identifier": z.string(),
4646 "scheme": SchemeSchema,
47-});
47+}).strict();
4848 export type Identifier = z.infer<typeof IdentifierSchema>;
4949
5050 export const LinkSchema = z.object({
5151 "note": NoteSchema,
5252 "url": z.string(),
53-});
53+}).strict();
5454 export type Link = z.infer<typeof LinkSchema>;
5555
5656 export const OtherNameSchema = z.object({
5757 "name": z.string(),
5858 "note": z.union([z.null(), z.string()]),
59-});
59+}).strict();
6060 export type OtherName = z.infer<typeof OtherNameSchema>;
6161
6262 export const TextSchema = z.object({
6363 "media_type": MediaTypeSchema,
6464 "title": TitleSchema,
6565 "url": z.string(),
66-});
66+}).strict();
6767 export type Text = z.infer<typeof TextSchema>;
6868
6969 export const TopLevelElementSchema = z.object({
@@ -75,7 +75,7 @@ export const TopLevelElementSchema = z.object({
7575 "other_names": z.array(OtherNameSchema),
7676 "superseded_by": z.union([z.null(), z.string()]),
7777 "text": z.array(TextSchema),
78-});
78+}).strict();
7979 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
8080
8181 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/misc/06bee.json

1 generated file · +4 −4
Mtypescript-zoddefault / TopLevel.ts+4 −4
@@ -37,20 +37,20 @@ export type Title = z.infer<typeof TitleSchema>;
3737 export const IdentifierSchema = z.object({
3838 "identifier": z.string(),
3939 "scheme": SchemeSchema,
40-});
40+}).strict();
4141 export type Identifier = z.infer<typeof IdentifierSchema>;
4242
4343 export const LinkSchema = z.object({
4444 "note": NoteSchema,
4545 "url": z.string(),
46-});
46+}).strict();
4747 export type Link = z.infer<typeof LinkSchema>;
4848
4949 export const TextSchema = z.object({
5050 "media_type": MediaTypeSchema,
5151 "title": TitleSchema,
5252 "url": z.string(),
53-});
53+}).strict();
5454 export type Text = z.infer<typeof TextSchema>;
5555
5656 export const TopLevelElementSchema = z.object({
@@ -62,7 +62,7 @@ export const TopLevelElementSchema = z.object({
6262 "other_names": z.array(z.any()),
6363 "superseded_by": z.null(),
6464 "text": z.array(TextSchema),
65-});
65+}).strict();
6666 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
6767
6868 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/misc/07540.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -2,10 +2,10 @@ import * as z from "zod";
22
33
44 export const CookiesSchema = z.object({
5-});
5+}).strict();
66 export type Cookies = z.infer<typeof CookiesSchema>;
77
88 export const TopLevelSchema = z.object({
99 "cookies": CookiesSchema,
10-});
10+}).strict();
1111 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/0779f.json

1 generated file · +4 −4
Mtypescript-zoddefault / TopLevel.ts+4 −4
@@ -11,14 +11,14 @@ export const StatusSchema = z.object({
1111 "reason": z.string(),
1212 "trend": z.string(),
1313 "type": z.string(),
14-});
14+}).strict();
1515 export type Status = z.infer<typeof StatusSchema>;
1616
1717 export const MetaSchema = z.object({
1818 "credit": z.string(),
1919 "updated": z.string(),
2020 "url": z.string(),
21-});
21+}).strict();
2222 export type Meta = z.infer<typeof MetaSchema>;
2323
2424 export const WeatherSchema = z.object({
@@ -27,7 +27,7 @@ export const WeatherSchema = z.object({
2727 "visibility": z.number(),
2828 "weather": z.string(),
2929 "wind": z.string(),
30-});
30+}).strict();
3131 export type Weather = z.infer<typeof WeatherSchema>;
3232
3333 export const TopLevelSchema = z.object({
@@ -39,5 +39,5 @@ export const TopLevelSchema = z.object({
3939 "state": z.string(),
4040 "status": StatusSchema,
4141 "weather": WeatherSchema,
42-});
42+}).strict();
4343 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/07c75.json

1 generated file · +4 −4
Mtypescript-zoddefault / TopLevel.ts+4 −4
@@ -4,20 +4,20 @@ import * as z from "zod";
44 export const IdentifierSchema = z.object({
55 "identifier": z.string(),
66 "scheme": z.string(),
7-});
7+}).strict();
88 export type Identifier = z.infer<typeof IdentifierSchema>;
99
1010 export const LinkSchema = z.object({
1111 "note": z.string(),
1212 "url": z.string(),
13-});
13+}).strict();
1414 export type Link = z.infer<typeof LinkSchema>;
1515
1616 export const TextSchema = z.object({
1717 "media_type": z.string(),
1818 "title": z.string(),
1919 "url": z.string(),
20-});
20+}).strict();
2121 export type Text = z.infer<typeof TextSchema>;
2222
2323 export const TopLevelElementSchema = z.object({
@@ -29,7 +29,7 @@ export const TopLevelElementSchema = z.object({
2929 "other_names": z.array(z.any()),
3030 "superseded_by": z.null(),
3131 "text": z.array(TextSchema),
32-});
32+}).strict();
3333 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
3434
3535 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/misc/09f54.json

1 generated file · +3 −3
Mtypescript-zoddefault / TopLevel.ts+3 −3
@@ -4,7 +4,7 @@ import * as z from "zod";
44 export const DatumSchema = z.object({
55 "anomaly": z.string(),
66 "value": z.string(),
7-});
7+}).strict();
88 export type Datum = z.infer<typeof DatumSchema>;
99
1010 export const DescriptionSchema = z.object({
@@ -12,11 +12,11 @@ export const DescriptionSchema = z.object({
1212 "missing": z.number().int(),
1313 "title": z.string(),
1414 "units": z.string(),
15-});
15+}).strict();
1616 export type Description = z.infer<typeof DescriptionSchema>;
1717
1818 export const TopLevelSchema = z.object({
1919 "data": z.record(z.string(), DatumSchema),
2020 "description": DescriptionSchema,
21-});
21+}).strict();
2222 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/0a358.json

1 generated file · +3 −3
Mtypescript-zoddefault / TopLevel.ts+3 −3
@@ -2,7 +2,7 @@ import * as z from "zod";
22
33
44 export const FacetsSchema = z.object({
5-});
5+}).strict();
66 export type Facets = z.infer<typeof FacetsSchema>;
77
88 export const ResultSchema = z.object({
@@ -12,7 +12,7 @@ export const ResultSchema = z.object({
1212 "name": z.string(),
1313 "updated_at": z.coerce.date(),
1414 "uri": z.string(),
15-});
15+}).strict();
1616 export type Result = z.infer<typeof ResultSchema>;
1717
1818 export const TopLevelSchema = z.object({
@@ -23,5 +23,5 @@ export const TopLevelSchema = z.object({
2323 "offset": z.number().int(),
2424 "previous": z.boolean(),
2525 "results": z.array(ResultSchema),
26-});
26+}).strict();
2727 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/0a91a.json

1 generated file · +12 −12
Mtypescript-zoddefault / TopLevel.ts+12 −12
@@ -17,13 +17,13 @@ export const ActorSchema = z.object({
1717 "id": z.number().int(),
1818 "login": z.string(),
1919 "url": z.string(),
20-});
20+}).strict();
2121 export type Actor = z.infer<typeof ActorSchema>;
2222
2323 export const AuthorSchema = z.object({
2424 "email": z.string(),
2525 "name": z.string(),
26-});
26+}).strict();
2727 export type Author = z.infer<typeof AuthorSchema>;
2828
2929 export const MergedBySchema = z.object({
@@ -44,19 +44,19 @@ export const MergedBySchema = z.object({
4444 "subscriptions_url": z.string(),
4545 "type": z.string(),
4646 "url": z.string(),
47-});
47+}).strict();
4848 export type MergedBy = z.infer<typeof MergedBySchema>;
4949
5050 export const CommentsSchema = z.object({
5151 "href": z.string(),
52-});
52+}).strict();
5353 export type Comments = z.infer<typeof CommentsSchema>;
5454
5555 export const TopLevelRepoSchema = z.object({
5656 "id": z.number().int(),
5757 "name": z.string(),
5858 "url": z.string(),
59-});
59+}).strict();
6060 export type TopLevelRepo = z.infer<typeof TopLevelRepoSchema>;
6161
6262 export const CommitSchema = z.object({
@@ -65,7 +65,7 @@ export const CommitSchema = z.object({
6565 "message": z.string(),
6666 "sha": z.string(),
6767 "url": z.string(),
68-});
68+}).strict();
6969 export type Commit = z.infer<typeof CommitSchema>;
7070
7171 export const BaseRepoSchema = z.object({
@@ -138,7 +138,7 @@ export const BaseRepoSchema = z.object({
138138 "url": z.string(),
139139 "watchers": z.number().int(),
140140 "watchers_count": z.number().int(),
141-});
141+}).strict();
142142 export type BaseRepo = z.infer<typeof BaseRepoSchema>;
143143
144144 export const LinksSchema = z.object({
@@ -150,7 +150,7 @@ export const LinksSchema = z.object({
150150 "review_comments": CommentsSchema,
151151 "self": CommentsSchema,
152152 "statuses": CommentsSchema,
153-});
153+}).strict();
154154 export type Links = z.infer<typeof LinksSchema>;
155155
156156 export const BaseSchema = z.object({
@@ -159,7 +159,7 @@ export const BaseSchema = z.object({
159159 "repo": BaseRepoSchema,
160160 "sha": z.string(),
161161 "user": MergedBySchema,
162-});
162+}).strict();
163163 export type Base = z.infer<typeof BaseSchema>;
164164
165165 export const PullRequestSchema = z.object({
@@ -204,7 +204,7 @@ export const PullRequestSchema = z.object({
204204 "updated_at": z.coerce.date(),
205205 "url": z.string(),
206206 "user": MergedBySchema,
207-});
207+}).strict();
208208 export type PullRequest = z.infer<typeof PullRequestSchema>;
209209
210210 export const PayloadSchema = z.object({
@@ -222,7 +222,7 @@ export const PayloadSchema = z.object({
222222 "ref": z.string().optional(),
223223 "ref_type": z.string().optional(),
224224 "size": z.number().int().optional(),
225-});
225+}).strict();
226226 export type Payload = z.infer<typeof PayloadSchema>;
227227
228228 export const TopLevelElementSchema = z.object({
@@ -234,7 +234,7 @@ export const TopLevelElementSchema = z.object({
234234 "public": z.boolean(),
235235 "repo": TopLevelRepoSchema,
236236 "type": TypeSchema,
237-});
237+}).strict();
238238 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
239239
240240 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/misc/0b91a.json

1 generated file · +6 −6
Mtypescript-zoddefault / TopLevel.ts+6 −6
@@ -4,27 +4,27 @@ import * as z from "zod";
44 export const ResponseInfoSchema = z.object({
55 "developerMessage": z.string(),
66 "status": z.number().int(),
7-});
7+}).strict();
88 export type ResponseInfo = z.infer<typeof ResponseInfoSchema>;
99
1010 export const ResultsetSchema = z.object({
1111 "count": z.number().int(),
1212 "page": z.number().int(),
1313 "pagesize": z.number().int(),
14-});
14+}).strict();
1515 export type Resultset = z.infer<typeof ResultsetSchema>;
1616
1717 export const ComponentSchema = z.object({
1818 "name": z.string(),
1919 "uuid": z.string().uuid(),
20-});
20+}).strict();
2121 export type Component = z.infer<typeof ComponentSchema>;
2222
2323 export const MetadataSchema = z.object({
2424 "executionTime": z.number(),
2525 "responseInfo": ResponseInfoSchema,
2626 "resultset": ResultsetSchema,
27-});
27+}).strict();
2828 export type Metadata = z.infer<typeof MetadataSchema>;
2929
3030 export const ResultSchema = z.object({
@@ -42,11 +42,11 @@ export const ResultSchema = z.object({
4242 "url": z.string(),
4343 "uuid": z.string().uuid(),
4444 "vuuid": z.string().uuid(),
45-});
45+}).strict();
4646 export type Result = z.infer<typeof ResultSchema>;
4747
4848 export const TopLevelSchema = z.object({
4949 "metadata": MetadataSchema,
5050 "results": z.array(ResultSchema),
51-});
51+}).strict();
5252 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/0cffa.json

1 generated file · +10 −10
Mtypescript-zoddefault / TopLevel.ts+10 −10
@@ -27,7 +27,7 @@ export const The480_WStillSchema = z.object({
2727 "size": z.string().regex(/^-?\d+$/).optional(),
2828 "url": z.string(),
2929 "width": z.string().regex(/^-?\d+$/),
30-});
30+}).strict();
3131 export type The480_WStill = z.infer<typeof The480_WStillSchema>;
3232
3333 export const DownsizedSmallSchema = z.object({
@@ -35,7 +35,7 @@ export const DownsizedSmallSchema = z.object({
3535 "mp4": z.string(),
3636 "mp4_size": z.string().regex(/^-?\d+$/),
3737 "width": z.string().regex(/^-?\d+$/),
38-});
38+}).strict();
3939 export type DownsizedSmall = z.infer<typeof DownsizedSmallSchema>;
4040
4141 export const FixedHeightSchema = z.object({
@@ -49,13 +49,13 @@ export const FixedHeightSchema = z.object({
4949 "webp": z.string(),
5050 "webp_size": z.string().regex(/^-?\d+$/),
5151 "width": z.string().regex(/^-?\d+$/),
52-});
52+}).strict();
5353 export type FixedHeight = z.infer<typeof FixedHeightSchema>;
5454
5555 export const LoopingSchema = z.object({
5656 "mp4": z.string(),
5757 "mp4_size": z.string().regex(/^-?\d+$/),
58-});
58+}).strict();
5959 export type Looping = z.infer<typeof LoopingSchema>;
6060
6161 export const UserSchema = z.object({
@@ -65,21 +65,21 @@ export const UserSchema = z.object({
6565 "profile_url": z.string(),
6666 "twitter": z.string(),
6767 "username": UsernameSchema,
68-});
68+}).strict();
6969 export type User = z.infer<typeof UserSchema>;
7070
7171 export const MetaSchema = z.object({
7272 "msg": z.string(),
7373 "response_id": z.string(),
7474 "status": z.number().int(),
75-});
75+}).strict();
7676 export type Meta = z.infer<typeof MetaSchema>;
7777
7878 export const PaginationSchema = z.object({
7979 "count": z.number().int(),
8080 "offset": z.number().int(),
8181 "total_count": z.number().int(),
82-});
82+}).strict();
8383 export type Pagination = z.infer<typeof PaginationSchema>;
8484
8585 export const ImagesSchema = z.object({
@@ -106,7 +106,7 @@ export const ImagesSchema = z.object({
106106 "preview_gif": The480_WStillSchema,
107107 "preview_webp": The480_WStillSchema,
108108 "480w_still": The480_WStillSchema.optional(),
109-});
109+}).strict();
110110 export type Images = z.infer<typeof ImagesSchema>;
111111
112112 export const DatumSchema = z.object({
@@ -128,12 +128,12 @@ export const DatumSchema = z.object({
128128 "url": z.string(),
129129 "user": UserSchema.optional(),
130130 "username": UsernameSchema,
131-});
131+}).strict();
132132 export type Datum = z.infer<typeof DatumSchema>;
133133
134134 export const TopLevelSchema = z.object({
135135 "data": z.array(DatumSchema),
136136 "meta": MetaSchema,
137137 "pagination": PaginationSchema,
138-});
138+}).strict();
139139 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/0e0c2.json

1 generated file · +8 −8
Mtypescript-zoddefault / TopLevel.ts+8 −8
@@ -26,7 +26,7 @@ export const CollectionSchema = z.object({
2626 "movies": z.array(z.number().int()),
2727 "name": z.string(),
2828 "slug": z.string(),
29-});
29+}).strict();
3030 export type Collection = z.infer<typeof CollectionSchema>;
3131
3232 export const DetailSchema = z.object({
@@ -37,14 +37,14 @@ export const DetailSchema = z.object({
3737 "storyline": z.string(),
3838 "tagline": z.string(),
3939 "title": z.string(),
40-});
40+}).strict();
4141 export type Detail = z.infer<typeof DetailSchema>;
4242
4343 export const FavMovieSchema = z.object({
4444 "follow": z.boolean(),
4545 "star": z.boolean(),
4646 "watched": z.boolean(),
47-});
47+}).strict();
4848 export type FavMovie = z.infer<typeof FavMovieSchema>;
4949
5050 export const ImageSchema = z.object({
@@ -53,7 +53,7 @@ export const ImageSchema = z.object({
5353 "thumbnail": z.string(),
5454 "type": TypeSchema,
5555 "url": z.string(),
56-});
56+}).strict();
5757 export type Image = z.infer<typeof ImageSchema>;
5858
5959 export const VideoSchema = z.object({
@@ -61,14 +61,14 @@ export const VideoSchema = z.object({
6161 "language": ResultLanguageSchema,
6262 "source": z.string(),
6363 "url": z.string(),
64-});
64+}).strict();
6565 export type Video = z.infer<typeof VideoSchema>;
6666
6767 export const VoteScoreSchema = z.object({
6868 "avg": z.number().int(),
6969 "score": z.number().int(),
7070 "total": z.number().int(),
71-});
71+}).strict();
7272 export type VoteScore = z.infer<typeof VoteScoreSchema>;
7373
7474 export const ResultSchema = z.object({
@@ -87,7 +87,7 @@ export const ResultSchema = z.object({
8787 "videos": z.array(VideoSchema),
8888 "vote_score": VoteScoreSchema,
8989 "watches": z.number().int(),
90-});
90+}).strict();
9191 export type Result = z.infer<typeof ResultSchema>;
9292
9393 export const TopLevelSchema = z.object({
@@ -95,5 +95,5 @@ export const TopLevelSchema = z.object({
9595 "next": z.string(),
9696 "previous": z.null(),
9797 "results": z.array(ResultSchema),
98-});
98+}).strict();
9999 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/0fecf.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -3,5 +3,5 @@ import * as z from "zod";
33
44 export const TopLevelSchema = z.object({
55 "countries": z.array(z.string()),
6-});
6+}).strict();
77 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/10be4.json

1 generated file · +5 −5
Mtypescript-zoddefault / TopLevel.ts+5 −5
@@ -55,26 +55,26 @@ export type Title = z.infer<typeof TitleSchema>;
5555 export const IdentifierSchema = z.object({
5656 "identifier": z.string(),
5757 "scheme": SchemeSchema,
58-});
58+}).strict();
5959 export type Identifier = z.infer<typeof IdentifierSchema>;
6060
6161 export const LinkSchema = z.object({
6262 "note": NoteSchema,
6363 "url": z.string(),
64-});
64+}).strict();
6565 export type Link = z.infer<typeof LinkSchema>;
6666
6767 export const OtherNameSchema = z.object({
6868 "name": z.string(),
6969 "note": z.union([z.null(), z.string()]),
70-});
70+}).strict();
7171 export type OtherName = z.infer<typeof OtherNameSchema>;
7272
7373 export const TextSchema = z.object({
7474 "media_type": MediaTypeSchema,
7575 "title": TitleSchema,
7676 "url": z.string(),
77-});
77+}).strict();
7878 export type Text = z.infer<typeof TextSchema>;
7979
8080 export const TopLevelElementSchema = z.object({
@@ -86,7 +86,7 @@ export const TopLevelElementSchema = z.object({
8686 "other_names": z.array(OtherNameSchema),
8787 "superseded_by": z.union([z.null(), z.string()]),
8888 "text": z.array(TextSchema),
89-});
89+}).strict();
9090 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
9191
9292 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/misc/112b5.json

1 generated file · +3 −3
Mtypescript-zoddefault / TopLevel.ts+3 −3
@@ -2,7 +2,7 @@ import * as z from "zod";
22
33
44 export const ArgsSchema = z.object({
5-});
5+}).strict();
66 export type Args = z.infer<typeof ArgsSchema>;
77
88 export const HeadersSchema = z.object({
@@ -10,7 +10,7 @@ export const HeadersSchema = z.object({
1010 "Connection": z.string(),
1111 "Host": z.string(),
1212 "User-Agent": z.string(),
13-});
13+}).strict();
1414 export type Headers = z.infer<typeof HeadersSchema>;
1515
1616 export const TopLevelSchema = z.object({
@@ -18,5 +18,5 @@ export const TopLevelSchema = z.object({
1818 "headers": HeadersSchema,
1919 "origin": z.string(),
2020 "url": z.string(),
21-});
21+}).strict();
2222 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/127a1.json

1 generated file · +10 −10
Mtypescript-zoddefault / TopLevel.ts+10 −10
@@ -26,7 +26,7 @@ export const The480_WStillSchema = z.object({
2626 "size": z.string().regex(/^-?\d+$/).optional(),
2727 "url": z.string(),
2828 "width": z.string().regex(/^-?\d+$/),
29-});
29+}).strict();
3030 export type The480_WStill = z.infer<typeof The480_WStillSchema>;
3131
3232 export const DownsizedSmallSchema = z.object({
@@ -34,7 +34,7 @@ export const DownsizedSmallSchema = z.object({
3434 "mp4": z.string(),
3535 "mp4_size": z.string().regex(/^-?\d+$/),
3636 "width": z.string().regex(/^-?\d+$/),
37-});
37+}).strict();
3838 export type DownsizedSmall = z.infer<typeof DownsizedSmallSchema>;
3939
4040 export const FixedHeightSchema = z.object({
@@ -48,13 +48,13 @@ export const FixedHeightSchema = z.object({
4848 "webp": z.string(),
4949 "webp_size": z.string().regex(/^-?\d+$/),
5050 "width": z.string().regex(/^-?\d+$/),
51-});
51+}).strict();
5252 export type FixedHeight = z.infer<typeof FixedHeightSchema>;
5353
5454 export const LoopingSchema = z.object({
5555 "mp4": z.string(),
5656 "mp4_size": z.string().regex(/^-?\d+$/),
57-});
57+}).strict();
5858 export type Looping = z.infer<typeof LoopingSchema>;
5959
6060 export const UserSchema = z.object({
@@ -64,21 +64,21 @@ export const UserSchema = z.object({
6464 "profile_url": z.string(),
6565 "twitter": z.string().optional(),
6666 "username": UsernameSchema,
67-});
67+}).strict();
6868 export type User = z.infer<typeof UserSchema>;
6969
7070 export const MetaSchema = z.object({
7171 "msg": z.string(),
7272 "response_id": z.string(),
7373 "status": z.number().int(),
74-});
74+}).strict();
7575 export type Meta = z.infer<typeof MetaSchema>;
7676
7777 export const PaginationSchema = z.object({
7878 "count": z.number().int(),
7979 "offset": z.number().int(),
8080 "total_count": z.number().int(),
81-});
81+}).strict();
8282 export type Pagination = z.infer<typeof PaginationSchema>;
8383
8484 export const ImagesSchema = z.object({
@@ -105,7 +105,7 @@ export const ImagesSchema = z.object({
105105 "preview_gif": The480_WStillSchema,
106106 "preview_webp": The480_WStillSchema,
107107 "480w_still": The480_WStillSchema.optional(),
108-});
108+}).strict();
109109 export type Images = z.infer<typeof ImagesSchema>;
110110
111111 export const DatumSchema = z.object({
@@ -127,12 +127,12 @@ export const DatumSchema = z.object({
127127 "url": z.string(),
128128 "user": UserSchema.optional(),
129129 "username": UsernameSchema,
130-});
130+}).strict();
131131 export type Datum = z.infer<typeof DatumSchema>;
132132
133133 export const TopLevelSchema = z.object({
134134 "data": z.array(DatumSchema),
135135 "meta": MetaSchema,
136136 "pagination": PaginationSchema,
137-});
137+}).strict();
138138 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/13d8d.json

1 generated file · +4 −4
Mtypescript-zoddefault / TopLevel.ts+4 −4
@@ -4,20 +4,20 @@ import * as z from "zod";
44 export const StreetSchema = z.object({
55 "id": z.number().int(),
66 "name": z.string(),
7-});
7+}).strict();
88 export type Street = z.infer<typeof StreetSchema>;
99
1010 export const OutcomeStatusSchema = z.object({
1111 "category": z.string(),
1212 "date": z.string(),
13-});
13+}).strict();
1414 export type OutcomeStatus = z.infer<typeof OutcomeStatusSchema>;
1515
1616 export const LocationSchema = z.object({
1717 "latitude": z.string(),
1818 "longitude": z.string(),
1919 "street": StreetSchema,
20-});
20+}).strict();
2121 export type Location = z.infer<typeof LocationSchema>;
2222
2323 export const TopLevelElementSchema = z.object({
@@ -30,7 +30,7 @@ export const TopLevelElementSchema = z.object({
3030 "month": z.string(),
3131 "outcome_status": OutcomeStatusSchema,
3232 "persistent_id": z.string(),
33-});
33+}).strict();
3434 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
3535
3636 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/misc/14d38.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -6,10 +6,10 @@ export const HeadersSchema = z.object({
66 "Connection": z.string(),
77 "Host": z.string(),
88 "User-Agent": z.string(),
9-});
9+}).strict();
1010 export type Headers = z.infer<typeof HeadersSchema>;
1111
1212 export const TopLevelSchema = z.object({
1313 "headers": HeadersSchema,
14-});
14+}).strict();
1515 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/167d6.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -5,5 +5,5 @@ export const TopLevelSchema = z.object({
55 "base": z.string(),
66 "date": z.string(),
77 "rates": z.record(z.string(), z.number()),
8-});
8+}).strict();
99 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/16bc5.json

1 generated file · +14 −14
Mtypescript-zoddefault / TopLevel.ts+14 −14
@@ -4,7 +4,7 @@ import * as z from "zod";
44 export const AstronomySchema = z.object({
55 "sunrise": z.string(),
66 "sunset": z.string(),
7-});
7+}).strict();
88 export type Astronomy = z.infer<typeof AstronomySchema>;
99
1010 export const AtmosphereSchema = z.object({
@@ -12,7 +12,7 @@ export const AtmosphereSchema = z.object({
1212 "pressure": z.string(),
1313 "rising": z.string().regex(/^-?\d+$/),
1414 "visibility": z.string(),
15-});
15+}).strict();
1616 export type Atmosphere = z.infer<typeof AtmosphereSchema>;
1717
1818 export const ImageSchema = z.object({
@@ -21,7 +21,7 @@ export const ImageSchema = z.object({
2121 "title": z.string(),
2222 "url": z.string(),
2323 "width": z.string().regex(/^-?\d+$/),
24-});
24+}).strict();
2525 export type Image = z.infer<typeof ImageSchema>;
2626
2727 export const ConditionSchema = z.object({
@@ -29,7 +29,7 @@ export const ConditionSchema = z.object({
2929 "date": z.string(),
3030 "temp": z.string().regex(/^-?\d+$/),
3131 "text": z.string(),
32-});
32+}).strict();
3333 export type Condition = z.infer<typeof ConditionSchema>;
3434
3535 export const ForecastSchema = z.object({
@@ -39,19 +39,19 @@ export const ForecastSchema = z.object({
3939 "high": z.string().regex(/^-?\d+$/),
4040 "low": z.string().regex(/^-?\d+$/),
4141 "text": z.string(),
42-});
42+}).strict();
4343 export type Forecast = z.infer<typeof ForecastSchema>;
4444
4545 export const GuidSchema = z.object({
4646 "isPermaLink": z.enum(["true", "false"]),
47-});
47+}).strict();
4848 export type Guid = z.infer<typeof GuidSchema>;
4949
5050 export const LocationSchema = z.object({
5151 "city": z.string(),
5252 "country": z.string(),
5353 "region": z.string(),
54-});
54+}).strict();
5555 export type Location = z.infer<typeof LocationSchema>;
5656
5757 export const UnitsSchema = z.object({
@@ -59,14 +59,14 @@ export const UnitsSchema = z.object({
5959 "pressure": z.string(),
6060 "speed": z.string(),
6161 "temperature": z.string(),
62-});
62+}).strict();
6363 export type Units = z.infer<typeof UnitsSchema>;
6464
6565 export const WindSchema = z.object({
6666 "chill": z.string().regex(/^-?\d+$/),
6767 "direction": z.string().regex(/^-?\d+$/),
6868 "speed": z.string().regex(/^-?\d+$/),
69-});
69+}).strict();
7070 export type Wind = z.infer<typeof WindSchema>;
7171
7272 export const ItemSchema = z.object({
@@ -79,7 +79,7 @@ export const ItemSchema = z.object({
7979 "long": z.string(),
8080 "pubDate": z.string(),
8181 "title": z.string(),
82-});
82+}).strict();
8383 export type Item = z.infer<typeof ItemSchema>;
8484
8585 export const ChannelSchema = z.object({
@@ -96,12 +96,12 @@ export const ChannelSchema = z.object({
9696 "ttl": z.string().regex(/^-?\d+$/),
9797 "units": UnitsSchema,
9898 "wind": WindSchema,
99-});
99+}).strict();
100100 export type Channel = z.infer<typeof ChannelSchema>;
101101
102102 export const ResultsSchema = z.object({
103103 "channel": ChannelSchema,
104-});
104+}).strict();
105105 export type Results = z.infer<typeof ResultsSchema>;
106106
107107 export const QuerySchema = z.object({
@@ -109,10 +109,10 @@ export const QuerySchema = z.object({
109109 "created": z.coerce.date(),
110110 "lang": z.string(),
111111 "results": ResultsSchema,
112-});
112+}).strict();
113113 export type Query = z.infer<typeof QuerySchema>;
114114
115115 export const TopLevelSchema = z.object({
116116 "query": QuerySchema,
117-});
117+}).strict();
118118 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/176f1.json

1 generated file · +5 −5
Mtypescript-zoddefault / TopLevel.ts+5 −5
@@ -4,7 +4,7 @@ import * as z from "zod";
44 export const FootnoteSchema = z.object({
55 "code": z.string().optional(),
66 "text": z.string().optional(),
7-});
7+}).strict();
88 export type Footnote = z.infer<typeof FootnoteSchema>;
99
1010 export const DatumSchema = z.object({
@@ -13,18 +13,18 @@ export const DatumSchema = z.object({
1313 "periodName": z.string(),
1414 "value": z.string(),
1515 "year": z.string().regex(/^-?\d+$/),
16-});
16+}).strict();
1717 export type Datum = z.infer<typeof DatumSchema>;
1818
1919 export const SeriesSchema = z.object({
2020 "data": z.array(DatumSchema),
2121 "seriesID": z.string(),
22-});
22+}).strict();
2323 export type Series = z.infer<typeof SeriesSchema>;
2424
2525 export const ResultsSchema = z.object({
2626 "series": z.array(SeriesSchema),
27-});
27+}).strict();
2828 export type Results = z.infer<typeof ResultsSchema>;
2929
3030 export const TopLevelSchema = z.object({
@@ -32,5 +32,5 @@ export const TopLevelSchema = z.object({
3232 "responseTime": z.number().int(),
3333 "Results": ResultsSchema,
3434 "status": z.string(),
35-});
35+}).strict();
3636 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/1a7f5.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -13,7 +13,7 @@ export const TopLevelElementSchema = z.object({
1313 "males": z.number().int(),
1414 "total": z.number().int(),
1515 "year": z.number().int(),
16-});
16+}).strict();
1717 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
1818
1919 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/misc/1b28c.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -4,10 +4,10 @@ import * as z from "zod";
44 export const TotalPopulationSchema = z.object({
55 "date": z.string(),
66 "population": z.number().int(),
7-});
7+}).strict();
88 export type TotalPopulation = z.infer<typeof TotalPopulationSchema>;
99
1010 export const TopLevelSchema = z.object({
1111 "total_population": z.array(TotalPopulationSchema),
12-});
12+}).strict();
1313 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/1b409.json

1 generated file · +5 −5
Mtypescript-zoddefault / TopLevel.ts+5 −5
@@ -56,7 +56,7 @@ export const MetaSchema = z.object({
5656 "limit": z.number().int(),
5757 "offset": z.number().int(),
5858 "total_count": z.number().int(),
59-});
59+}).strict();
6060 export type Meta = z.infer<typeof MetaSchema>;
6161
6262 export const ExtraSchema = z.object({
@@ -65,7 +65,7 @@ export const ExtraSchema = z.object({
6565 "fax": z.union([z.null(), z.string()]).optional(),
6666 "office": z.string(),
6767 "rss_url": z.string().optional(),
68-});
68+}).strict();
6969 export type Extra = z.infer<typeof ExtraSchema>;
7070
7171 export const PersonSchema = z.object({
@@ -87,7 +87,7 @@ export const PersonSchema = z.object({
8787 "sortname": z.string(),
8888 "twitterid": z.union([z.null(), z.string()]),
8989 "youtubeid": z.union([z.null(), z.string()]),
90-});
90+}).strict();
9191 export type Person = z.infer<typeof PersonSchema>;
9292
9393 export const ObjectElementSchema = z.object({
@@ -112,11 +112,11 @@ export const ObjectElementSchema = z.object({
112112 "title": TitleSchema,
113113 "title_long": RoleTypeLabelSchema,
114114 "website": z.string(),
115-});
115+}).strict();
116116 export type ObjectElement = z.infer<typeof ObjectElementSchema>;
117117
118118 export const TopLevelSchema = z.object({
119119 "meta": MetaSchema,
120120 "objects": z.array(ObjectElementSchema),
121-});
121+}).strict();
122122 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/2465e.json

1 generated file · +13 −13
Mtypescript-zoddefault / TopLevel.ts+13 −13
@@ -4,14 +4,14 @@ import * as z from "zod";
44 export const AnnotationsSchema = z.object({
55 "description": z.string(),
66 "type": z.string(),
7-});
7+}).strict();
88 export type Annotations = z.infer<typeof AnnotationsSchema>;
99
1010 export const InfoSchema = z.object({
1111 "description": z.string(),
1212 "title": z.string(),
1313 "version": z.string(),
14-});
14+}).strict();
1515 export type Info = z.infer<typeof InfoSchema>;
1616
1717 export const ParameterSchema = z.object({
@@ -21,12 +21,12 @@ export const ParameterSchema = z.object({
2121 "name": z.string(),
2222 "required": z.boolean(),
2323 "type": z.string(),
24-});
24+}).strict();
2525 export type Parameter = z.infer<typeof ParameterSchema>;
2626
2727 export const SchemaSchema = z.object({
2828 "$ref": z.string(),
29-});
29+}).strict();
3030 export type Schema = z.infer<typeof SchemaSchema>;
3131
3232 export const PropertiesSchema = z.object({
@@ -36,28 +36,28 @@ export const PropertiesSchema = z.object({
3636 "label": AnnotationsSchema,
3737 "sub_class_of": AnnotationsSchema,
3838 "type": AnnotationsSchema,
39-});
39+}).strict();
4040 export type Properties = z.infer<typeof PropertiesSchema>;
4141
4242 export const The200Schema = z.object({
4343 "description": z.string(),
4444 "schema": SchemaSchema,
45-});
45+}).strict();
4646 export type The200 = z.infer<typeof The200Schema>;
4747
4848 export const TaxonomySchema = z.object({
4949 "properties": PropertiesSchema,
50-});
50+}).strict();
5151 export type Taxonomy = z.infer<typeof TaxonomySchema>;
5252
5353 export const ResponsesSchema = z.object({
5454 "200": The200Schema,
55-});
55+}).strict();
5656 export type Responses = z.infer<typeof ResponsesSchema>;
5757
5858 export const DefinitionsSchema = z.object({
5959 "Taxonomy": TaxonomySchema,
60-});
60+}).strict();
6161 export type Definitions = z.infer<typeof DefinitionsSchema>;
6262
6363 export const GetSchema = z.object({
@@ -66,17 +66,17 @@ export const GetSchema = z.object({
6666 "responses": ResponsesSchema,
6767 "summary": z.string(),
6868 "tags": z.array(z.string()),
69-});
69+}).strict();
7070 export type Get = z.infer<typeof GetSchema>;
7171
7272 export const ItaTaxonomiesSearchSchema = z.object({
7373 "get": GetSchema,
74-});
74+}).strict();
7575 export type ItaTaxonomiesSearch = z.infer<typeof ItaTaxonomiesSearchSchema>;
7676
7777 export const PathsSchema = z.object({
7878 "/ita_taxonomies/search": ItaTaxonomiesSearchSchema,
79-});
79+}).strict();
8080 export type Paths = z.infer<typeof PathsSchema>;
8181
8282 export const TopLevelSchema = z.object({
@@ -88,5 +88,5 @@ export const TopLevelSchema = z.object({
8888 "produces": z.array(z.string()),
8989 "schemes": z.array(z.string()),
9090 "swagger": z.string(),
91-});
91+}).strict();
9292 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/24f52.json

1 generated file · +4 −4
Mtypescript-zoddefault / TopLevel.ts+4 −4
@@ -11,14 +11,14 @@ export const StatusSchema = z.object({
1111 "reason": z.string(),
1212 "trend": z.string(),
1313 "type": z.string(),
14-});
14+}).strict();
1515 export type Status = z.infer<typeof StatusSchema>;
1616
1717 export const MetaSchema = z.object({
1818 "credit": z.string(),
1919 "updated": z.string(),
2020 "url": z.string(),
21-});
21+}).strict();
2222 export type Meta = z.infer<typeof MetaSchema>;
2323
2424 export const WeatherSchema = z.object({
@@ -27,7 +27,7 @@ export const WeatherSchema = z.object({
2727 "visibility": z.number(),
2828 "weather": z.string(),
2929 "wind": z.string(),
30-});
30+}).strict();
3131 export type Weather = z.infer<typeof WeatherSchema>;
3232
3333 export const TopLevelSchema = z.object({
@@ -39,5 +39,5 @@ export const TopLevelSchema = z.object({
3939 "state": z.string(),
4040 "status": StatusSchema,
4141 "weather": WeatherSchema,
42-});
42+}).strict();
4343 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/262f0.json

1 generated file · +14 −14
Mtypescript-zoddefault / TopLevel.ts+14 −14
@@ -11,7 +11,7 @@ export type Text = z.infer<typeof TextSchema>;
1111 export const AstronomySchema = z.object({
1212 "sunrise": z.string(),
1313 "sunset": z.string(),
14-});
14+}).strict();
1515 export type Astronomy = z.infer<typeof AstronomySchema>;
1616
1717 export const AtmosphereSchema = z.object({
@@ -19,7 +19,7 @@ export const AtmosphereSchema = z.object({
1919 "pressure": z.string(),
2020 "rising": z.string().regex(/^-?\d+$/),
2121 "visibility": z.string(),
22-});
22+}).strict();
2323 export type Atmosphere = z.infer<typeof AtmosphereSchema>;
2424
2525 export const ImageSchema = z.object({
@@ -28,7 +28,7 @@ export const ImageSchema = z.object({
2828 "title": z.string(),
2929 "url": z.string(),
3030 "width": z.string().regex(/^-?\d+$/),
31-});
31+}).strict();
3232 export type Image = z.infer<typeof ImageSchema>;
3333
3434 export const ConditionSchema = z.object({
@@ -36,7 +36,7 @@ export const ConditionSchema = z.object({
3636 "date": z.string(),
3737 "temp": z.string().regex(/^-?\d+$/),
3838 "text": TextSchema,
39-});
39+}).strict();
4040 export type Condition = z.infer<typeof ConditionSchema>;
4141
4242 export const ForecastSchema = z.object({
@@ -46,19 +46,19 @@ export const ForecastSchema = z.object({
4646 "high": z.string().regex(/^-?\d+$/),
4747 "low": z.string().regex(/^-?\d+$/),
4848 "text": TextSchema,
49-});
49+}).strict();
5050 export type Forecast = z.infer<typeof ForecastSchema>;
5151
5252 export const GuidSchema = z.object({
5353 "isPermaLink": z.enum(["true", "false"]),
54-});
54+}).strict();
5555 export type Guid = z.infer<typeof GuidSchema>;
5656
5757 export const LocationSchema = z.object({
5858 "city": z.string(),
5959 "country": z.string(),
6060 "region": z.string(),
61-});
61+}).strict();
6262 export type Location = z.infer<typeof LocationSchema>;
6363
6464 export const UnitsSchema = z.object({
@@ -66,14 +66,14 @@ export const UnitsSchema = z.object({
6666 "pressure": z.string(),
6767 "speed": z.string(),
6868 "temperature": z.string(),
69-});
69+}).strict();
7070 export type Units = z.infer<typeof UnitsSchema>;
7171
7272 export const WindSchema = z.object({
7373 "chill": z.string().regex(/^-?\d+$/),
7474 "direction": z.string().regex(/^-?\d+$/),
7575 "speed": z.string().regex(/^-?\d+$/),
76-});
76+}).strict();
7777 export type Wind = z.infer<typeof WindSchema>;
7878
7979 export const ItemSchema = z.object({
@@ -86,7 +86,7 @@ export const ItemSchema = z.object({
8686 "long": z.string(),
8787 "pubDate": z.string(),
8888 "title": z.string(),
89-});
89+}).strict();
9090 export type Item = z.infer<typeof ItemSchema>;
9191
9292 export const ChannelSchema = z.object({
@@ -103,12 +103,12 @@ export const ChannelSchema = z.object({
103103 "ttl": z.string().regex(/^-?\d+$/),
104104 "units": UnitsSchema,
105105 "wind": WindSchema,
106-});
106+}).strict();
107107 export type Channel = z.infer<typeof ChannelSchema>;
108108
109109 export const ResultsSchema = z.object({
110110 "channel": ChannelSchema,
111-});
111+}).strict();
112112 export type Results = z.infer<typeof ResultsSchema>;
113113
114114 export const QuerySchema = z.object({
@@ -116,10 +116,10 @@ export const QuerySchema = z.object({
116116 "created": z.coerce.date(),
117117 "lang": z.string(),
118118 "results": ResultsSchema,
119-});
119+}).strict();
120120 export type Query = z.infer<typeof QuerySchema>;
121121
122122 export const TopLevelSchema = z.object({
123123 "query": QuerySchema,
124-});
124+}).strict();
125125 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/26b49.json

1 generated file · +10 −10
Mtypescript-zoddefault / TopLevel.ts+10 −10
@@ -20,7 +20,7 @@ export const The480_WStillSchema = z.object({
2020 "size": z.string().regex(/^-?\d+$/).optional(),
2121 "url": z.string(),
2222 "width": z.string().regex(/^-?\d+$/),
23-});
23+}).strict();
2424 export type The480_WStill = z.infer<typeof The480_WStillSchema>;
2525
2626 export const DownsizedSmallSchema = z.object({
@@ -28,7 +28,7 @@ export const DownsizedSmallSchema = z.object({
2828 "mp4": z.string(),
2929 "mp4_size": z.string().regex(/^-?\d+$/),
3030 "width": z.string().regex(/^-?\d+$/),
31-});
31+}).strict();
3232 export type DownsizedSmall = z.infer<typeof DownsizedSmallSchema>;
3333
3434 export const FixedHeightSchema = z.object({
@@ -42,13 +42,13 @@ export const FixedHeightSchema = z.object({
4242 "webp": z.string(),
4343 "webp_size": z.string().regex(/^-?\d+$/),
4444 "width": z.string().regex(/^-?\d+$/),
45-});
45+}).strict();
4646 export type FixedHeight = z.infer<typeof FixedHeightSchema>;
4747
4848 export const LoopingSchema = z.object({
4949 "mp4": z.string(),
5050 "mp4_size": z.string().regex(/^-?\d+$/),
51-});
51+}).strict();
5252 export type Looping = z.infer<typeof LoopingSchema>;
5353
5454 export const UserSchema = z.object({
@@ -58,21 +58,21 @@ export const UserSchema = z.object({
5858 "profile_url": z.string(),
5959 "twitter": z.string().optional(),
6060 "username": z.string(),
61-});
61+}).strict();
6262 export type User = z.infer<typeof UserSchema>;
6363
6464 export const MetaSchema = z.object({
6565 "msg": z.string(),
6666 "response_id": z.string(),
6767 "status": z.number().int(),
68-});
68+}).strict();
6969 export type Meta = z.infer<typeof MetaSchema>;
7070
7171 export const PaginationSchema = z.object({
7272 "count": z.number().int(),
7373 "offset": z.number().int(),
7474 "total_count": z.number().int(),
75-});
75+}).strict();
7676 export type Pagination = z.infer<typeof PaginationSchema>;
7777
7878 export const ImagesSchema = z.object({
@@ -100,7 +100,7 @@ export const ImagesSchema = z.object({
100100 "preview_gif": The480_WStillSchema,
101101 "preview_webp": The480_WStillSchema,
102102 "480w_still": The480_WStillSchema.optional(),
103-});
103+}).strict();
104104 export type Images = z.infer<typeof ImagesSchema>;
105105
106106 export const DatumSchema = z.object({
@@ -122,12 +122,12 @@ export const DatumSchema = z.object({
122122 "url": z.string(),
123123 "user": UserSchema.optional(),
124124 "username": z.string(),
125-});
125+}).strict();
126126 export type Datum = z.infer<typeof DatumSchema>;
127127
128128 export const TopLevelSchema = z.object({
129129 "data": z.array(DatumSchema),
130130 "meta": MetaSchema,
131131 "pagination": PaginationSchema,
132-});
132+}).strict();
133133 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/26c9c.json

1 generated file · +24 −24
Mtypescript-zoddefault / TopLevel.ts+24 −24
@@ -4,7 +4,7 @@ import * as z from "zod";
44 export const TopSchema = z.object({
55 "count": z.number().int(),
66 "item": z.string(),
7-});
7+}).strict();
88 export type Top = z.infer<typeof TopSchema>;
99
1010 export const FormatSchema = z.object({
@@ -12,14 +12,14 @@ export const FormatSchema = z.object({
1212 "noCommas": z.enum(["true", "false"]).optional(),
1313 "precisionStyle": z.string().optional(),
1414 "view": z.string().optional(),
15-});
15+}).strict();
1616 export type Format = z.infer<typeof FormatSchema>;
1717
1818 export const GrantSchema = z.object({
1919 "flags": z.array(z.string()),
2020 "inherited": z.boolean(),
2121 "type": z.string(),
22-});
22+}).strict();
2323 export type Grant = z.infer<typeof GrantSchema>;
2424
2525 export const AttachmentSchema = z.object({
@@ -27,25 +27,25 @@ export const AttachmentSchema = z.object({
2727 "blobId": z.string(),
2828 "filename": z.string(),
2929 "name": z.string(),
30-});
30+}).strict();
3131 export type Attachment = z.infer<typeof AttachmentSchema>;
3232
3333 export const AdditionalResourcesSchema = z.object({
3434 "See Also ": z.string(),
3535 "See Also": z.string(),
36-});
36+}).strict();
3737 export type AdditionalResources = z.infer<typeof AdditionalResourcesSchema>;
3838
3939 export const CommonCoreSchema = z.object({
4040 "Contact Email": z.string(),
4141 "Contact Name": z.string(),
4242 "Publisher": z.string(),
43-});
43+}).strict();
4444 export type CommonCore = z.infer<typeof CommonCoreSchema>;
4545
4646 export const DatasetInformationSchema = z.object({
4747 "Agency": z.string(),
48-});
48+}).strict();
4949 export type DatasetInformation = z.infer<typeof DatasetInformationSchema>;
5050
5151 export const DatasetSummarySchema = z.object({
@@ -58,23 +58,23 @@ export const DatasetSummarySchema = z.object({
5858 "Posting Frequency": z.string(),
5959 "Time Period": z.string(),
6060 "Units": z.string(),
61-});
61+}).strict();
6262 export type DatasetSummary = z.infer<typeof DatasetSummarySchema>;
6363
6464 export const NotesSchema = z.object({
6565 "Notes": z.string(),
66-});
66+}).strict();
6767 export type Notes = z.infer<typeof NotesSchema>;
6868
6969 export const OrderSchema = z.object({
7070 "ascending": z.boolean(),
7171 "columnFieldName": z.string(),
72-});
72+}).strict();
7373 export type Order = z.infer<typeof OrderSchema>;
7474
7575 export const VisibleSchema = z.object({
7676 "table": z.boolean(),
77-});
77+}).strict();
7878 export type Visible = z.infer<typeof VisibleSchema>;
7979
8080 export const OwnerSchema = z.object({
@@ -86,13 +86,13 @@ export const OwnerSchema = z.object({
8686 "rights": z.array(z.string()),
8787 "roleName": z.string(),
8888 "screenName": z.string(),
89-});
89+}).strict();
9090 export type Owner = z.infer<typeof OwnerSchema>;
9191
9292 export const ExpressionSchema = z.object({
9393 "columnId": z.number().int(),
9494 "type": z.string(),
95-});
95+}).strict();
9696 export type Expression = z.infer<typeof ExpressionSchema>;
9797
9898 export const CachedContentsSchema = z.object({
@@ -103,7 +103,7 @@ export const CachedContentsSchema = z.object({
103103 "smallest": z.string(),
104104 "sum": z.string().regex(/^-?\d+$/).optional(),
105105 "top": z.array(TopSchema),
106-});
106+}).strict();
107107 export type CachedContents = z.infer<typeof CachedContentsSchema>;
108108
109109 export const CustomFieldsSchema = z.object({
@@ -112,23 +112,23 @@ export const CustomFieldsSchema = z.object({
112112 "Dataset Information": DatasetInformationSchema,
113113 "Dataset Summary": DatasetSummarySchema,
114114 "Notes": NotesSchema,
115-});
115+}).strict();
116116 export type CustomFields = z.infer<typeof CustomFieldsSchema>;
117117
118118 export const JsonQuerySchema = z.object({
119119 "order": z.array(OrderSchema),
120-});
120+}).strict();
121121 export type JsonQuery = z.infer<typeof JsonQuerySchema>;
122122
123123 export const RenderTypeConfigSchema = z.object({
124124 "visible": VisibleSchema,
125-});
125+}).strict();
126126 export type RenderTypeConfig = z.infer<typeof RenderTypeConfigSchema>;
127127
128128 export const OrderBySchema = z.object({
129129 "ascending": z.boolean(),
130130 "expression": ExpressionSchema,
131-});
131+}).strict();
132132 export type OrderBy = z.infer<typeof OrderBySchema>;
133133
134134 export const ColumnSchema = z.object({
@@ -143,7 +143,7 @@ export const ColumnSchema = z.object({
143143 "renderTypeName": z.string(),
144144 "tableColumnId": z.number().int().optional(),
145145 "width": z.number().int().optional(),
146-});
146+}).strict();
147147 export type Column = z.infer<typeof ColumnSchema>;
148148
149149 export const MetadataSchema = z.object({
@@ -153,12 +153,12 @@ export const MetadataSchema = z.object({
153153 "jsonQuery": JsonQuerySchema,
154154 "rdfSubject": z.string().regex(/^-?\d+$/),
155155 "renderTypeConfig": RenderTypeConfigSchema,
156-});
156+}).strict();
157157 export type Metadata = z.infer<typeof MetadataSchema>;
158158
159159 export const QuerySchema = z.object({
160160 "orderBys": z.array(OrderBySchema),
161-});
161+}).strict();
162162 export type Query = z.infer<typeof QuerySchema>;
163163
164164 export const ViewSchema = z.object({
@@ -200,16 +200,16 @@ export const ViewSchema = z.object({
200200 "viewCount": z.number().int(),
201201 "viewLastModified": z.number().int(),
202202 "viewType": z.string(),
203-});
203+}).strict();
204204 export type View = z.infer<typeof ViewSchema>;
205205
206206 export const MetaSchema = z.object({
207207 "view": ViewSchema,
208-});
208+}).strict();
209209 export type Meta = z.infer<typeof MetaSchema>;
210210
211211 export const TopLevelSchema = z.object({
212212 "data": z.array(z.array(z.union([z.null(), z.number().int(), z.string()]))),
213213 "meta": MetaSchema,
214-});
214+}).strict();
215215 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/27332.json

1 generated file · +11 −11
Mtypescript-zoddefault / TopLevel.ts+11 −11
@@ -59,7 +59,7 @@ export const OembedSchema = z.object({
5959 "type": z.string(),
6060 "version": z.string(),
6161 "width": z.number().int(),
62-});
62+}).strict();
6363 export type Oembed = z.infer<typeof OembedSchema>;
6464
6565 export const MediaEmbedSchema = z.object({
@@ -67,24 +67,24 @@ export const MediaEmbedSchema = z.object({
6767 "height": z.number().int().optional(),
6868 "scrolling": z.boolean().optional(),
6969 "width": z.number().int().optional(),
70-});
70+}).strict();
7171 export type MediaEmbed = z.infer<typeof MediaEmbedSchema>;
7272
7373 export const SourceSchema = z.object({
7474 "height": z.number().int(),
7575 "url": z.string(),
7676 "width": z.number().int(),
77-});
77+}).strict();
7878 export type Source = z.infer<typeof SourceSchema>;
7979
8080 export const VariantsSchema = z.object({
81-});
81+}).strict();
8282 export type Variants = z.infer<typeof VariantsSchema>;
8383
8484 export const MediaSchema = z.object({
8585 "oembed": OembedSchema,
8686 "type": DomainSchema,
87-});
87+}).strict();
8888 export type Media = z.infer<typeof MediaSchema>;
8989
9090 export const ImageSchema = z.object({
@@ -92,13 +92,13 @@ export const ImageSchema = z.object({
9292 "resolutions": z.array(SourceSchema),
9393 "source": SourceSchema,
9494 "variants": VariantsSchema,
95-});
95+}).strict();
9696 export type Image = z.infer<typeof ImageSchema>;
9797
9898 export const PreviewSchema = z.object({
9999 "enabled": z.boolean(),
100100 "images": z.array(ImageSchema),
101-});
101+}).strict();
102102 export type Preview = z.infer<typeof PreviewSchema>;
103103
104104 export const ChildDataSchema = z.object({
@@ -166,13 +166,13 @@ export const ChildDataSchema = z.object({
166166 "user_reports": z.array(z.any()),
167167 "view_count": z.null(),
168168 "visited": z.boolean(),
169-});
169+}).strict();
170170 export type ChildData = z.infer<typeof ChildDataSchema>;
171171
172172 export const ChildSchema = z.object({
173173 "data": ChildDataSchema,
174174 "kind": KindSchema,
175-});
175+}).strict();
176176 export type Child = z.infer<typeof ChildSchema>;
177177
178178 export const TopLevelDataSchema = z.object({
@@ -180,11 +180,11 @@ export const TopLevelDataSchema = z.object({
180180 "before": z.null(),
181181 "children": z.array(ChildSchema),
182182 "modhash": z.string(),
183-});
183+}).strict();
184184 export type TopLevelData = z.infer<typeof TopLevelDataSchema>;
185185
186186 export const TopLevelSchema = z.object({
187187 "data": TopLevelDataSchema,
188188 "kind": z.string(),
189-});
189+}).strict();
190190 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/29f47.json

1 generated file · +10 −10
Mtypescript-zoddefault / TopLevel.ts+10 −10
@@ -51,26 +51,26 @@ export const KindSchema = z.enum([
5151 export type Kind = z.infer<typeof KindSchema>;
5252
5353 export const MediaEmbedSchema = z.object({
54-});
54+}).strict();
5555 export type MediaEmbed = z.infer<typeof MediaEmbedSchema>;
5656
5757 export const SourceSchema = z.object({
5858 "height": z.number().int(),
5959 "url": z.string(),
6060 "width": z.number().int(),
61-});
61+}).strict();
6262 export type Source = z.infer<typeof SourceSchema>;
6363
6464 export const GifSchema = z.object({
6565 "resolutions": z.array(SourceSchema),
6666 "source": SourceSchema,
67-});
67+}).strict();
6868 export type Gif = z.infer<typeof GifSchema>;
6969
7070 export const VariantsSchema = z.object({
7171 "gif": GifSchema.optional(),
7272 "mp4": GifSchema.optional(),
73-});
73+}).strict();
7474 export type Variants = z.infer<typeof VariantsSchema>;
7575
7676 export const ImageSchema = z.object({
@@ -78,13 +78,13 @@ export const ImageSchema = z.object({
7878 "resolutions": z.array(SourceSchema),
7979 "source": SourceSchema,
8080 "variants": VariantsSchema,
81-});
81+}).strict();
8282 export type Image = z.infer<typeof ImageSchema>;
8383
8484 export const PreviewSchema = z.object({
8585 "enabled": z.boolean(),
8686 "images": z.array(ImageSchema),
87-});
87+}).strict();
8888 export type Preview = z.infer<typeof PreviewSchema>;
8989
9090 export const ChildDataSchema = z.object({
@@ -152,13 +152,13 @@ export const ChildDataSchema = z.object({
152152 "user_reports": z.array(z.any()),
153153 "view_count": z.null(),
154154 "visited": z.boolean(),
155-});
155+}).strict();
156156 export type ChildData = z.infer<typeof ChildDataSchema>;
157157
158158 export const ChildSchema = z.object({
159159 "data": ChildDataSchema,
160160 "kind": KindSchema,
161-});
161+}).strict();
162162 export type Child = z.infer<typeof ChildSchema>;
163163
164164 export const TopLevelDataSchema = z.object({
@@ -166,11 +166,11 @@ export const TopLevelDataSchema = z.object({
166166 "before": z.null(),
167167 "children": z.array(ChildSchema),
168168 "modhash": z.string(),
169-});
169+}).strict();
170170 export type TopLevelData = z.infer<typeof TopLevelDataSchema>;
171171
172172 export const TopLevelSchema = z.object({
173173 "data": TopLevelDataSchema,
174174 "kind": z.string(),
175-});
175+}).strict();
176176 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/2d4e2.json

1 generated file · +5 −5
Mtypescript-zoddefault / TopLevel.ts+5 −5
@@ -82,7 +82,7 @@ export const MetaSchema = z.object({
8282 "limit": z.number().int(),
8383 "offset": z.number().int(),
8484 "total_count": z.number().int(),
85-});
85+}).strict();
8686 export type Meta = z.infer<typeof MetaSchema>;
8787
8888 export const ExtraSchema = z.object({
@@ -91,7 +91,7 @@ export const ExtraSchema = z.object({
9191 "fax": z.string().optional(),
9292 "office": z.string(),
9393 "rss_url": z.string().optional(),
94-});
94+}).strict();
9595 export type Extra = z.infer<typeof ExtraSchema>;
9696
9797 export const PersonSchema = z.object({
@@ -113,7 +113,7 @@ export const PersonSchema = z.object({
113113 "sortname": z.string(),
114114 "twitterid": z.union([z.null(), z.string()]),
115115 "youtubeid": z.union([z.null(), z.string()]),
116-});
116+}).strict();
117117 export type Person = z.infer<typeof PersonSchema>;
118118
119119 export const ObjectElementSchema = z.object({
@@ -140,11 +140,11 @@ export const ObjectElementSchema = z.object({
140140 "title": TitleSchema,
141141 "title_long": RoleTypeLabelSchema,
142142 "website": z.string(),
143-});
143+}).strict();
144144 export type ObjectElement = z.infer<typeof ObjectElementSchema>;
145145
146146 export const TopLevelSchema = z.object({
147147 "meta": MetaSchema,
148148 "objects": z.array(ObjectElementSchema),
149-});
149+}).strict();
150150 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/2df80.json

1 generated file · +3 −3
Mtypescript-zoddefault / TopLevel.ts+3 −3
@@ -57,7 +57,7 @@ export type Value = z.infer<typeof ValueSchema>;
5757 export const AdminregionSchema = z.object({
5858 "id": IdSchema,
5959 "value": ValueSchema,
60-});
60+}).strict();
6161 export type Adminregion = z.infer<typeof AdminregionSchema>;
6262
6363 export const FluffyTopLevelSchema = z.object({
@@ -65,7 +65,7 @@ export const FluffyTopLevelSchema = z.object({
6565 "pages": z.number().int(),
6666 "per_page": z.string().regex(/^-?\d+$/),
6767 "total": z.number().int(),
68-});
68+}).strict();
6969 export type FluffyTopLevel = z.infer<typeof FluffyTopLevelSchema>;
7070
7171 export const PurpleTopLevelSchema = z.object({
@@ -79,7 +79,7 @@ export const PurpleTopLevelSchema = z.object({
7979 "longitude": z.string(),
8080 "name": z.string(),
8181 "region": AdminregionSchema,
82-});
82+}).strict();
8383 export type PurpleTopLevel = z.infer<typeof PurpleTopLevelSchema>;
8484
8585 export const TopLevelSchema = z.array(z.union([z.array(PurpleTopLevelSchema), FluffyTopLevelSchema]));
Test case

test/inputs/json/misc/31189.json

1 generated file · +4 −4
Mtypescript-zoddefault / TopLevel.ts+4 −4
@@ -8,13 +8,13 @@ export const RatesSchema = z.object({
88 "reduced2": z.number().optional(),
99 "standard": z.number(),
1010 "super_reduced": z.number().optional(),
11-});
11+}).strict();
1212 export type Rates = z.infer<typeof RatesSchema>;
1313
1414 export const PeriodSchema = z.object({
1515 "effective_from": z.string(),
1616 "rates": RatesSchema,
17-});
17+}).strict();
1818 export type Period = z.infer<typeof PeriodSchema>;
1919
2020 export const RateSchema = z.object({
@@ -22,12 +22,12 @@ export const RateSchema = z.object({
2222 "country_code": z.string(),
2323 "name": z.string(),
2424 "periods": z.array(PeriodSchema),
25-});
25+}).strict();
2626 export type Rate = z.infer<typeof RateSchema>;
2727
2828 export const TopLevelSchema = z.object({
2929 "details": z.string(),
3030 "rates": z.array(RateSchema),
3131 "version": z.null(),
32-});
32+}).strict();
3333 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/32431.json

1 generated file · +5 −5
Mtypescript-zoddefault / TopLevel.ts+5 −5
@@ -36,7 +36,7 @@ export type FeatureType = z.infer<typeof FeatureTypeSchema>;
3636 export const GeometrySchema = z.object({
3737 "coordinates": z.array(z.number()),
3838 "type": GeometryTypeSchema,
39-});
39+}).strict();
4040 export type Geometry = z.infer<typeof GeometrySchema>;
4141
4242 export const PropertiesSchema = z.object({
@@ -66,7 +66,7 @@ export const PropertiesSchema = z.object({
6666 "tz": z.number().int(),
6767 "updated": z.number().int(),
6868 "url": z.string(),
69-});
69+}).strict();
7070 export type Properties = z.infer<typeof PropertiesSchema>;
7171
7272 export const MetadataSchema = z.object({
@@ -76,7 +76,7 @@ export const MetadataSchema = z.object({
7676 "status": z.number().int(),
7777 "title": z.string(),
7878 "url": z.string(),
79-});
79+}).strict();
8080 export type Metadata = z.infer<typeof MetadataSchema>;
8181
8282 export const FeatureSchema = z.object({
@@ -84,7 +84,7 @@ export const FeatureSchema = z.object({
8484 "id": z.string(),
8585 "properties": PropertiesSchema,
8686 "type": FeatureTypeSchema,
87-});
87+}).strict();
8888 export type Feature = z.infer<typeof FeatureSchema>;
8989
9090 export const TopLevelSchema = z.object({
@@ -92,5 +92,5 @@ export const TopLevelSchema = z.object({
9292 "features": z.array(FeatureSchema),
9393 "metadata": MetadataSchema,
9494 "type": z.string(),
95-});
95+}).strict();
9696 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/32d5c.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -10,7 +10,7 @@ export const TopLevelElementSchema = z.object({
1010 "PersonID": z.number().int(),
1111 "PhotoURL": z.string(),
1212 "PreferredName": z.string(),
13-});
13+}).strict();
1414 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
1515
1616 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/misc/337ed.json

1 generated file · +4 −4
Mtypescript-zoddefault / TopLevel.ts+4 −4
@@ -23,7 +23,7 @@ export const ResultTypeSchema = z.enum([
2323 export type ResultType = z.infer<typeof ResultTypeSchema>;
2424
2525 export const FacetsSchema = z.object({
26-});
26+}).strict();
2727 export type Facets = z.infer<typeof FacetsSchema>;
2828
2929 export const CustomIncomeSchema = z.object({
@@ -35,7 +35,7 @@ export const CustomIncomeSchema = z.object({
3535 "type": CustomIncomeTypeSchema,
3636 "updated_at": z.coerce.date(),
3737 "uri": z.string(),
38-});
38+}).strict();
3939 export type CustomIncome = z.infer<typeof CustomIncomeSchema>;
4040
4141 export const ResultSchema = z.object({
@@ -71,7 +71,7 @@ export const ResultSchema = z.object({
7171 "type": ResultTypeSchema,
7272 "updated_at": z.coerce.date(),
7373 "uri": z.string(),
74-});
74+}).strict();
7575 export type Result = z.infer<typeof ResultSchema>;
7676
7777 export const TopLevelSchema = z.object({
@@ -82,5 +82,5 @@ export const TopLevelSchema = z.object({
8282 "offset": z.number().int(),
8383 "previous": z.boolean(),
8484 "results": z.array(ResultSchema),
85-});
85+}).strict();
8686 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/33d2e.json

1 generated file · +4 −4
Mtypescript-zoddefault / TopLevel.ts+4 −4
@@ -23,7 +23,7 @@ export const AffiliationClassSchema = z.object({
2323 "city": z.string().optional(),
2424 "country": z.string().optional(),
2525 "name": z.string().optional(),
26-});
26+}).strict();
2727 export type AffiliationClass = z.infer<typeof AffiliationClassSchema>;
2828
2929 export const PrizeSchema = z.object({
@@ -33,7 +33,7 @@ export const PrizeSchema = z.object({
3333 "overallMotivation": z.string().optional(),
3434 "share": z.string().regex(/^-?\d+$/).optional(),
3535 "year": z.string().regex(/^-?\d+$/).optional(),
36-});
36+}).strict();
3737 export type Prize = z.infer<typeof PrizeSchema>;
3838
3939 export const LaureateSchema = z.object({
@@ -50,10 +50,10 @@ export const LaureateSchema = z.object({
5050 "id": z.string().regex(/^-?\d+$/),
5151 "prizes": z.array(PrizeSchema),
5252 "surname": z.string().optional(),
53-});
53+}).strict();
5454 export type Laureate = z.infer<typeof LaureateSchema>;
5555
5656 export const TopLevelSchema = z.object({
5757 "laureates": z.array(LaureateSchema),
58-});
58+}).strict();
5959 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/34702.json

1 generated file · +6 −6
Mtypescript-zoddefault / TopLevel.ts+6 −6
@@ -65,13 +65,13 @@ export type FeatureType = z.infer<typeof FeatureTypeSchema>;
6565
6666 export const CrsPropertiesSchema = z.object({
6767 "name": z.string(),
68-});
68+}).strict();
6969 export type CrsProperties = z.infer<typeof CrsPropertiesSchema>;
7070
7171 export const GeometrySchema = z.object({
7272 "coordinates": z.array(z.number()),
7373 "type": GeometryTypeSchema,
74-});
74+}).strict();
7575 export type Geometry = z.infer<typeof GeometrySchema>;
7676
7777 export const FeaturePropertiesSchema = z.object({
@@ -90,13 +90,13 @@ export const FeaturePropertiesSchema = z.object({
9090 "street": z.string(),
9191 "suburb": z.string(),
9292 "type": z.union([z.null(), PropertiesTypeSchema]),
93-});
93+}).strict();
9494 export type FeatureProperties = z.infer<typeof FeaturePropertiesSchema>;
9595
9696 export const CrsSchema = z.object({
9797 "properties": CrsPropertiesSchema,
9898 "type": z.string(),
99-});
99+}).strict();
100100 export type Crs = z.infer<typeof CrsSchema>;
101101
102102 export const FeatureSchema = z.object({
@@ -105,7 +105,7 @@ export const FeatureSchema = z.object({
105105 "id": z.string(),
106106 "properties": FeaturePropertiesSchema,
107107 "type": FeatureTypeSchema,
108-});
108+}).strict();
109109 export type Feature = z.infer<typeof FeatureSchema>;
110110
111111 export const TopLevelSchema = z.object({
@@ -113,5 +113,5 @@ export const TopLevelSchema = z.object({
113113 "features": z.array(FeatureSchema),
114114 "totalFeatures": z.number().int(),
115115 "type": z.string(),
116-});
116+}).strict();
117117 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/3536b.json

1 generated file · +4 −4
Mtypescript-zoddefault / TopLevel.ts+4 −4
@@ -19,20 +19,20 @@ export type Keyword = z.infer<typeof KeywordSchema>;
1919 export const IdentifierSchema = z.object({
2020 "identifier": z.string(),
2121 "scheme": SchemeSchema,
22-});
22+}).strict();
2323 export type Identifier = z.infer<typeof IdentifierSchema>;
2424
2525 export const LinkSchema = z.object({
2626 "note": z.string(),
2727 "url": z.string(),
28-});
28+}).strict();
2929 export type Link = z.infer<typeof LinkSchema>;
3030
3131 export const TextSchema = z.object({
3232 "media_type": z.string(),
3333 "title": z.string(),
3434 "url": z.string(),
35-});
35+}).strict();
3636 export type Text = z.infer<typeof TextSchema>;
3737
3838 export const TopLevelElementSchema = z.object({
@@ -44,7 +44,7 @@ export const TopLevelElementSchema = z.object({
4444 "other_names": z.array(z.any()),
4545 "superseded_by": z.string(),
4646 "text": z.array(TextSchema),
47-});
47+}).strict();
4848 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
4949
5050 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/misc/3659d.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -4,10 +4,10 @@ import * as z from "zod";
44 export const TotalPopulationSchema = z.object({
55 "date": z.string(),
66 "population": z.number().int(),
7-});
7+}).strict();
88 export type TotalPopulation = z.infer<typeof TotalPopulationSchema>;
99
1010 export const TopLevelSchema = z.object({
1111 "total_population": z.array(TotalPopulationSchema),
12-});
12+}).strict();
1313 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/36d5d.json

1 generated file · +4 −4
Mtypescript-zoddefault / TopLevel.ts+4 −4
@@ -11,14 +11,14 @@ export const StatusSchema = z.object({
1111 "reason": z.string(),
1212 "trend": z.string(),
1313 "type": z.string(),
14-});
14+}).strict();
1515 export type Status = z.infer<typeof StatusSchema>;
1616
1717 export const MetaSchema = z.object({
1818 "credit": z.string(),
1919 "updated": z.string(),
2020 "url": z.string(),
21-});
21+}).strict();
2222 export type Meta = z.infer<typeof MetaSchema>;
2323
2424 export const WeatherSchema = z.object({
@@ -27,7 +27,7 @@ export const WeatherSchema = z.object({
2727 "visibility": z.number(),
2828 "weather": z.string(),
2929 "wind": z.string(),
30-});
30+}).strict();
3131 export type Weather = z.infer<typeof WeatherSchema>;
3232
3333 export const TopLevelSchema = z.object({
@@ -39,5 +39,5 @@ export const TopLevelSchema = z.object({
3939 "state": z.string(),
4040 "status": StatusSchema,
4141 "weather": WeatherSchema,
42-});
42+}).strict();
4343 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/3a6b3.json

1 generated file · +4 −4
Mtypescript-zoddefault / TopLevel.ts+4 −4
@@ -11,14 +11,14 @@ export const StatusSchema = z.object({
1111 "reason": z.string(),
1212 "trend": z.string(),
1313 "type": z.string(),
14-});
14+}).strict();
1515 export type Status = z.infer<typeof StatusSchema>;
1616
1717 export const MetaSchema = z.object({
1818 "credit": z.string(),
1919 "updated": z.string(),
2020 "url": z.string(),
21-});
21+}).strict();
2222 export type Meta = z.infer<typeof MetaSchema>;
2323
2424 export const WeatherSchema = z.object({
@@ -27,7 +27,7 @@ export const WeatherSchema = z.object({
2727 "visibility": z.number(),
2828 "weather": z.string(),
2929 "wind": z.string(),
30-});
30+}).strict();
3131 export type Weather = z.infer<typeof WeatherSchema>;
3232
3333 export const TopLevelSchema = z.object({
@@ -39,5 +39,5 @@ export const TopLevelSchema = z.object({
3939 "state": z.string(),
4040 "status": StatusSchema,
4141 "weather": WeatherSchema,
42-});
42+}).strict();
4343 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/3e9a3.json

1 generated file · +5 −5
Mtypescript-zoddefault / TopLevel.ts+5 −5
@@ -4,7 +4,7 @@ import * as z from "zod";
44 export const FootnoteSchema = z.object({
55 "code": z.string().optional(),
66 "text": z.string().optional(),
7-});
7+}).strict();
88 export type Footnote = z.infer<typeof FootnoteSchema>;
99
1010 export const DatumSchema = z.object({
@@ -13,18 +13,18 @@ export const DatumSchema = z.object({
1313 "periodName": z.string(),
1414 "value": z.string(),
1515 "year": z.string().regex(/^-?\d+$/),
16-});
16+}).strict();
1717 export type Datum = z.infer<typeof DatumSchema>;
1818
1919 export const SeriesSchema = z.object({
2020 "data": z.array(DatumSchema),
2121 "seriesID": z.string(),
22-});
22+}).strict();
2323 export type Series = z.infer<typeof SeriesSchema>;
2424
2525 export const ResultsSchema = z.object({
2626 "series": z.array(SeriesSchema),
27-});
27+}).strict();
2828 export type Results = z.infer<typeof ResultsSchema>;
2929
3030 export const TopLevelSchema = z.object({
@@ -32,5 +32,5 @@ export const TopLevelSchema = z.object({
3232 "responseTime": z.number().int(),
3333 "Results": ResultsSchema,
3434 "status": z.string(),
35-});
35+}).strict();
3636 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/3f1ce.json

1 generated file · +14 −14
Mtypescript-zoddefault / TopLevel.ts+14 −14
@@ -9,7 +9,7 @@ export type Text = z.infer<typeof TextSchema>;
99 export const AstronomySchema = z.object({
1010 "sunrise": z.string(),
1111 "sunset": z.string(),
12-});
12+}).strict();
1313 export type Astronomy = z.infer<typeof AstronomySchema>;
1414
1515 export const AtmosphereSchema = z.object({
@@ -17,7 +17,7 @@ export const AtmosphereSchema = z.object({
1717 "pressure": z.string(),
1818 "rising": z.string().regex(/^-?\d+$/),
1919 "visibility": z.string(),
20-});
20+}).strict();
2121 export type Atmosphere = z.infer<typeof AtmosphereSchema>;
2222
2323 export const ImageSchema = z.object({
@@ -26,7 +26,7 @@ export const ImageSchema = z.object({
2626 "title": z.string(),
2727 "url": z.string(),
2828 "width": z.string().regex(/^-?\d+$/),
29-});
29+}).strict();
3030 export type Image = z.infer<typeof ImageSchema>;
3131
3232 export const ConditionSchema = z.object({
@@ -34,7 +34,7 @@ export const ConditionSchema = z.object({
3434 "date": z.string(),
3535 "temp": z.string().regex(/^-?\d+$/),
3636 "text": z.string(),
37-});
37+}).strict();
3838 export type Condition = z.infer<typeof ConditionSchema>;
3939
4040 export const ForecastSchema = z.object({
@@ -44,19 +44,19 @@ export const ForecastSchema = z.object({
4444 "high": z.string().regex(/^-?\d+$/),
4545 "low": z.string().regex(/^-?\d+$/),
4646 "text": TextSchema,
47-});
47+}).strict();
4848 export type Forecast = z.infer<typeof ForecastSchema>;
4949
5050 export const GuidSchema = z.object({
5151 "isPermaLink": z.enum(["true", "false"]),
52-});
52+}).strict();
5353 export type Guid = z.infer<typeof GuidSchema>;
5454
5555 export const LocationSchema = z.object({
5656 "city": z.string(),
5757 "country": z.string(),
5858 "region": z.string(),
59-});
59+}).strict();
6060 export type Location = z.infer<typeof LocationSchema>;
6161
6262 export const UnitsSchema = z.object({
@@ -64,14 +64,14 @@ export const UnitsSchema = z.object({
6464 "pressure": z.string(),
6565 "speed": z.string(),
6666 "temperature": z.string(),
67-});
67+}).strict();
6868 export type Units = z.infer<typeof UnitsSchema>;
6969
7070 export const WindSchema = z.object({
7171 "chill": z.string().regex(/^-?\d+$/),
7272 "direction": z.string().regex(/^-?\d+$/),
7373 "speed": z.string().regex(/^-?\d+$/),
74-});
74+}).strict();
7575 export type Wind = z.infer<typeof WindSchema>;
7676
7777 export const ItemSchema = z.object({
@@ -84,7 +84,7 @@ export const ItemSchema = z.object({
8484 "long": z.string(),
8585 "pubDate": z.string(),
8686 "title": z.string(),
87-});
87+}).strict();
8888 export type Item = z.infer<typeof ItemSchema>;
8989
9090 export const ChannelSchema = z.object({
@@ -101,12 +101,12 @@ export const ChannelSchema = z.object({
101101 "ttl": z.string().regex(/^-?\d+$/),
102102 "units": UnitsSchema,
103103 "wind": WindSchema,
104-});
104+}).strict();
105105 export type Channel = z.infer<typeof ChannelSchema>;
106106
107107 export const ResultsSchema = z.object({
108108 "channel": ChannelSchema,
109-});
109+}).strict();
110110 export type Results = z.infer<typeof ResultsSchema>;
111111
112112 export const QuerySchema = z.object({
@@ -114,10 +114,10 @@ export const QuerySchema = z.object({
114114 "created": z.coerce.date(),
115115 "lang": z.string(),
116116 "results": ResultsSchema,
117-});
117+}).strict();
118118 export type Query = z.infer<typeof QuerySchema>;
119119
120120 export const TopLevelSchema = z.object({
121121 "query": QuerySchema,
122-});
122+}).strict();
123123 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/421d4.json

1 generated file · +13 −13
Mtypescript-zoddefault / TopLevel.ts+13 −13
@@ -4,35 +4,35 @@ import * as z from "zod";
44 export const TopSchema = z.object({
55 "count": z.number().int(),
66 "item": z.string(),
7-});
7+}).strict();
88 export type Top = z.infer<typeof TopSchema>;
99
1010 export const QuerySchema = z.object({
11-});
11+}).strict();
1212 export type Query = z.infer<typeof QuerySchema>;
1313
1414 export const GrantSchema = z.object({
1515 "flags": z.array(z.string()),
1616 "inherited": z.boolean(),
1717 "type": z.string(),
18-});
18+}).strict();
1919 export type Grant = z.infer<typeof GrantSchema>;
2020
2121 export const LicenseSchema = z.object({
2222 "name": z.string(),
23-});
23+}).strict();
2424 export type License = z.infer<typeof LicenseSchema>;
2525
2626 export const VisibleSchema = z.object({
2727 "table": z.boolean(),
28-});
28+}).strict();
2929 export type Visible = z.infer<typeof VisibleSchema>;
3030
3131 export const OwnerSchema = z.object({
3232 "displayName": z.string(),
3333 "id": z.string(),
3434 "screenName": z.string(),
35-});
35+}).strict();
3636 export type Owner = z.infer<typeof OwnerSchema>;
3737
3838 export const CachedContentsSchema = z.object({
@@ -43,12 +43,12 @@ export const CachedContentsSchema = z.object({
4343 "smallest": z.string().optional(),
4444 "sum": z.string().regex(/^-?\d+$/).optional(),
4545 "top": z.array(TopSchema).optional(),
46-});
46+}).strict();
4747 export type CachedContents = z.infer<typeof CachedContentsSchema>;
4848
4949 export const RenderTypeConfigSchema = z.object({
5050 "visible": VisibleSchema,
51-});
51+}).strict();
5252 export type RenderTypeConfig = z.infer<typeof RenderTypeConfigSchema>;
5353
5454 export const ColumnSchema = z.object({
@@ -63,7 +63,7 @@ export const ColumnSchema = z.object({
6363 "renderTypeName": z.string(),
6464 "tableColumnId": z.number().int().optional(),
6565 "width": z.number().int().optional(),
66-});
66+}).strict();
6767 export type Column = z.infer<typeof ColumnSchema>;
6868
6969 export const MetadataSchema = z.object({
@@ -72,7 +72,7 @@ export const MetadataSchema = z.object({
7272 "rdfSubject": z.string().regex(/^-?\d+$/),
7373 "renderTypeConfig": RenderTypeConfigSchema,
7474 "rowIdentifier": z.string().regex(/^-?\d+$/),
75-});
75+}).strict();
7676 export type Metadata = z.infer<typeof MetadataSchema>;
7777
7878 export const ViewSchema = z.object({
@@ -116,16 +116,16 @@ export const ViewSchema = z.object({
116116 "viewCount": z.number().int(),
117117 "viewLastModified": z.number().int(),
118118 "viewType": z.string(),
119-});
119+}).strict();
120120 export type View = z.infer<typeof ViewSchema>;
121121
122122 export const MetaSchema = z.object({
123123 "view": ViewSchema,
124-});
124+}).strict();
125125 export type Meta = z.infer<typeof MetaSchema>;
126126
127127 export const TopLevelSchema = z.object({
128128 "data": z.array(z.array(z.union([z.null(), z.number().int(), z.string()]))),
129129 "meta": MetaSchema,
130-});
130+}).strict();
131131 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/437e7.json

1 generated file · +10 −10
Mtypescript-zoddefault / TopLevel.ts+10 −10
@@ -20,7 +20,7 @@ export const DownsizedSchema = z.object({
2020 "size": z.string().regex(/^-?\d+$/).optional(),
2121 "url": z.string(),
2222 "width": z.string().regex(/^-?\d+$/),
23-});
23+}).strict();
2424 export type Downsized = z.infer<typeof DownsizedSchema>;
2525
2626 export const DownsizedSmallSchema = z.object({
@@ -28,7 +28,7 @@ export const DownsizedSmallSchema = z.object({
2828 "mp4": z.string(),
2929 "mp4_size": z.string().regex(/^-?\d+$/),
3030 "width": z.string().regex(/^-?\d+$/),
31-});
31+}).strict();
3232 export type DownsizedSmall = z.infer<typeof DownsizedSmallSchema>;
3333
3434 export const FixedHeightSchema = z.object({
@@ -41,13 +41,13 @@ export const FixedHeightSchema = z.object({
4141 "webp": z.string(),
4242 "webp_size": z.string().regex(/^-?\d+$/),
4343 "width": z.string().regex(/^-?\d+$/),
44-});
44+}).strict();
4545 export type FixedHeight = z.infer<typeof FixedHeightSchema>;
4646
4747 export const LoopingSchema = z.object({
4848 "mp4": z.string(),
4949 "mp4_size": z.string().regex(/^-?\d+$/),
50-});
50+}).strict();
5151 export type Looping = z.infer<typeof LoopingSchema>;
5252
5353 export const UserSchema = z.object({
@@ -57,21 +57,21 @@ export const UserSchema = z.object({
5757 "profile_url": z.string(),
5858 "twitter": z.string(),
5959 "username": z.string(),
60-});
60+}).strict();
6161 export type User = z.infer<typeof UserSchema>;
6262
6363 export const MetaSchema = z.object({
6464 "msg": z.string(),
6565 "response_id": z.string(),
6666 "status": z.number().int(),
67-});
67+}).strict();
6868 export type Meta = z.infer<typeof MetaSchema>;
6969
7070 export const PaginationSchema = z.object({
7171 "count": z.number().int(),
7272 "offset": z.number().int(),
7373 "total_count": z.number().int(),
74-});
74+}).strict();
7575 export type Pagination = z.infer<typeof PaginationSchema>;
7676
7777 export const ImagesSchema = z.object({
@@ -97,7 +97,7 @@ export const ImagesSchema = z.object({
9797 "preview": DownsizedSmallSchema,
9898 "preview_gif": DownsizedSchema,
9999 "preview_webp": DownsizedSchema,
100-});
100+}).strict();
101101 export type Images = z.infer<typeof ImagesSchema>;
102102
103103 export const DatumSchema = z.object({
@@ -119,12 +119,12 @@ export const DatumSchema = z.object({
119119 "url": z.string(),
120120 "user": UserSchema.optional(),
121121 "username": z.string(),
122-});
122+}).strict();
123123 export type Datum = z.infer<typeof DatumSchema>;
124124
125125 export const TopLevelSchema = z.object({
126126 "data": z.array(DatumSchema),
127127 "meta": MetaSchema,
128128 "pagination": PaginationSchema,
129-});
129+}).strict();
130130 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/43970.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -5,7 +5,7 @@ export const TopLevelElementSchema = z.object({
55 "ID": z.number().int(),
66 "Name": z.string(),
77 "Notes": z.string(),
8-});
8+}).strict();
99 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
1010
1111 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/misc/43eaf.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -5,5 +5,5 @@ export const TopLevelSchema = z.object({
55 "base": z.string(),
66 "date": z.string(),
77 "rates": z.record(z.string(), z.number()),
8-});
8+}).strict();
99 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/458db.json

1 generated file · +6 −6
Mtypescript-zoddefault / TopLevel.ts+6 −6
@@ -9,27 +9,27 @@ export type Name = z.infer<typeof NameSchema>;
99 export const ResponseInfoSchema = z.object({
1010 "developerMessage": z.string(),
1111 "status": z.number().int(),
12-});
12+}).strict();
1313 export type ResponseInfo = z.infer<typeof ResponseInfoSchema>;
1414
1515 export const ResultsetSchema = z.object({
1616 "count": z.number().int(),
1717 "page": z.number().int(),
1818 "pagesize": z.number().int(),
19-});
19+}).strict();
2020 export type Resultset = z.infer<typeof ResultsetSchema>;
2121
2222 export const ComponentSchema = z.object({
2323 "name": NameSchema,
2424 "uuid": z.string().uuid(),
25-});
25+}).strict();
2626 export type Component = z.infer<typeof ComponentSchema>;
2727
2828 export const MetadataSchema = z.object({
2929 "executionTime": z.number(),
3030 "responseInfo": ResponseInfoSchema,
3131 "resultset": ResultsetSchema,
32-});
32+}).strict();
3333 export type Metadata = z.infer<typeof MetadataSchema>;
3434
3535 export const ResultSchema = z.object({
@@ -46,11 +46,11 @@ export const ResultSchema = z.object({
4646 "url": z.string(),
4747 "uuid": z.string().uuid(),
4848 "vuuid": z.string().uuid(),
49-});
49+}).strict();
5050 export type Result = z.infer<typeof ResultSchema>;
5151
5252 export const TopLevelSchema = z.object({
5353 "metadata": MetadataSchema,
5454 "results": z.array(ResultSchema),
55-});
55+}).strict();
5656 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/4961a.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -4,10 +4,10 @@ import * as z from "zod";
44 export const TotalPopulationSchema = z.object({
55 "date": z.string(),
66 "population": z.number().int(),
7-});
7+}).strict();
88 export type TotalPopulation = z.infer<typeof TotalPopulationSchema>;
99
1010 export const TopLevelSchema = z.object({
1111 "total_population": z.array(TotalPopulationSchema),
12-});
12+}).strict();
1313 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/4a0d7.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -4,10 +4,10 @@ import * as z from "zod";
44 export const TotalPopulationSchema = z.object({
55 "date": z.string(),
66 "population": z.number().int(),
7-});
7+}).strict();
88 export type TotalPopulation = z.infer<typeof TotalPopulationSchema>;
99
1010 export const TopLevelSchema = z.object({
1111 "total_population": z.array(TotalPopulationSchema),
12-});
12+}).strict();
1313 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/4a455.json

1 generated file · +6 −6
Mtypescript-zoddefault / TopLevel.ts+6 −6
@@ -20,13 +20,13 @@ export type FeatureType = z.infer<typeof FeatureTypeSchema>;
2020
2121 export const CrsPropertiesSchema = z.object({
2222 "name": z.string(),
23-});
23+}).strict();
2424 export type CrsProperties = z.infer<typeof CrsPropertiesSchema>;
2525
2626 export const GeometrySchema = z.object({
2727 "coordinates": z.array(z.array(z.number())),
2828 "type": GeometryTypeSchema,
29-});
29+}).strict();
3030 export type Geometry = z.infer<typeof GeometrySchema>;
3131
3232 export const FeaturePropertiesSchema = z.object({
@@ -36,13 +36,13 @@ export const FeaturePropertiesSchema = z.object({
3636 "siteurl": z.string(),
3737 "streetaddress": z.string(),
3838 "twitteraccount": z.string(),
39-});
39+}).strict();
4040 export type FeatureProperties = z.infer<typeof FeaturePropertiesSchema>;
4141
4242 export const CrsSchema = z.object({
4343 "properties": CrsPropertiesSchema,
4444 "type": z.string(),
45-});
45+}).strict();
4646 export type Crs = z.infer<typeof CrsSchema>;
4747
4848 export const FeatureSchema = z.object({
@@ -51,7 +51,7 @@ export const FeatureSchema = z.object({
5151 "id": z.string(),
5252 "properties": FeaturePropertiesSchema,
5353 "type": FeatureTypeSchema,
54-});
54+}).strict();
5555 export type Feature = z.infer<typeof FeatureSchema>;
5656
5757 export const TopLevelSchema = z.object({
@@ -59,5 +59,5 @@ export const TopLevelSchema = z.object({
5959 "features": z.array(FeatureSchema),
6060 "totalFeatures": z.number().int(),
6161 "type": z.string(),
62-});
62+}).strict();
6363 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/4c547.json

1 generated file · +14 −14
Mtypescript-zoddefault / TopLevel.ts+14 −14
@@ -4,7 +4,7 @@ import * as z from "zod";
44 export const AstronomySchema = z.object({
55 "sunrise": z.string(),
66 "sunset": z.string(),
7-});
7+}).strict();
88 export type Astronomy = z.infer<typeof AstronomySchema>;
99
1010 export const AtmosphereSchema = z.object({
@@ -12,7 +12,7 @@ export const AtmosphereSchema = z.object({
1212 "pressure": z.string(),
1313 "rising": z.string().regex(/^-?\d+$/),
1414 "visibility": z.string(),
15-});
15+}).strict();
1616 export type Atmosphere = z.infer<typeof AtmosphereSchema>;
1717
1818 export const ImageSchema = z.object({
@@ -21,7 +21,7 @@ export const ImageSchema = z.object({
2121 "title": z.string(),
2222 "url": z.string(),
2323 "width": z.string().regex(/^-?\d+$/),
24-});
24+}).strict();
2525 export type Image = z.infer<typeof ImageSchema>;
2626
2727 export const ConditionSchema = z.object({
@@ -29,7 +29,7 @@ export const ConditionSchema = z.object({
2929 "date": z.string(),
3030 "temp": z.string().regex(/^-?\d+$/),
3131 "text": z.string(),
32-});
32+}).strict();
3333 export type Condition = z.infer<typeof ConditionSchema>;
3434
3535 export const ForecastSchema = z.object({
@@ -39,19 +39,19 @@ export const ForecastSchema = z.object({
3939 "high": z.string().regex(/^-?\d+$/),
4040 "low": z.string().regex(/^-?\d+$/),
4141 "text": z.string(),
42-});
42+}).strict();
4343 export type Forecast = z.infer<typeof ForecastSchema>;
4444
4545 export const GuidSchema = z.object({
4646 "isPermaLink": z.enum(["true", "false"]),
47-});
47+}).strict();
4848 export type Guid = z.infer<typeof GuidSchema>;
4949
5050 export const LocationSchema = z.object({
5151 "city": z.string(),
5252 "country": z.string(),
5353 "region": z.string(),
54-});
54+}).strict();
5555 export type Location = z.infer<typeof LocationSchema>;
5656
5757 export const UnitsSchema = z.object({
@@ -59,14 +59,14 @@ export const UnitsSchema = z.object({
5959 "pressure": z.string(),
6060 "speed": z.string(),
6161 "temperature": z.string(),
62-});
62+}).strict();
6363 export type Units = z.infer<typeof UnitsSchema>;
6464
6565 export const WindSchema = z.object({
6666 "chill": z.string().regex(/^-?\d+$/),
6767 "direction": z.string().regex(/^-?\d+$/),
6868 "speed": z.string().regex(/^-?\d+$/),
69-});
69+}).strict();
7070 export type Wind = z.infer<typeof WindSchema>;
7171
7272 export const ItemSchema = z.object({
@@ -79,7 +79,7 @@ export const ItemSchema = z.object({
7979 "long": z.string(),
8080 "pubDate": z.string(),
8181 "title": z.string(),
82-});
82+}).strict();
8383 export type Item = z.infer<typeof ItemSchema>;
8484
8585 export const ChannelSchema = z.object({
@@ -96,12 +96,12 @@ export const ChannelSchema = z.object({
9696 "ttl": z.string().regex(/^-?\d+$/),
9797 "units": UnitsSchema,
9898 "wind": WindSchema,
99-});
99+}).strict();
100100 export type Channel = z.infer<typeof ChannelSchema>;
101101
102102 export const ResultsSchema = z.object({
103103 "channel": ChannelSchema,
104-});
104+}).strict();
105105 export type Results = z.infer<typeof ResultsSchema>;
106106
107107 export const QuerySchema = z.object({
@@ -109,10 +109,10 @@ export const QuerySchema = z.object({
109109 "created": z.coerce.date(),
110110 "lang": z.string(),
111111 "results": ResultsSchema,
112-});
112+}).strict();
113113 export type Query = z.infer<typeof QuerySchema>;
114114
115115 export const TopLevelSchema = z.object({
116116 "query": QuerySchema,
117-});
117+}).strict();
118118 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/4d6fb.json

1 generated file · +11 −11
Mtypescript-zoddefault / TopLevel.ts+11 −11
@@ -51,7 +51,7 @@ export const OembedSchema = z.object({
5151 "type": z.string(),
5252 "version": z.string(),
5353 "width": z.number().int(),
54-});
54+}).strict();
5555 export type Oembed = z.infer<typeof OembedSchema>;
5656
5757 export const MediaEmbedSchema = z.object({
@@ -59,24 +59,24 @@ export const MediaEmbedSchema = z.object({
5959 "height": z.number().int().optional(),
6060 "scrolling": z.boolean().optional(),
6161 "width": z.number().int().optional(),
62-});
62+}).strict();
6363 export type MediaEmbed = z.infer<typeof MediaEmbedSchema>;
6464
6565 export const SourceSchema = z.object({
6666 "height": z.number().int(),
6767 "url": z.string(),
6868 "width": z.number().int(),
69-});
69+}).strict();
7070 export type Source = z.infer<typeof SourceSchema>;
7171
7272 export const VariantsSchema = z.object({
73-});
73+}).strict();
7474 export type Variants = z.infer<typeof VariantsSchema>;
7575
7676 export const MediaSchema = z.object({
7777 "oembed": OembedSchema,
7878 "type": z.string(),
79-});
79+}).strict();
8080 export type Media = z.infer<typeof MediaSchema>;
8181
8282 export const ImageSchema = z.object({
@@ -84,13 +84,13 @@ export const ImageSchema = z.object({
8484 "resolutions": z.array(SourceSchema),
8585 "source": SourceSchema,
8686 "variants": VariantsSchema,
87-});
87+}).strict();
8888 export type Image = z.infer<typeof ImageSchema>;
8989
9090 export const PreviewSchema = z.object({
9191 "enabled": z.boolean(),
9292 "images": z.array(ImageSchema),
93-});
93+}).strict();
9494 export type Preview = z.infer<typeof PreviewSchema>;
9595
9696 export const ChildDataSchema = z.object({
@@ -158,13 +158,13 @@ export const ChildDataSchema = z.object({
158158 "user_reports": z.array(z.any()),
159159 "view_count": z.null(),
160160 "visited": z.boolean(),
161-});
161+}).strict();
162162 export type ChildData = z.infer<typeof ChildDataSchema>;
163163
164164 export const ChildSchema = z.object({
165165 "data": ChildDataSchema,
166166 "kind": KindSchema,
167-});
167+}).strict();
168168 export type Child = z.infer<typeof ChildSchema>;
169169
170170 export const TopLevelDataSchema = z.object({
@@ -172,11 +172,11 @@ export const TopLevelDataSchema = z.object({
172172 "before": z.null(),
173173 "children": z.array(ChildSchema),
174174 "modhash": z.string(),
175-});
175+}).strict();
176176 export type TopLevelData = z.infer<typeof TopLevelDataSchema>;
177177
178178 export const TopLevelSchema = z.object({
179179 "data": TopLevelDataSchema,
180180 "kind": z.string(),
181-});
181+}).strict();
182182 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/4e336.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -4,10 +4,10 @@ import * as z from "zod";
44 export const TotalPopulationSchema = z.object({
55 "date": z.string(),
66 "population": z.number().int(),
7-});
7+}).strict();
88 export type TotalPopulation = z.infer<typeof TotalPopulationSchema>;
99
1010 export const TopLevelSchema = z.object({
1111 "total_population": z.array(TotalPopulationSchema),
12-});
12+}).strict();
1313 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/54147.json

1 generated file · +3 −3
Mtypescript-zoddefault / TopLevel.ts+3 −3
@@ -2,7 +2,7 @@ import * as z from "zod";
22
33
44 export const ArgsSchema = z.object({
5-});
5+}).strict();
66 export type Args = z.infer<typeof ArgsSchema>;
77
88 export const HeadersSchema = z.object({
@@ -10,7 +10,7 @@ export const HeadersSchema = z.object({
1010 "Connection": z.string(),
1111 "Host": z.string(),
1212 "User-Agent": z.string(),
13-});
13+}).strict();
1414 export type Headers = z.infer<typeof HeadersSchema>;
1515
1616 export const TopLevelSchema = z.object({
@@ -21,5 +21,5 @@ export const TopLevelSchema = z.object({
2121 "headers": HeadersSchema,
2222 "origin": z.string(),
2323 "url": z.string(),
24-});
24+}).strict();
2525 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/54d32.json

1 generated file · +3 −3
Mtypescript-zoddefault / TopLevel.ts+3 −3
@@ -8,7 +8,7 @@ export const StatusSchema = z.enum([
88 export type Status = z.infer<typeof StatusSchema>;
99
1010 export const FacetsSchema = z.object({
11-});
11+}).strict();
1212 export type Facets = z.infer<typeof FacetsSchema>;
1313
1414 export const ResultSchema = z.object({
@@ -18,7 +18,7 @@ export const ResultSchema = z.object({
1818 "representative_id": z.string(),
1919 "status": StatusSchema,
2020 "updated_at": z.coerce.date(),
21-});
21+}).strict();
2222 export type Result = z.infer<typeof ResultSchema>;
2323
2424 export const TopLevelSchema = z.object({
@@ -29,5 +29,5 @@ export const TopLevelSchema = z.object({
2929 "offset": z.number().int(),
3030 "previous": z.boolean(),
3131 "results": z.array(ResultSchema),
32-});
32+}).strict();
3333 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/570ec.json

1 generated file · +5 −5
Mtypescript-zoddefault / TopLevel.ts+5 −5
@@ -11,26 +11,26 @@ export type Scheme = z.infer<typeof SchemeSchema>;
1111 export const IdentifierSchema = z.object({
1212 "identifier": z.string(),
1313 "scheme": SchemeSchema,
14-});
14+}).strict();
1515 export type Identifier = z.infer<typeof IdentifierSchema>;
1616
1717 export const LinkSchema = z.object({
1818 "note": z.string(),
1919 "url": z.string(),
20-});
20+}).strict();
2121 export type Link = z.infer<typeof LinkSchema>;
2222
2323 export const OtherNameSchema = z.object({
2424 "name": z.string(),
2525 "note": z.union([z.null(), z.string()]),
26-});
26+}).strict();
2727 export type OtherName = z.infer<typeof OtherNameSchema>;
2828
2929 export const TextSchema = z.object({
3030 "media_type": z.string(),
3131 "title": z.string(),
3232 "url": z.string(),
33-});
33+}).strict();
3434 export type Text = z.infer<typeof TextSchema>;
3535
3636 export const TopLevelElementSchema = z.object({
@@ -42,7 +42,7 @@ export const TopLevelElementSchema = z.object({
4242 "other_names": z.array(OtherNameSchema),
4343 "superseded_by": z.null(),
4444 "text": z.array(TextSchema),
45-});
45+}).strict();
4646 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
4747
4848 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/misc/5dd0d.json

1 generated file · +4 −4
Mtypescript-zoddefault / TopLevel.ts+4 −4
@@ -11,14 +11,14 @@ export const StatusSchema = z.object({
1111 "reason": z.string(),
1212 "trend": z.string(),
1313 "type": z.string(),
14-});
14+}).strict();
1515 export type Status = z.infer<typeof StatusSchema>;
1616
1717 export const MetaSchema = z.object({
1818 "credit": z.string(),
1919 "updated": z.string(),
2020 "url": z.string(),
21-});
21+}).strict();
2222 export type Meta = z.infer<typeof MetaSchema>;
2323
2424 export const WeatherSchema = z.object({
@@ -27,7 +27,7 @@ export const WeatherSchema = z.object({
2727 "visibility": z.number(),
2828 "weather": z.string(),
2929 "wind": z.string(),
30-});
30+}).strict();
3131 export type Weather = z.infer<typeof WeatherSchema>;
3232
3333 export const TopLevelSchema = z.object({
@@ -39,5 +39,5 @@ export const TopLevelSchema = z.object({
3939 "state": z.string(),
4040 "status": StatusSchema,
4141 "weather": WeatherSchema,
42-});
42+}).strict();
4343 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/5eae5.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -6,7 +6,7 @@ export const TopLevelElementSchema = z.object({
66 "ID": z.number().int(),
77 "Sponsor": z.string(),
88 "Title": z.string(),
9-});
9+}).strict();
1010 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
1111
1212 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/misc/5eb20.json

1 generated file · +4 −4
Mtypescript-zoddefault / TopLevel.ts+4 −4
@@ -11,14 +11,14 @@ export const StatusSchema = z.object({
1111 "reason": z.string(),
1212 "trend": z.string(),
1313 "type": z.string(),
14-});
14+}).strict();
1515 export type Status = z.infer<typeof StatusSchema>;
1616
1717 export const MetaSchema = z.object({
1818 "credit": z.string(),
1919 "updated": z.string(),
2020 "url": z.string(),
21-});
21+}).strict();
2222 export type Meta = z.infer<typeof MetaSchema>;
2323
2424 export const WeatherSchema = z.object({
@@ -27,7 +27,7 @@ export const WeatherSchema = z.object({
2727 "visibility": z.number(),
2828 "weather": z.string(),
2929 "wind": z.string(),
30-});
30+}).strict();
3131 export type Weather = z.infer<typeof WeatherSchema>;
3232
3333 export const TopLevelSchema = z.object({
@@ -39,5 +39,5 @@ export const TopLevelSchema = z.object({
3939 "state": z.string(),
4040 "status": StatusSchema,
4141 "weather": WeatherSchema,
42-});
42+}).strict();
4343 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/5f3a1.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -5,5 +5,5 @@ export const TopLevelSchema = z.object({
55 "base": z.string(),
66 "date": z.string(),
77 "rates": z.record(z.string(), z.number()),
8-});
8+}).strict();
99 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/5f7fe.json

1 generated file · +24 −24
Mtypescript-zoddefault / TopLevel.ts+24 −24
@@ -11,20 +11,20 @@ export type TypeName = z.infer<typeof TypeNameSchema>;
1111 export const TopSchema = z.object({
1212 "count": z.number().int(),
1313 "item": z.string(),
14-});
14+}).strict();
1515 export type Top = z.infer<typeof TopSchema>;
1616
1717 export const FormatSchema = z.object({
1818 "align": z.string().optional(),
1919 "view": z.string().optional(),
20-});
20+}).strict();
2121 export type Format = z.infer<typeof FormatSchema>;
2222
2323 export const GrantSchema = z.object({
2424 "flags": z.array(z.string()),
2525 "inherited": z.boolean(),
2626 "type": z.string(),
27-});
27+}).strict();
2828 export type Grant = z.infer<typeof GrantSchema>;
2929
3030 export const AttachmentSchema = z.object({
@@ -32,25 +32,25 @@ export const AttachmentSchema = z.object({
3232 "blobId": z.string(),
3333 "filename": z.string(),
3434 "name": z.string(),
35-});
35+}).strict();
3636 export type Attachment = z.infer<typeof AttachmentSchema>;
3737
3838 export const AdditionalResourcesSchema = z.object({
3939 "See Also ": z.string(),
4040 "See Also": z.string(),
41-});
41+}).strict();
4242 export type AdditionalResources = z.infer<typeof AdditionalResourcesSchema>;
4343
4444 export const CommonCoreSchema = z.object({
4545 "Contact Email": z.string(),
4646 "Contact Name": z.string(),
4747 "Publisher": z.string(),
48-});
48+}).strict();
4949 export type CommonCore = z.infer<typeof CommonCoreSchema>;
5050
5151 export const DatasetInformationSchema = z.object({
5252 "Agency": z.string(),
53-});
53+}).strict();
5454 export type DatasetInformation = z.infer<typeof DatasetInformationSchema>;
5555
5656 export const DatasetSummarySchema = z.object({
@@ -63,23 +63,23 @@ export const DatasetSummarySchema = z.object({
6363 "Posting Frequency": z.string(),
6464 "Time Period": z.string(),
6565 "Units": z.string(),
66-});
66+}).strict();
6767 export type DatasetSummary = z.infer<typeof DatasetSummarySchema>;
6868
6969 export const NotesSchema = z.object({
7070 "Notes": z.string(),
71-});
71+}).strict();
7272 export type Notes = z.infer<typeof NotesSchema>;
7373
7474 export const OrderSchema = z.object({
7575 "ascending": z.boolean(),
7676 "columnFieldName": z.string(),
77-});
77+}).strict();
7878 export type Order = z.infer<typeof OrderSchema>;
7979
8080 export const VisibleSchema = z.object({
8181 "table": z.boolean(),
82-});
82+}).strict();
8383 export type Visible = z.infer<typeof VisibleSchema>;
8484
8585 export const OwnerSchema = z.object({
@@ -91,13 +91,13 @@ export const OwnerSchema = z.object({
9191 "rights": z.array(z.string()),
9292 "roleName": z.string(),
9393 "screenName": z.string(),
94-});
94+}).strict();
9595 export type Owner = z.infer<typeof OwnerSchema>;
9696
9797 export const ExpressionSchema = z.object({
9898 "columnId": z.number().int(),
9999 "type": z.string(),
100-});
100+}).strict();
101101 export type Expression = z.infer<typeof ExpressionSchema>;
102102
103103 export const CachedContentsSchema = z.object({
@@ -106,7 +106,7 @@ export const CachedContentsSchema = z.object({
106106 "null": z.number().int(),
107107 "smallest": z.string(),
108108 "top": z.array(TopSchema),
109-});
109+}).strict();
110110 export type CachedContents = z.infer<typeof CachedContentsSchema>;
111111
112112 export const CustomFieldsSchema = z.object({
@@ -115,23 +115,23 @@ export const CustomFieldsSchema = z.object({
115115 "Dataset Information": DatasetInformationSchema,
116116 "Dataset Summary": DatasetSummarySchema,
117117 "Notes": NotesSchema,
118-});
118+}).strict();
119119 export type CustomFields = z.infer<typeof CustomFieldsSchema>;
120120
121121 export const JsonQuerySchema = z.object({
122122 "order": z.array(OrderSchema),
123-});
123+}).strict();
124124 export type JsonQuery = z.infer<typeof JsonQuerySchema>;
125125
126126 export const RenderTypeConfigSchema = z.object({
127127 "visible": VisibleSchema,
128-});
128+}).strict();
129129 export type RenderTypeConfig = z.infer<typeof RenderTypeConfigSchema>;
130130
131131 export const OrderBySchema = z.object({
132132 "ascending": z.boolean(),
133133 "expression": ExpressionSchema,
134-});
134+}).strict();
135135 export type OrderBy = z.infer<typeof OrderBySchema>;
136136
137137 export const ColumnSchema = z.object({
@@ -146,7 +146,7 @@ export const ColumnSchema = z.object({
146146 "renderTypeName": TypeNameSchema,
147147 "tableColumnId": z.number().int().optional(),
148148 "width": z.number().int().optional(),
149-});
149+}).strict();
150150 export type Column = z.infer<typeof ColumnSchema>;
151151
152152 export const MetadataSchema = z.object({
@@ -156,12 +156,12 @@ export const MetadataSchema = z.object({
156156 "jsonQuery": JsonQuerySchema,
157157 "rdfSubject": z.string().regex(/^-?\d+$/),
158158 "renderTypeConfig": RenderTypeConfigSchema,
159-});
159+}).strict();
160160 export type Metadata = z.infer<typeof MetadataSchema>;
161161
162162 export const QuerySchema = z.object({
163163 "orderBys": z.array(OrderBySchema),
164-});
164+}).strict();
165165 export type Query = z.infer<typeof QuerySchema>;
166166
167167 export const ViewSchema = z.object({
@@ -203,16 +203,16 @@ export const ViewSchema = z.object({
203203 "viewCount": z.number().int(),
204204 "viewLastModified": z.number().int(),
205205 "viewType": z.string(),
206-});
206+}).strict();
207207 export type View = z.infer<typeof ViewSchema>;
208208
209209 export const MetaSchema = z.object({
210210 "view": ViewSchema,
211-});
211+}).strict();
212212 export type Meta = z.infer<typeof MetaSchema>;
213213
214214 export const TopLevelSchema = z.object({
215215 "data": z.array(z.array(z.union([z.null(), z.number().int(), z.string()]))),
216216 "meta": MetaSchema,
217-});
217+}).strict();
218218 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/617e8.json

1 generated file · +24 −24
Mtypescript-zoddefault / TopLevel.ts+24 −24
@@ -11,20 +11,20 @@ export type TypeName = z.infer<typeof TypeNameSchema>;
1111 export const TopSchema = z.object({
1212 "count": z.number().int(),
1313 "item": z.string(),
14-});
14+}).strict();
1515 export type Top = z.infer<typeof TopSchema>;
1616
1717 export const FormatSchema = z.object({
1818 "align": z.string().optional(),
1919 "view": z.string().optional(),
20-});
20+}).strict();
2121 export type Format = z.infer<typeof FormatSchema>;
2222
2323 export const GrantSchema = z.object({
2424 "flags": z.array(z.string()),
2525 "inherited": z.boolean(),
2626 "type": z.string(),
27-});
27+}).strict();
2828 export type Grant = z.infer<typeof GrantSchema>;
2929
3030 export const AttachmentSchema = z.object({
@@ -32,24 +32,24 @@ export const AttachmentSchema = z.object({
3232 "blobId": z.string(),
3333 "filename": z.string(),
3434 "name": z.string(),
35-});
35+}).strict();
3636 export type Attachment = z.infer<typeof AttachmentSchema>;
3737
3838 export const AdditionalResourcesSchema = z.object({
3939 "See Also": z.string(),
40-});
40+}).strict();
4141 export type AdditionalResources = z.infer<typeof AdditionalResourcesSchema>;
4242
4343 export const CommonCoreSchema = z.object({
4444 "Contact Email": z.string(),
4545 "Contact Name": z.string(),
4646 "Publisher": z.string(),
47-});
47+}).strict();
4848 export type CommonCore = z.infer<typeof CommonCoreSchema>;
4949
5050 export const DatasetInformationSchema = z.object({
5151 "Agency": z.string(),
52-});
52+}).strict();
5353 export type DatasetInformation = z.infer<typeof DatasetInformationSchema>;
5454
5555 export const DatasetSummarySchema = z.object({
@@ -61,23 +61,23 @@ export const DatasetSummarySchema = z.object({
6161 "Organization": z.string(),
6262 "Posting Frequency": z.string(),
6363 "Time Period": z.string(),
64-});
64+}).strict();
6565 export type DatasetSummary = z.infer<typeof DatasetSummarySchema>;
6666
6767 export const NotesSchema = z.object({
6868 "Notes": z.string(),
69-});
69+}).strict();
7070 export type Notes = z.infer<typeof NotesSchema>;
7171
7272 export const OrderSchema = z.object({
7373 "ascending": z.boolean(),
7474 "columnFieldName": z.string(),
75-});
75+}).strict();
7676 export type Order = z.infer<typeof OrderSchema>;
7777
7878 export const VisibleSchema = z.object({
7979 "table": z.boolean(),
80-});
80+}).strict();
8181 export type Visible = z.infer<typeof VisibleSchema>;
8282
8383 export const OwnerSchema = z.object({
@@ -89,13 +89,13 @@ export const OwnerSchema = z.object({
8989 "rights": z.array(z.string()),
9090 "roleName": z.string(),
9191 "screenName": z.string(),
92-});
92+}).strict();
9393 export type Owner = z.infer<typeof OwnerSchema>;
9494
9595 export const ExpressionSchema = z.object({
9696 "columnId": z.number().int(),
9797 "type": z.string(),
98-});
98+}).strict();
9999 export type Expression = z.infer<typeof ExpressionSchema>;
100100
101101 export const CachedContentsSchema = z.object({
@@ -104,7 +104,7 @@ export const CachedContentsSchema = z.object({
104104 "null": z.number().int(),
105105 "smallest": z.string(),
106106 "top": z.array(TopSchema),
107-});
107+}).strict();
108108 export type CachedContents = z.infer<typeof CachedContentsSchema>;
109109
110110 export const CustomFieldsSchema = z.object({
@@ -113,23 +113,23 @@ export const CustomFieldsSchema = z.object({
113113 "Dataset Information": DatasetInformationSchema,
114114 "Dataset Summary": DatasetSummarySchema,
115115 "Notes": NotesSchema,
116-});
116+}).strict();
117117 export type CustomFields = z.infer<typeof CustomFieldsSchema>;
118118
119119 export const JsonQuerySchema = z.object({
120120 "order": z.array(OrderSchema),
121-});
121+}).strict();
122122 export type JsonQuery = z.infer<typeof JsonQuerySchema>;
123123
124124 export const RenderTypeConfigSchema = z.object({
125125 "visible": VisibleSchema,
126-});
126+}).strict();
127127 export type RenderTypeConfig = z.infer<typeof RenderTypeConfigSchema>;
128128
129129 export const OrderBySchema = z.object({
130130 "ascending": z.boolean(),
131131 "expression": ExpressionSchema,
132-});
132+}).strict();
133133 export type OrderBy = z.infer<typeof OrderBySchema>;
134134
135135 export const ColumnSchema = z.object({
@@ -145,7 +145,7 @@ export const ColumnSchema = z.object({
145145 "renderTypeName": TypeNameSchema,
146146 "tableColumnId": z.number().int().optional(),
147147 "width": z.number().int().optional(),
148-});
148+}).strict();
149149 export type Column = z.infer<typeof ColumnSchema>;
150150
151151 export const MetadataSchema = z.object({
@@ -155,12 +155,12 @@ export const MetadataSchema = z.object({
155155 "jsonQuery": JsonQuerySchema,
156156 "rdfSubject": z.string().regex(/^-?\d+$/),
157157 "renderTypeConfig": RenderTypeConfigSchema,
158-});
158+}).strict();
159159 export type Metadata = z.infer<typeof MetadataSchema>;
160160
161161 export const QuerySchema = z.object({
162162 "orderBys": z.array(OrderBySchema),
163-});
163+}).strict();
164164 export type Query = z.infer<typeof QuerySchema>;
165165
166166 export const ViewSchema = z.object({
@@ -202,16 +202,16 @@ export const ViewSchema = z.object({
202202 "viewCount": z.number().int(),
203203 "viewLastModified": z.number().int(),
204204 "viewType": z.string(),
205-});
205+}).strict();
206206 export type View = z.infer<typeof ViewSchema>;
207207
208208 export const MetaSchema = z.object({
209209 "view": ViewSchema,
210-});
210+}).strict();
211211 export type Meta = z.infer<typeof MetaSchema>;
212212
213213 export const TopLevelSchema = z.object({
214214 "data": z.array(z.array(z.union([z.null(), z.number().int(), z.string()]))),
215215 "meta": MetaSchema,
216-});
216+}).strict();
217217 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/61b66.json

1 generated file · +4 −4
Mtypescript-zoddefault / TopLevel.ts+4 −4
@@ -11,14 +11,14 @@ export const StatusSchema = z.object({
1111 "reason": z.string(),
1212 "trend": z.string(),
1313 "type": z.string(),
14-});
14+}).strict();
1515 export type Status = z.infer<typeof StatusSchema>;
1616
1717 export const MetaSchema = z.object({
1818 "credit": z.string(),
1919 "updated": z.string(),
2020 "url": z.string(),
21-});
21+}).strict();
2222 export type Meta = z.infer<typeof MetaSchema>;
2323
2424 export const WeatherSchema = z.object({
@@ -27,7 +27,7 @@ export const WeatherSchema = z.object({
2727 "visibility": z.number(),
2828 "weather": z.string(),
2929 "wind": z.string(),
30-});
30+}).strict();
3131 export type Weather = z.infer<typeof WeatherSchema>;
3232
3333 export const TopLevelSchema = z.object({
@@ -39,5 +39,5 @@ export const TopLevelSchema = z.object({
3939 "state": z.string(),
4040 "status": StatusSchema,
4141 "weather": WeatherSchema,
42-});
42+}).strict();
4343 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/6260a.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -5,5 +5,5 @@ export const TopLevelSchema = z.object({
55 "base": z.string(),
66 "date": z.string(),
77 "rates": z.record(z.string(), z.number()),
8-});
8+}).strict();
99 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/65dec.json

1 generated file · +4 −4
Mtypescript-zoddefault / TopLevel.ts+4 −4
@@ -57,13 +57,13 @@ export type Type = z.infer<typeof TypeSchema>;
5757 export const LegalityElementSchema = z.object({
5858 "format": z.string(),
5959 "legality": LegalityEnumSchema,
60-});
60+}).strict();
6161 export type LegalityElement = z.infer<typeof LegalityElementSchema>;
6262
6363 export const RulingSchema = z.object({
6464 "date": z.string(),
6565 "text": z.string(),
66-});
66+}).strict();
6767 export type Ruling = z.infer<typeof RulingSchema>;
6868
6969 export const CardSchema = z.object({
@@ -95,7 +95,7 @@ export const CardSchema = z.object({
9595 "types": z.array(TypeSchema),
9696 "variations": z.array(z.number().int()).optional(),
9797 "watermark": WatermarkSchema.optional(),
98-});
98+}).strict();
9999 export type Card = z.infer<typeof CardSchema>;
100100
101101 export const TopLevelSchema = z.object({
@@ -110,5 +110,5 @@ export const TopLevelSchema = z.object({
110110 "name": z.string(),
111111 "releaseDate": z.string(),
112112 "type": z.string(),
113-});
113+}).strict();
114114 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/66121.json

1 generated file · +4 −4
Mtypescript-zoddefault / TopLevel.ts+4 −4
@@ -37,20 +37,20 @@ export type Title = z.infer<typeof TitleSchema>;
3737 export const IdentifierSchema = z.object({
3838 "identifier": z.string(),
3939 "scheme": SchemeSchema,
40-});
40+}).strict();
4141 export type Identifier = z.infer<typeof IdentifierSchema>;
4242
4343 export const LinkSchema = z.object({
4444 "note": NoteSchema,
4545 "url": z.string(),
46-});
46+}).strict();
4747 export type Link = z.infer<typeof LinkSchema>;
4848
4949 export const TextSchema = z.object({
5050 "media_type": MediaTypeSchema,
5151 "title": TitleSchema,
5252 "url": z.string(),
53-});
53+}).strict();
5454 export type Text = z.infer<typeof TextSchema>;
5555
5656 export const TopLevelElementSchema = z.object({
@@ -62,7 +62,7 @@ export const TopLevelElementSchema = z.object({
6262 "other_names": z.array(z.any()),
6363 "superseded_by": z.union([z.null(), z.string()]),
6464 "text": z.array(TextSchema),
65-});
65+}).strict();
6666 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
6767
6868 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/misc/6617c.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -4,12 +4,12 @@ import * as z from "zod";
44 export const IssPositionSchema = z.object({
55 "latitude": z.string(),
66 "longitude": z.string(),
7-});
7+}).strict();
88 export type IssPosition = z.infer<typeof IssPositionSchema>;
99
1010 export const TopLevelSchema = z.object({
1111 "iss_position": IssPositionSchema,
1212 "message": z.string(),
1313 "timestamp": z.number().int(),
14-});
14+}).strict();
1515 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/67c03.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -4,12 +4,12 @@ import * as z from "zod";
44 export const PersonSchema = z.object({
55 "craft": z.string(),
66 "name": z.string(),
7-});
7+}).strict();
88 export type Person = z.infer<typeof PersonSchema>;
99
1010 export const TopLevelSchema = z.object({
1111 "message": z.string(),
1212 "number": z.number().int(),
1313 "people": z.array(PersonSchema),
14-});
14+}).strict();
1515 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/68c30.json

1 generated file · +4 −4
Mtypescript-zoddefault / TopLevel.ts+4 −4
@@ -9,14 +9,14 @@ export const OutSchema = z.object({
99 "tx_index": z.number().int(),
1010 "type": z.number().int(),
1111 "value": z.number().int(),
12-});
12+}).strict();
1313 export type Out = z.infer<typeof OutSchema>;
1414
1515 export const InputSchema = z.object({
1616 "prev_out": OutSchema,
1717 "script": z.string(),
1818 "sequence": z.number().int(),
19-});
19+}).strict();
2020 export type Input = z.infer<typeof InputSchema>;
2121
2222 export const TxSchema = z.object({
@@ -32,10 +32,10 @@ export const TxSchema = z.object({
3232 "ver": z.number().int(),
3333 "vin_sz": z.number().int(),
3434 "vout_sz": z.number().int(),
35-});
35+}).strict();
3636 export type Tx = z.infer<typeof TxSchema>;
3737
3838 export const TopLevelSchema = z.object({
3939 "txs": z.array(TxSchema),
40-});
40+}).strict();
4141 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/6c155.json

1 generated file · +7 −7
Mtypescript-zoddefault / TopLevel.ts+7 −7
@@ -4,20 +4,20 @@ import * as z from "zod";
44 export const ResponseInfoSchema = z.object({
55 "developerMessage": z.string(),
66 "status": z.number().int(),
7-});
7+}).strict();
88 export type ResponseInfo = z.infer<typeof ResponseInfoSchema>;
99
1010 export const ResultsetSchema = z.object({
1111 "count": z.number().int(),
1212 "page": z.number().int(),
1313 "pagesize": z.number().int(),
14-});
14+}).strict();
1515 export type Resultset = z.infer<typeof ResultsetSchema>;
1616
1717 export const ComponentSchema = z.object({
1818 "name": z.string(),
1919 "uuid": z.string().uuid(),
20-});
20+}).strict();
2121 export type Component = z.infer<typeof ComponentSchema>;
2222
2323 export const LocationSchema = z.object({
@@ -31,14 +31,14 @@ export const LocationSchema = z.object({
3131 "postal_code": z.string(),
3232 "sub_premise": z.null(),
3333 "thoroughfare": z.string(),
34-});
34+}).strict();
3535 export type Location = z.infer<typeof LocationSchema>;
3636
3737 export const MetadataSchema = z.object({
3838 "executionTime": z.number(),
3939 "responseInfo": ResponseInfoSchema,
4040 "resultset": ResultsetSchema,
41-});
41+}).strict();
4242 export type Metadata = z.infer<typeof MetadataSchema>;
4343
4444 export const ResultSchema = z.object({
@@ -56,11 +56,11 @@ export const ResultSchema = z.object({
5656 "url": z.string(),
5757 "uuid": z.string().uuid(),
5858 "vuuid": z.string().uuid(),
59-});
59+}).strict();
6060 export type Result = z.infer<typeof ResultSchema>;
6161
6262 export const TopLevelSchema = z.object({
6363 "metadata": MetadataSchema,
6464 "results": z.array(ResultSchema),
65-});
65+}).strict();
6666 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/6de06.json

1 generated file · +12 −12
Mtypescript-zoddefault / TopLevel.ts+12 −12
@@ -33,7 +33,7 @@ export const OembedSchema = z.object({
3333 "type": z.string(),
3434 "version": z.string(),
3535 "width": z.number().int(),
36-});
36+}).strict();
3737 export type Oembed = z.infer<typeof OembedSchema>;
3838
3939 export const MediaEmbedSchema = z.object({
@@ -41,26 +41,26 @@ export const MediaEmbedSchema = z.object({
4141 "height": z.number().int().optional(),
4242 "scrolling": z.boolean().optional(),
4343 "width": z.number().int().optional(),
44-});
44+}).strict();
4545 export type MediaEmbed = z.infer<typeof MediaEmbedSchema>;
4646
4747 export const SourceSchema = z.object({
4848 "height": z.number().int(),
4949 "url": z.string(),
5050 "width": z.number().int(),
51-});
51+}).strict();
5252 export type Source = z.infer<typeof SourceSchema>;
5353
5454 export const GifSchema = z.object({
5555 "resolutions": z.array(SourceSchema),
5656 "source": SourceSchema,
57-});
57+}).strict();
5858 export type Gif = z.infer<typeof GifSchema>;
5959
6060 export const MediaSchema = z.object({
6161 "oembed": OembedSchema,
6262 "type": z.string(),
63-});
63+}).strict();
6464 export type Media = z.infer<typeof MediaSchema>;
6565
6666 export const VariantsSchema = z.object({
@@ -68,7 +68,7 @@ export const VariantsSchema = z.object({
6868 "mp4": GifSchema.optional(),
6969 "nsfw": GifSchema.optional(),
7070 "obfuscated": GifSchema.optional(),
71-});
71+}).strict();
7272 export type Variants = z.infer<typeof VariantsSchema>;
7373
7474 export const ImageSchema = z.object({
@@ -76,13 +76,13 @@ export const ImageSchema = z.object({
7676 "resolutions": z.array(SourceSchema),
7777 "source": SourceSchema,
7878 "variants": VariantsSchema,
79-});
79+}).strict();
8080 export type Image = z.infer<typeof ImageSchema>;
8181
8282 export const PreviewSchema = z.object({
8383 "enabled": z.boolean(),
8484 "images": z.array(ImageSchema),
85-});
85+}).strict();
8686 export type Preview = z.infer<typeof PreviewSchema>;
8787
8888 export const ChildDataSchema = z.object({
@@ -150,13 +150,13 @@ export const ChildDataSchema = z.object({
150150 "user_reports": z.array(z.any()),
151151 "view_count": z.null(),
152152 "visited": z.boolean(),
153-});
153+}).strict();
154154 export type ChildData = z.infer<typeof ChildDataSchema>;
155155
156156 export const ChildSchema = z.object({
157157 "data": ChildDataSchema,
158158 "kind": KindSchema,
159-});
159+}).strict();
160160 export type Child = z.infer<typeof ChildSchema>;
161161
162162 export const TopLevelDataSchema = z.object({
@@ -164,11 +164,11 @@ export const TopLevelDataSchema = z.object({
164164 "before": z.null(),
165165 "children": z.array(ChildSchema),
166166 "modhash": z.string(),
167-});
167+}).strict();
168168 export type TopLevelData = z.infer<typeof TopLevelDataSchema>;
169169
170170 export const TopLevelSchema = z.object({
171171 "data": TopLevelDataSchema,
172172 "kind": z.string(),
173-});
173+}).strict();
174174 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/6dec6.json

1 generated file · +14 −14
Mtypescript-zoddefault / TopLevel.ts+14 −14
@@ -11,7 +11,7 @@ export type Text = z.infer<typeof TextSchema>;
1111 export const AstronomySchema = z.object({
1212 "sunrise": z.string(),
1313 "sunset": z.string(),
14-});
14+}).strict();
1515 export type Astronomy = z.infer<typeof AstronomySchema>;
1616
1717 export const AtmosphereSchema = z.object({
@@ -19,7 +19,7 @@ export const AtmosphereSchema = z.object({
1919 "pressure": z.string(),
2020 "rising": z.string().regex(/^-?\d+$/),
2121 "visibility": z.string(),
22-});
22+}).strict();
2323 export type Atmosphere = z.infer<typeof AtmosphereSchema>;
2424
2525 export const ImageSchema = z.object({
@@ -28,7 +28,7 @@ export const ImageSchema = z.object({
2828 "title": z.string(),
2929 "url": z.string(),
3030 "width": z.string().regex(/^-?\d+$/),
31-});
31+}).strict();
3232 export type Image = z.infer<typeof ImageSchema>;
3333
3434 export const ConditionSchema = z.object({
@@ -36,7 +36,7 @@ export const ConditionSchema = z.object({
3636 "date": z.string(),
3737 "temp": z.string().regex(/^-?\d+$/),
3838 "text": z.string(),
39-});
39+}).strict();
4040 export type Condition = z.infer<typeof ConditionSchema>;
4141
4242 export const ForecastSchema = z.object({
@@ -46,19 +46,19 @@ export const ForecastSchema = z.object({
4646 "high": z.string().regex(/^-?\d+$/),
4747 "low": z.string().regex(/^-?\d+$/),
4848 "text": TextSchema,
49-});
49+}).strict();
5050 export type Forecast = z.infer<typeof ForecastSchema>;
5151
5252 export const GuidSchema = z.object({
5353 "isPermaLink": z.enum(["true", "false"]),
54-});
54+}).strict();
5555 export type Guid = z.infer<typeof GuidSchema>;
5656
5757 export const LocationSchema = z.object({
5858 "city": z.string(),
5959 "country": z.string(),
6060 "region": z.string(),
61-});
61+}).strict();
6262 export type Location = z.infer<typeof LocationSchema>;
6363
6464 export const UnitsSchema = z.object({
@@ -66,14 +66,14 @@ export const UnitsSchema = z.object({
6666 "pressure": z.string(),
6767 "speed": z.string(),
6868 "temperature": z.string(),
69-});
69+}).strict();
7070 export type Units = z.infer<typeof UnitsSchema>;
7171
7272 export const WindSchema = z.object({
7373 "chill": z.string().regex(/^-?\d+$/),
7474 "direction": z.string().regex(/^-?\d+$/),
7575 "speed": z.string().regex(/^-?\d+$/),
76-});
76+}).strict();
7777 export type Wind = z.infer<typeof WindSchema>;
7878
7979 export const ItemSchema = z.object({
@@ -86,7 +86,7 @@ export const ItemSchema = z.object({
8686 "long": z.string(),
8787 "pubDate": z.string(),
8888 "title": z.string(),
89-});
89+}).strict();
9090 export type Item = z.infer<typeof ItemSchema>;
9191
9292 export const ChannelSchema = z.object({
@@ -103,12 +103,12 @@ export const ChannelSchema = z.object({
103103 "ttl": z.string().regex(/^-?\d+$/),
104104 "units": UnitsSchema,
105105 "wind": WindSchema,
106-});
106+}).strict();
107107 export type Channel = z.infer<typeof ChannelSchema>;
108108
109109 export const ResultsSchema = z.object({
110110 "channel": ChannelSchema,
111-});
111+}).strict();
112112 export type Results = z.infer<typeof ResultsSchema>;
113113
114114 export const QuerySchema = z.object({
@@ -116,10 +116,10 @@ export const QuerySchema = z.object({
116116 "created": z.coerce.date(),
117117 "lang": z.string(),
118118 "results": ResultsSchema,
119-});
119+}).strict();
120120 export type Query = z.infer<typeof QuerySchema>;
121121
122122 export const TopLevelSchema = z.object({
123123 "query": QuerySchema,
124-});
124+}).strict();
125125 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/6eb00.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -5,7 +5,7 @@ export const TopLevelElementSchema = z.object({
55 "DirectorateID": z.number().int(),
66 "Id": z.number().int(),
77 "Name": z.string(),
8-});
8+}).strict();
99 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
1010
1111 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/misc/70c77.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -5,5 +5,5 @@ export const TopLevelSchema = z.object({
55 "base": z.string(),
66 "date": z.string(),
77 "rates": z.record(z.string(), z.number()),
8-});
8+}).strict();
99 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/734ad.json

1 generated file · +3 −3
Mtypescript-zoddefault / TopLevel.ts+3 −3
@@ -8,7 +8,7 @@ export const StatusSchema = z.enum([
88 export type Status = z.infer<typeof StatusSchema>;
99
1010 export const FacetsSchema = z.object({
11-});
11+}).strict();
1212 export type Facets = z.infer<typeof FacetsSchema>;
1313
1414 export const ResultSchema = z.object({
@@ -70,7 +70,7 @@ export const ResultSchema = z.object({
7070 "updated_at": z.coerce.date(),
7171 "uri": z.string(),
7272 "web_site_url": z.union([z.null(), z.string()]),
73-});
73+}).strict();
7474 export type Result = z.infer<typeof ResultSchema>;
7575
7676 export const TopLevelSchema = z.object({
@@ -81,5 +81,5 @@ export const TopLevelSchema = z.object({
8181 "offset": z.number().int(),
8282 "previous": z.boolean(),
8383 "results": z.array(ResultSchema),
84-});
84+}).strict();
8585 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/75912.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -5,5 +5,5 @@ export const TopLevelSchema = z.object({
55 "base": z.string(),
66 "date": z.string(),
77 "rates": z.record(z.string(), z.number()),
8-});
8+}).strict();
99 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/7681c.json

1 generated file · +10 −10
Mtypescript-zoddefault / TopLevel.ts+10 −10
@@ -28,7 +28,7 @@ export const The480_WStillSchema = z.object({
2828 "size": z.string().regex(/^-?\d+$/).optional(),
2929 "url": z.string(),
3030 "width": z.string().regex(/^-?\d+$/),
31-});
31+}).strict();
3232 export type The480_WStill = z.infer<typeof The480_WStillSchema>;
3333
3434 export const DownsizedSmallSchema = z.object({
@@ -36,7 +36,7 @@ export const DownsizedSmallSchema = z.object({
3636 "mp4": z.string(),
3737 "mp4_size": z.string().regex(/^-?\d+$/),
3838 "width": z.string().regex(/^-?\d+$/),
39-});
39+}).strict();
4040 export type DownsizedSmall = z.infer<typeof DownsizedSmallSchema>;
4141
4242 export const FixedHeightSchema = z.object({
@@ -50,13 +50,13 @@ export const FixedHeightSchema = z.object({
5050 "webp": z.string(),
5151 "webp_size": z.string().regex(/^-?\d+$/),
5252 "width": z.string().regex(/^-?\d+$/),
53-});
53+}).strict();
5454 export type FixedHeight = z.infer<typeof FixedHeightSchema>;
5555
5656 export const LoopingSchema = z.object({
5757 "mp4": z.string(),
5858 "mp4_size": z.string().regex(/^-?\d+$/),
59-});
59+}).strict();
6060 export type Looping = z.infer<typeof LoopingSchema>;
6161
6262 export const UserSchema = z.object({
@@ -66,21 +66,21 @@ export const UserSchema = z.object({
6666 "profile_url": z.string(),
6767 "twitter": z.string().optional(),
6868 "username": z.string(),
69-});
69+}).strict();
7070 export type User = z.infer<typeof UserSchema>;
7171
7272 export const MetaSchema = z.object({
7373 "msg": z.string(),
7474 "response_id": z.string(),
7575 "status": z.number().int(),
76-});
76+}).strict();
7777 export type Meta = z.infer<typeof MetaSchema>;
7878
7979 export const PaginationSchema = z.object({
8080 "count": z.number().int(),
8181 "offset": z.number().int(),
8282 "total_count": z.number().int(),
83-});
83+}).strict();
8484 export type Pagination = z.infer<typeof PaginationSchema>;
8585
8686 export const ImagesSchema = z.object({
@@ -107,7 +107,7 @@ export const ImagesSchema = z.object({
107107 "preview_gif": The480_WStillSchema,
108108 "preview_webp": The480_WStillSchema,
109109 "480w_still": The480_WStillSchema.optional(),
110-});
110+}).strict();
111111 export type Images = z.infer<typeof ImagesSchema>;
112112
113113 export const DatumSchema = z.object({
@@ -129,12 +129,12 @@ export const DatumSchema = z.object({
129129 "url": z.string(),
130130 "user": UserSchema.optional(),
131131 "username": UsernameSchema,
132-});
132+}).strict();
133133 export type Datum = z.infer<typeof DatumSchema>;
134134
135135 export const TopLevelSchema = z.object({
136136 "data": z.array(DatumSchema),
137137 "meta": MetaSchema,
138138 "pagination": PaginationSchema,
139-});
139+}).strict();
140140 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/76ae1.json

1 generated file · +25 −25
Mtypescript-zoddefault / TopLevel.ts+25 −25
@@ -21,7 +21,7 @@ export type SchemaType = z.infer<typeof SchemaTypeSchema>;
2121 export const PropertySchema = z.object({
2222 "description": z.string(),
2323 "type": FormatEnumSchema,
24-});
24+}).strict();
2525 export type Property = z.infer<typeof PropertySchema>;
2626
2727 export const DeMinimisPropertiesSchema = z.object({
@@ -32,7 +32,7 @@ export const DeMinimisPropertiesSchema = z.object({
3232 "notes": PropertySchema,
3333 "vat_amount": PropertySchema,
3434 "vat_currency": PropertySchema,
35-});
35+}).strict();
3636 export type DeMinimisProperties = z.infer<typeof DeMinimisPropertiesSchema>;
3737
3838 export const FaqPropertiesSchema = z.object({
@@ -47,7 +47,7 @@ export const FaqPropertiesSchema = z.object({
4747 "trade_regions": PropertySchema,
4848 "url": PropertySchema,
4949 "world_regions": PropertySchema,
50-});
50+}).strict();
5151 export type FaqProperties = z.infer<typeof FaqPropertiesSchema>;
5252
5353 export const ReportPropertiesSchema = z.object({
@@ -60,7 +60,7 @@ export const ReportPropertiesSchema = z.object({
6060 "report_type": PropertySchema,
6161 "title": PropertySchema,
6262 "url": PropertySchema,
63-});
63+}).strict();
6464 export type ReportProperties = z.infer<typeof ReportPropertiesSchema>;
6565
6666 export const TaxonomyPropertiesSchema = z.object({
@@ -70,14 +70,14 @@ export const TaxonomyPropertiesSchema = z.object({
7070 "label": PropertySchema,
7171 "sub_class_of": PropertySchema,
7272 "type": PropertySchema,
73-});
73+}).strict();
7474 export type TaxonomyProperties = z.infer<typeof TaxonomyPropertiesSchema>;
7575
7676 export const InfoSchema = z.object({
7777 "description": z.string(),
7878 "title": z.string(),
7979 "version": z.string(),
80-});
80+}).strict();
8181 export type Info = z.infer<typeof InfoSchema>;
8282
8383 export const ParameterSchema = z.object({
@@ -87,55 +87,55 @@ export const ParameterSchema = z.object({
8787 "name": z.string(),
8888 "required": z.boolean(),
8989 "type": FormatEnumSchema,
90-});
90+}).strict();
9191 export type Parameter = z.infer<typeof ParameterSchema>;
9292
9393 export const ItemsClassSchema = z.object({
9494 "$ref": z.string(),
95-});
95+}).strict();
9696 export type ItemsClass = z.infer<typeof ItemsClassSchema>;
9797
9898 export const PurpleSchemaSchema = z.object({
9999 "items": ItemsClassSchema,
100100 "type": SchemaTypeSchema,
101-});
101+}).strict();
102102 export type PurpleSchema = z.infer<typeof PurpleSchemaSchema>;
103103
104104 export const ArticleSchema = z.object({
105105 "properties": z.record(z.string(), PropertySchema),
106-});
106+}).strict();
107107 export type Article = z.infer<typeof ArticleSchema>;
108108
109109 export const DeMinimisSchema = z.object({
110110 "properties": DeMinimisPropertiesSchema,
111-});
111+}).strict();
112112 export type DeMinimis = z.infer<typeof DeMinimisSchema>;
113113
114114 export const FaqSchema = z.object({
115115 "properties": FaqPropertiesSchema,
116-});
116+}).strict();
117117 export type Faq = z.infer<typeof FaqSchema>;
118118
119119 export const ReportSchema = z.object({
120120 "properties": ReportPropertiesSchema,
121-});
121+}).strict();
122122 export type Report = z.infer<typeof ReportSchema>;
123123
124124 export const TaxonomySchema = z.object({
125125 "properties": TaxonomyPropertiesSchema,
126-});
126+}).strict();
127127 export type Taxonomy = z.infer<typeof TaxonomySchema>;
128128
129129 export const Purple200Schema = z.object({
130130 "description": z.string(),
131131 "schema": ItemsClassSchema,
132-});
132+}).strict();
133133 export type Purple200 = z.infer<typeof Purple200Schema>;
134134
135135 export const Fluffy200Schema = z.object({
136136 "description": z.string(),
137137 "schema": PurpleSchemaSchema,
138-});
138+}).strict();
139139 export type Fluffy200 = z.infer<typeof Fluffy200Schema>;
140140
141141 export const DefinitionsSchema = z.object({
@@ -152,17 +152,17 @@ export const DefinitionsSchema = z.object({
152152 "Rate": ArticleSchema,
153153 "Report": ReportSchema,
154154 "Taxonomy": TaxonomySchema,
155-});
155+}).strict();
156156 export type Definitions = z.infer<typeof DefinitionsSchema>;
157157
158158 export const PurpleResponsesSchema = z.object({
159159 "200": Purple200Schema,
160-});
160+}).strict();
161161 export type PurpleResponses = z.infer<typeof PurpleResponsesSchema>;
162162
163163 export const FluffyResponsesSchema = z.object({
164164 "200": Fluffy200Schema,
165-});
165+}).strict();
166166 export type FluffyResponses = z.infer<typeof FluffyResponsesSchema>;
167167
168168 export const BusinessServiceProvidersSearchGetSchema = z.object({
@@ -171,7 +171,7 @@ export const BusinessServiceProvidersSearchGetSchema = z.object({
171171 "responses": PurpleResponsesSchema,
172172 "summary": z.string(),
173173 "tags": z.array(z.string()),
174-});
174+}).strict();
175175 export type BusinessServiceProvidersSearchGet = z.infer<typeof BusinessServiceProvidersSearchGetSchema>;
176176
177177 export const ConsolidatedScreeningListSearchGetSchema = z.object({
@@ -180,17 +180,17 @@ export const ConsolidatedScreeningListSearchGetSchema = z.object({
180180 "responses": FluffyResponsesSchema,
181181 "summary": z.string(),
182182 "tags": z.array(z.string()),
183-});
183+}).strict();
184184 export type ConsolidatedScreeningListSearchGet = z.infer<typeof ConsolidatedScreeningListSearchGetSchema>;
185185
186186 export const BusinessServiceProvidersSearchClassSchema = z.object({
187187 "get": BusinessServiceProvidersSearchGetSchema,
188-});
188+}).strict();
189189 export type BusinessServiceProvidersSearchClass = z.infer<typeof BusinessServiceProvidersSearchClassSchema>;
190190
191191 export const ConsolidatedScreeningListSearchClassSchema = z.object({
192192 "get": ConsolidatedScreeningListSearchGetSchema,
193-});
193+}).strict();
194194 export type ConsolidatedScreeningListSearchClass = z.infer<typeof ConsolidatedScreeningListSearchClassSchema>;
195195
196196 export const PathsSchema = z.object({
@@ -207,7 +207,7 @@ export const PathsSchema = z.object({
207207 "/trade_articles/search": ConsolidatedScreeningListSearchClassSchema,
208208 "/trade_events/search": ConsolidatedScreeningListSearchClassSchema,
209209 "/trade_leads/search": ConsolidatedScreeningListSearchClassSchema,
210-});
210+}).strict();
211211 export type Paths = z.infer<typeof PathsSchema>;
212212
213213 export const TopLevelSchema = z.object({
@@ -219,5 +219,5 @@ export const TopLevelSchema = z.object({
219219 "produces": z.array(z.string()),
220220 "schemes": z.array(z.string()),
221221 "swagger": z.string(),
222-});
222+}).strict();
223223 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/77392.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -33,7 +33,7 @@ export const TopLevelElementSchema = z.object({
3333 "pha": PhaSchema,
3434 "q_au_1": z.string(),
3535 "q_au_2": z.string().optional(),
36-});
36+}).strict();
3737 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
3838
3939 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/misc/7d397.json

1 generated file · +13 −13
Mtypescript-zoddefault / TopLevel.ts+13 −13
@@ -15,14 +15,14 @@ export type In = z.infer<typeof InSchema>;
1515 export const PropertySchema = z.object({
1616 "description": z.string(),
1717 "type": TypeSchema,
18-});
18+}).strict();
1919 export type Property = z.infer<typeof PropertySchema>;
2020
2121 export const InfoSchema = z.object({
2222 "description": z.string(),
2323 "title": z.string(),
2424 "version": z.string(),
25-});
25+}).strict();
2626 export type Info = z.infer<typeof InfoSchema>;
2727
2828 export const ParameterSchema = z.object({
@@ -32,39 +32,39 @@ export const ParameterSchema = z.object({
3232 "name": z.string(),
3333 "required": z.boolean(),
3434 "type": TypeSchema,
35-});
35+}).strict();
3636 export type Parameter = z.infer<typeof ParameterSchema>;
3737
3838 export const ItemsSchema = z.object({
3939 "$ref": z.string(),
40-});
40+}).strict();
4141 export type Items = z.infer<typeof ItemsSchema>;
4242
4343 export const ListSchema = z.object({
4444 "properties": z.record(z.string(), PropertySchema),
45-});
45+}).strict();
4646 export type List = z.infer<typeof ListSchema>;
4747
4848 export const SchemaSchema = z.object({
4949 "items": ItemsSchema,
5050 "type": z.string(),
51-});
51+}).strict();
5252 export type Schema = z.infer<typeof SchemaSchema>;
5353
5454 export const DefinitionsSchema = z.object({
5555 "List": ListSchema,
56-});
56+}).strict();
5757 export type Definitions = z.infer<typeof DefinitionsSchema>;
5858
5959 export const The200Schema = z.object({
6060 "description": z.string(),
6161 "schema": SchemaSchema,
62-});
62+}).strict();
6363 export type The200 = z.infer<typeof The200Schema>;
6464
6565 export const ResponsesSchema = z.object({
6666 "200": The200Schema,
67-});
67+}).strict();
6868 export type Responses = z.infer<typeof ResponsesSchema>;
6969
7070 export const GetSchema = z.object({
@@ -73,17 +73,17 @@ export const GetSchema = z.object({
7373 "responses": ResponsesSchema,
7474 "summary": z.string(),
7575 "tags": z.array(z.string()),
76-});
76+}).strict();
7777 export type Get = z.infer<typeof GetSchema>;
7878
7979 export const ConsolidatedScreeningListSearchSchema = z.object({
8080 "get": GetSchema,
81-});
81+}).strict();
8282 export type ConsolidatedScreeningListSearch = z.infer<typeof ConsolidatedScreeningListSearchSchema>;
8383
8484 export const PathsSchema = z.object({
8585 "/consolidated_screening_list/search": ConsolidatedScreeningListSearchSchema,
86-});
86+}).strict();
8787 export type Paths = z.infer<typeof PathsSchema>;
8888
8989 export const TopLevelSchema = z.object({
@@ -95,5 +95,5 @@ export const TopLevelSchema = z.object({
9595 "produces": z.array(z.string()),
9696 "schemes": z.array(z.string()),
9797 "swagger": z.string(),
98-});
98+}).strict();
9999 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/7d722.json

1 generated file · +4 −4
Mtypescript-zoddefault / TopLevel.ts+4 −4
@@ -11,14 +11,14 @@ export const StatusSchema = z.object({
1111 "reason": z.string(),
1212 "trend": z.string(),
1313 "type": z.string(),
14-});
14+}).strict();
1515 export type Status = z.infer<typeof StatusSchema>;
1616
1717 export const MetaSchema = z.object({
1818 "credit": z.string(),
1919 "updated": z.string(),
2020 "url": z.string(),
21-});
21+}).strict();
2222 export type Meta = z.infer<typeof MetaSchema>;
2323
2424 export const WeatherSchema = z.object({
@@ -27,7 +27,7 @@ export const WeatherSchema = z.object({
2727 "visibility": z.number(),
2828 "weather": z.string(),
2929 "wind": z.string(),
30-});
30+}).strict();
3131 export type Weather = z.infer<typeof WeatherSchema>;
3232
3333 export const TopLevelSchema = z.object({
@@ -39,5 +39,5 @@ export const TopLevelSchema = z.object({
3939 "state": z.string(),
4040 "status": StatusSchema,
4141 "weather": WeatherSchema,
42-});
42+}).strict();
4343 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/7df41.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -5,7 +5,7 @@ export const PcSchema = z.object({
55 "count": z.number().int(),
66 "label": z.string(),
77 "peak24": z.number().int(),
8-});
8+}).strict();
99 export type Pc = z.infer<typeof PcSchema>;
1010
1111 export const TopLevelSchema = z.object({
@@ -14,5 +14,5 @@ export const TopLevelSchema = z.object({
1414 "ps4": PcSchema,
1515 "xbox": PcSchema,
1616 "xone": PcSchema,
17-});
17+}).strict();
1818 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/7dfa6.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -4,10 +4,10 @@ import * as z from "zod";
44 export const TotalPopulationSchema = z.object({
55 "date": z.string(),
66 "population": z.number().int(),
7-});
7+}).strict();
88 export type TotalPopulation = z.infer<typeof TotalPopulationSchema>;
99
1010 export const TopLevelSchema = z.object({
1111 "total_population": z.array(TotalPopulationSchema),
12-});
12+}).strict();
1313 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/7eb30.json

1 generated file · +3 −3
Mtypescript-zoddefault / TopLevel.ts+3 −3
@@ -37,7 +37,7 @@ export const GroupSchema = z.object({
3737 "english": EnglishSchema,
3838 "thai": ThaiSchema,
3939 "website": z.string(),
40-});
40+}).strict();
4141 export type Group = z.infer<typeof GroupSchema>;
4242
4343 export const ResultSchema = z.object({
@@ -55,7 +55,7 @@ export const ResultSchema = z.object({
5555 "today_screens": z.number().int(),
5656 "url": z.string(),
5757 "website": z.string(),
58-});
58+}).strict();
5959 export type Result = z.infer<typeof ResultSchema>;
6060
6161 export const TopLevelSchema = z.object({
@@ -63,5 +63,5 @@ export const TopLevelSchema = z.object({
6363 "next": z.string(),
6464 "previous": z.null(),
6565 "results": z.array(ResultSchema),
66-});
66+}).strict();
6767 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/7f568.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -18,7 +18,7 @@ export const FileSchema = z.object({
1818 "raw_url": z.string(),
1919 "size": z.number().int(),
2020 "type": TypeSchema,
21-});
21+}).strict();
2222 export type File = z.infer<typeof FileSchema>;
2323
2424 export const TopLevelElementSchema = z.object({
@@ -38,7 +38,7 @@ export const TopLevelElementSchema = z.object({
3838 "updated_at": z.coerce.date(),
3939 "url": z.string(),
4040 "user": z.null(),
41-});
41+}).strict();
4242 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
4343
4444 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/misc/7fbfb.json

1 generated file · +3 −3
Mtypescript-zoddefault / TopLevel.ts+3 −3
@@ -17,7 +17,7 @@ export type Value = z.infer<typeof ValueSchema>;
1717 export const CountrySchema = z.object({
1818 "id": IdSchema,
1919 "value": ValueSchema,
20-});
20+}).strict();
2121 export type Country = z.infer<typeof CountrySchema>;
2222
2323 export const FluffyTopLevelSchema = z.object({
@@ -25,7 +25,7 @@ export const FluffyTopLevelSchema = z.object({
2525 "pages": z.number().int(),
2626 "per_page": z.string().regex(/^-?\d+$/),
2727 "total": z.number().int(),
28-});
28+}).strict();
2929 export type FluffyTopLevel = z.infer<typeof FluffyTopLevelSchema>;
3030
3131 export const PurpleTopLevelSchema = z.object({
@@ -34,7 +34,7 @@ export const PurpleTopLevelSchema = z.object({
3434 "decimal": z.string().regex(/^-?\d+$/),
3535 "indicator": CountrySchema,
3636 "value": z.string(),
37-});
37+}).strict();
3838 export type PurpleTopLevel = z.infer<typeof PurpleTopLevelSchema>;
3939
4040 export const TopLevelSchema = z.array(z.union([z.array(PurpleTopLevelSchema), FluffyTopLevelSchema]));
Test case

test/inputs/json/misc/80aff.json

1 generated file · +3 −3
Mtypescript-zoddefault / TopLevel.ts+3 −3
@@ -2,7 +2,7 @@ import * as z from "zod";
22
33
44 export const FacetsSchema = z.object({
5-});
5+}).strict();
66 export type Facets = z.infer<typeof FacetsSchema>;
77
88 export const ResultSchema = z.object({
@@ -13,7 +13,7 @@ export const ResultSchema = z.object({
1313 "parent": z.union([z.null(), z.number().int()]),
1414 "updated_at": z.coerce.date(),
1515 "uri": z.string(),
16-});
16+}).strict();
1717 export type Result = z.infer<typeof ResultSchema>;
1818
1919 export const TopLevelSchema = z.object({
@@ -24,5 +24,5 @@ export const TopLevelSchema = z.object({
2424 "offset": z.number().int(),
2525 "previous": z.boolean(),
2626 "results": z.array(ResultSchema),
27-});
27+}).strict();
2828 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/82509.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -3,5 +3,5 @@ import * as z from "zod";
33
44 export const TopLevelSchema = z.object({
55 "origin": z.string(),
6-});
6+}).strict();
77 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/8592b.json

1 generated file · +8 −8
Mtypescript-zoddefault / TopLevel.ts+8 −8
@@ -44,14 +44,14 @@ export const KindSchema = z.enum([
4444 export type Kind = z.infer<typeof KindSchema>;
4545
4646 export const MediaEmbedSchema = z.object({
47-});
47+}).strict();
4848 export type MediaEmbed = z.infer<typeof MediaEmbedSchema>;
4949
5050 export const SourceSchema = z.object({
5151 "height": z.number().int(),
5252 "url": z.string(),
5353 "width": z.number().int(),
54-});
54+}).strict();
5555 export type Source = z.infer<typeof SourceSchema>;
5656
5757 export const ImageSchema = z.object({
@@ -59,13 +59,13 @@ export const ImageSchema = z.object({
5959 "resolutions": z.array(SourceSchema),
6060 "source": SourceSchema,
6161 "variants": MediaEmbedSchema,
62-});
62+}).strict();
6363 export type Image = z.infer<typeof ImageSchema>;
6464
6565 export const PreviewSchema = z.object({
6666 "enabled": z.boolean(),
6767 "images": z.array(ImageSchema),
68-});
68+}).strict();
6969 export type Preview = z.infer<typeof PreviewSchema>;
7070
7171 export const ChildDataSchema = z.object({
@@ -133,13 +133,13 @@ export const ChildDataSchema = z.object({
133133 "user_reports": z.array(z.any()),
134134 "view_count": z.null(),
135135 "visited": z.boolean(),
136-});
136+}).strict();
137137 export type ChildData = z.infer<typeof ChildDataSchema>;
138138
139139 export const ChildSchema = z.object({
140140 "data": ChildDataSchema,
141141 "kind": KindSchema,
142-});
142+}).strict();
143143 export type Child = z.infer<typeof ChildSchema>;
144144
145145 export const TopLevelDataSchema = z.object({
@@ -147,11 +147,11 @@ export const TopLevelDataSchema = z.object({
147147 "before": z.null(),
148148 "children": z.array(ChildSchema),
149149 "modhash": z.string(),
150-});
150+}).strict();
151151 export type TopLevelData = z.infer<typeof TopLevelDataSchema>;
152152
153153 export const TopLevelSchema = z.object({
154154 "data": TopLevelDataSchema,
155155 "kind": z.string(),
156-});
156+}).strict();
157157 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/88130.json

1 generated file · +14 −14
Mtypescript-zoddefault / TopLevel.ts+14 −14
@@ -4,7 +4,7 @@ import * as z from "zod";
44 export const AstronomySchema = z.object({
55 "sunrise": z.string(),
66 "sunset": z.string(),
7-});
7+}).strict();
88 export type Astronomy = z.infer<typeof AstronomySchema>;
99
1010 export const AtmosphereSchema = z.object({
@@ -12,7 +12,7 @@ export const AtmosphereSchema = z.object({
1212 "pressure": z.string(),
1313 "rising": z.string().regex(/^-?\d+$/),
1414 "visibility": z.string(),
15-});
15+}).strict();
1616 export type Atmosphere = z.infer<typeof AtmosphereSchema>;
1717
1818 export const ImageSchema = z.object({
@@ -21,7 +21,7 @@ export const ImageSchema = z.object({
2121 "title": z.string(),
2222 "url": z.string(),
2323 "width": z.string().regex(/^-?\d+$/),
24-});
24+}).strict();
2525 export type Image = z.infer<typeof ImageSchema>;
2626
2727 export const ConditionSchema = z.object({
@@ -29,7 +29,7 @@ export const ConditionSchema = z.object({
2929 "date": z.string(),
3030 "temp": z.string().regex(/^-?\d+$/),
3131 "text": z.string(),
32-});
32+}).strict();
3333 export type Condition = z.infer<typeof ConditionSchema>;
3434
3535 export const ForecastSchema = z.object({
@@ -39,19 +39,19 @@ export const ForecastSchema = z.object({
3939 "high": z.string().regex(/^-?\d+$/),
4040 "low": z.string().regex(/^-?\d+$/),
4141 "text": z.string(),
42-});
42+}).strict();
4343 export type Forecast = z.infer<typeof ForecastSchema>;
4444
4545 export const GuidSchema = z.object({
4646 "isPermaLink": z.enum(["true", "false"]),
47-});
47+}).strict();
4848 export type Guid = z.infer<typeof GuidSchema>;
4949
5050 export const LocationSchema = z.object({
5151 "city": z.string(),
5252 "country": z.string(),
5353 "region": z.string(),
54-});
54+}).strict();
5555 export type Location = z.infer<typeof LocationSchema>;
5656
5757 export const UnitsSchema = z.object({
@@ -59,14 +59,14 @@ export const UnitsSchema = z.object({
5959 "pressure": z.string(),
6060 "speed": z.string(),
6161 "temperature": z.string(),
62-});
62+}).strict();
6363 export type Units = z.infer<typeof UnitsSchema>;
6464
6565 export const WindSchema = z.object({
6666 "chill": z.string().regex(/^-?\d+$/),
6767 "direction": z.string().regex(/^-?\d+$/),
6868 "speed": z.string().regex(/^-?\d+$/),
69-});
69+}).strict();
7070 export type Wind = z.infer<typeof WindSchema>;
7171
7272 export const ItemSchema = z.object({
@@ -79,7 +79,7 @@ export const ItemSchema = z.object({
7979 "long": z.string(),
8080 "pubDate": z.string(),
8181 "title": z.string(),
82-});
82+}).strict();
8383 export type Item = z.infer<typeof ItemSchema>;
8484
8585 export const ChannelSchema = z.object({
@@ -96,12 +96,12 @@ export const ChannelSchema = z.object({
9696 "ttl": z.string().regex(/^-?\d+$/),
9797 "units": UnitsSchema,
9898 "wind": WindSchema,
99-});
99+}).strict();
100100 export type Channel = z.infer<typeof ChannelSchema>;
101101
102102 export const ResultsSchema = z.object({
103103 "channel": ChannelSchema,
104-});
104+}).strict();
105105 export type Results = z.infer<typeof ResultsSchema>;
106106
107107 export const QuerySchema = z.object({
@@ -109,10 +109,10 @@ export const QuerySchema = z.object({
109109 "created": z.coerce.date(),
110110 "lang": z.string(),
111111 "results": ResultsSchema,
112-});
112+}).strict();
113113 export type Query = z.infer<typeof QuerySchema>;
114114
115115 export const TopLevelSchema = z.object({
116116 "query": QuerySchema,
117-});
117+}).strict();
118118 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/8a62c.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -4,10 +4,10 @@ import * as z from "zod";
44 export const TotalPopulationSchema = z.object({
55 "date": z.string(),
66 "population": z.number().int(),
7-});
7+}).strict();
88 export type TotalPopulation = z.infer<typeof TotalPopulationSchema>;
99
1010 export const TopLevelSchema = z.object({
1111 "total_population": z.array(TotalPopulationSchema),
12-});
12+}).strict();
1313 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/908db.json

1 generated file · +3 −3
Mtypescript-zoddefault / TopLevel.ts+3 −3
@@ -4,15 +4,15 @@ import * as z from "zod";
44 export const StateStateSchema = z.object({
55 "state_id": z.string(),
66 "state_name": z.string(),
7-});
7+}).strict();
88 export type StateState = z.infer<typeof StateStateSchema>;
99
1010 export const StateElementSchema = z.object({
1111 "state": StateStateSchema,
12-});
12+}).strict();
1313 export type StateElement = z.infer<typeof StateElementSchema>;
1414
1515 export const TopLevelSchema = z.object({
1616 "states": z.array(StateElementSchema),
17-});
17+}).strict();
1818 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/9617f.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -5,5 +5,5 @@ export const TopLevelSchema = z.object({
55 "base": z.string(),
66 "date": z.string(),
77 "rates": z.record(z.string(), z.number()),
8-});
8+}).strict();
99 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/96f7c.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -8,5 +8,5 @@ export const TopLevelSchema = z.object({
88 "importer": z.array(z.string()),
99 "pages": z.array(z.string()),
1010 "verifiable_password_authentication": z.boolean(),
11-});
11+}).strict();
1212 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/9847b.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -4,7 +4,7 @@ import * as z from "zod";
44 export const TopLevelElementSchema = z.object({
55 "id": z.string(),
66 "name": z.string(),
7-});
7+}).strict();
88 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
99
1010 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/misc/9929c.json

1 generated file · +14 −14
Mtypescript-zoddefault / TopLevel.ts+14 −14
@@ -4,7 +4,7 @@ import * as z from "zod";
44 export const AstronomySchema = z.object({
55 "sunrise": z.string(),
66 "sunset": z.string(),
7-});
7+}).strict();
88 export type Astronomy = z.infer<typeof AstronomySchema>;
99
1010 export const AtmosphereSchema = z.object({
@@ -12,7 +12,7 @@ export const AtmosphereSchema = z.object({
1212 "pressure": z.string(),
1313 "rising": z.string().regex(/^-?\d+$/),
1414 "visibility": z.string(),
15-});
15+}).strict();
1616 export type Atmosphere = z.infer<typeof AtmosphereSchema>;
1717
1818 export const ImageSchema = z.object({
@@ -21,7 +21,7 @@ export const ImageSchema = z.object({
2121 "title": z.string(),
2222 "url": z.string(),
2323 "width": z.string().regex(/^-?\d+$/),
24-});
24+}).strict();
2525 export type Image = z.infer<typeof ImageSchema>;
2626
2727 export const ConditionSchema = z.object({
@@ -29,7 +29,7 @@ export const ConditionSchema = z.object({
2929 "date": z.string(),
3030 "temp": z.string().regex(/^-?\d+$/),
3131 "text": z.string(),
32-});
32+}).strict();
3333 export type Condition = z.infer<typeof ConditionSchema>;
3434
3535 export const ForecastSchema = z.object({
@@ -39,19 +39,19 @@ export const ForecastSchema = z.object({
3939 "high": z.string().regex(/^-?\d+$/),
4040 "low": z.string().regex(/^-?\d+$/),
4141 "text": z.string(),
42-});
42+}).strict();
4343 export type Forecast = z.infer<typeof ForecastSchema>;
4444
4545 export const GuidSchema = z.object({
4646 "isPermaLink": z.enum(["true", "false"]),
47-});
47+}).strict();
4848 export type Guid = z.infer<typeof GuidSchema>;
4949
5050 export const LocationSchema = z.object({
5151 "city": z.string(),
5252 "country": z.string(),
5353 "region": z.string(),
54-});
54+}).strict();
5555 export type Location = z.infer<typeof LocationSchema>;
5656
5757 export const UnitsSchema = z.object({
@@ -59,14 +59,14 @@ export const UnitsSchema = z.object({
5959 "pressure": z.string(),
6060 "speed": z.string(),
6161 "temperature": z.string(),
62-});
62+}).strict();
6363 export type Units = z.infer<typeof UnitsSchema>;
6464
6565 export const WindSchema = z.object({
6666 "chill": z.string().regex(/^-?\d+$/),
6767 "direction": z.string().regex(/^-?\d+$/),
6868 "speed": z.string().regex(/^-?\d+$/),
69-});
69+}).strict();
7070 export type Wind = z.infer<typeof WindSchema>;
7171
7272 export const ItemSchema = z.object({
@@ -79,7 +79,7 @@ export const ItemSchema = z.object({
7979 "long": z.string(),
8080 "pubDate": z.string(),
8181 "title": z.string(),
82-});
82+}).strict();
8383 export type Item = z.infer<typeof ItemSchema>;
8484
8585 export const ChannelSchema = z.object({
@@ -96,12 +96,12 @@ export const ChannelSchema = z.object({
9696 "ttl": z.string().regex(/^-?\d+$/),
9797 "units": UnitsSchema,
9898 "wind": WindSchema,
99-});
99+}).strict();
100100 export type Channel = z.infer<typeof ChannelSchema>;
101101
102102 export const ResultsSchema = z.object({
103103 "channel": ChannelSchema,
104-});
104+}).strict();
105105 export type Results = z.infer<typeof ResultsSchema>;
106106
107107 export const QuerySchema = z.object({
@@ -109,10 +109,10 @@ export const QuerySchema = z.object({
109109 "created": z.coerce.date(),
110110 "lang": z.string(),
111111 "results": ResultsSchema,
112-});
112+}).strict();
113113 export type Query = z.infer<typeof QuerySchema>;
114114
115115 export const TopLevelSchema = z.object({
116116 "query": QuerySchema,
117-});
117+}).strict();
118118 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/996bd.json

1 generated file · +4 −4
Mtypescript-zoddefault / TopLevel.ts+4 −4
@@ -34,20 +34,20 @@ export type Title = z.infer<typeof TitleSchema>;
3434 export const IdentifierSchema = z.object({
3535 "identifier": z.string(),
3636 "scheme": SchemeSchema,
37-});
37+}).strict();
3838 export type Identifier = z.infer<typeof IdentifierSchema>;
3939
4040 export const LinkSchema = z.object({
4141 "note": z.string(),
4242 "url": z.string(),
43-});
43+}).strict();
4444 export type Link = z.infer<typeof LinkSchema>;
4545
4646 export const TextSchema = z.object({
4747 "media_type": MediaTypeSchema,
4848 "title": TitleSchema,
4949 "url": z.string(),
50-});
50+}).strict();
5151 export type Text = z.infer<typeof TextSchema>;
5252
5353 export const TopLevelElementSchema = z.object({
@@ -59,7 +59,7 @@ export const TopLevelElementSchema = z.object({
5959 "other_names": z.array(z.any()),
6060 "superseded_by": z.union([z.null(), z.string()]),
6161 "text": z.array(TextSchema),
62-});
62+}).strict();
6363 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
6464
6565 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/misc/9a503.json

1 generated file · +4 −4
Mtypescript-zoddefault / TopLevel.ts+4 −4
@@ -11,20 +11,20 @@ export type Keyword = z.infer<typeof KeywordSchema>;
1111 export const IdentifierSchema = z.object({
1212 "identifier": z.string(),
1313 "scheme": z.string(),
14-});
14+}).strict();
1515 export type Identifier = z.infer<typeof IdentifierSchema>;
1616
1717 export const LinkSchema = z.object({
1818 "note": z.string(),
1919 "url": z.string(),
20-});
20+}).strict();
2121 export type Link = z.infer<typeof LinkSchema>;
2222
2323 export const TextSchema = z.object({
2424 "media_type": z.string(),
2525 "title": z.string(),
2626 "url": z.string(),
27-});
27+}).strict();
2828 export type Text = z.infer<typeof TextSchema>;
2929
3030 export const TopLevelElementSchema = z.object({
@@ -36,7 +36,7 @@ export const TopLevelElementSchema = z.object({
3636 "other_names": z.array(z.any()),
3737 "superseded_by": z.null(),
3838 "text": z.array(TextSchema),
39-});
39+}).strict();
4040 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
4141
4242 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/misc/9ac3b.json

1 generated file · +3 −3
Mtypescript-zoddefault / TopLevel.ts+3 −3
@@ -15,7 +15,7 @@ export const TitleSchema = z.enum([
1515 export type Title = z.infer<typeof TitleSchema>;
1616
1717 export const FacetsSchema = z.object({
18-});
18+}).strict();
1919 export type Facets = z.infer<typeof FacetsSchema>;
2020
2121 export const ResultSchema = z.object({
@@ -30,7 +30,7 @@ export const ResultSchema = z.object({
3030 "title": z.union([z.null(), TitleSchema]),
3131 "updated_at": z.coerce.date(),
3232 "uri": z.string(),
33-});
33+}).strict();
3434 export type Result = z.infer<typeof ResultSchema>;
3535
3636 export const TopLevelSchema = z.object({
@@ -41,5 +41,5 @@ export const TopLevelSchema = z.object({
4141 "offset": z.number().int(),
4242 "previous": z.boolean(),
4343 "results": z.array(ResultSchema),
44-});
44+}).strict();
4545 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/9eed5.json

1 generated file · +4 −4
Mtypescript-zoddefault / TopLevel.ts+4 −4
@@ -10,20 +10,20 @@ export type Keyword = z.infer<typeof KeywordSchema>;
1010 export const IdentifierSchema = z.object({
1111 "identifier": z.string(),
1212 "scheme": z.string(),
13-});
13+}).strict();
1414 export type Identifier = z.infer<typeof IdentifierSchema>;
1515
1616 export const LinkSchema = z.object({
1717 "note": z.string(),
1818 "url": z.string(),
19-});
19+}).strict();
2020 export type Link = z.infer<typeof LinkSchema>;
2121
2222 export const TextSchema = z.object({
2323 "media_type": z.string(),
2424 "title": z.string(),
2525 "url": z.string(),
26-});
26+}).strict();
2727 export type Text = z.infer<typeof TextSchema>;
2828
2929 export const TopLevelElementSchema = z.object({
@@ -35,7 +35,7 @@ export const TopLevelElementSchema = z.object({
3535 "other_names": z.array(z.any()),
3636 "superseded_by": z.null(),
3737 "text": z.array(TextSchema),
38-});
38+}).strict();
3939 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
4040
4141 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/misc/a0496.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -2,7 +2,7 @@ import * as z from "zod";
22
33
44 export const ErrorsSchema = z.object({
5-});
5+}).strict();
66 export type Errors = z.infer<typeof ErrorsSchema>;
77
88 export const TopLevelSchema = z.object({
@@ -23,5 +23,5 @@ export const TopLevelSchema = z.object({
2323 "type": z.string(),
2424 "updated_at": z.coerce.date(),
2525 "urlize_name": z.string(),
26-});
26+}).strict();
2727 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/a1eca.json

1 generated file · +14 −14
Mtypescript-zoddefault / TopLevel.ts+14 −14
@@ -4,7 +4,7 @@ import * as z from "zod";
44 export const AstronomySchema = z.object({
55 "sunrise": z.string(),
66 "sunset": z.string(),
7-});
7+}).strict();
88 export type Astronomy = z.infer<typeof AstronomySchema>;
99
1010 export const AtmosphereSchema = z.object({
@@ -12,7 +12,7 @@ export const AtmosphereSchema = z.object({
1212 "pressure": z.string(),
1313 "rising": z.string().regex(/^-?\d+$/),
1414 "visibility": z.string(),
15-});
15+}).strict();
1616 export type Atmosphere = z.infer<typeof AtmosphereSchema>;
1717
1818 export const ImageSchema = z.object({
@@ -21,7 +21,7 @@ export const ImageSchema = z.object({
2121 "title": z.string(),
2222 "url": z.string(),
2323 "width": z.string().regex(/^-?\d+$/),
24-});
24+}).strict();
2525 export type Image = z.infer<typeof ImageSchema>;
2626
2727 export const ConditionSchema = z.object({
@@ -29,7 +29,7 @@ export const ConditionSchema = z.object({
2929 "date": z.string(),
3030 "temp": z.string().regex(/^-?\d+$/),
3131 "text": z.string(),
32-});
32+}).strict();
3333 export type Condition = z.infer<typeof ConditionSchema>;
3434
3535 export const ForecastSchema = z.object({
@@ -39,19 +39,19 @@ export const ForecastSchema = z.object({
3939 "high": z.string().regex(/^-?\d+$/),
4040 "low": z.string().regex(/^-?\d+$/),
4141 "text": z.string(),
42-});
42+}).strict();
4343 export type Forecast = z.infer<typeof ForecastSchema>;
4444
4545 export const GuidSchema = z.object({
4646 "isPermaLink": z.enum(["true", "false"]),
47-});
47+}).strict();
4848 export type Guid = z.infer<typeof GuidSchema>;
4949
5050 export const LocationSchema = z.object({
5151 "city": z.string(),
5252 "country": z.string(),
5353 "region": z.string(),
54-});
54+}).strict();
5555 export type Location = z.infer<typeof LocationSchema>;
5656
5757 export const UnitsSchema = z.object({
@@ -59,14 +59,14 @@ export const UnitsSchema = z.object({
5959 "pressure": z.string(),
6060 "speed": z.string(),
6161 "temperature": z.string(),
62-});
62+}).strict();
6363 export type Units = z.infer<typeof UnitsSchema>;
6464
6565 export const WindSchema = z.object({
6666 "chill": z.string().regex(/^-?\d+$/),
6767 "direction": z.string().regex(/^-?\d+$/),
6868 "speed": z.string().regex(/^-?\d+$/),
69-});
69+}).strict();
7070 export type Wind = z.infer<typeof WindSchema>;
7171
7272 export const ItemSchema = z.object({
@@ -79,7 +79,7 @@ export const ItemSchema = z.object({
7979 "long": z.string(),
8080 "pubDate": z.string(),
8181 "title": z.string(),
82-});
82+}).strict();
8383 export type Item = z.infer<typeof ItemSchema>;
8484
8585 export const ChannelSchema = z.object({
@@ -96,12 +96,12 @@ export const ChannelSchema = z.object({
9696 "ttl": z.string().regex(/^-?\d+$/),
9797 "units": UnitsSchema,
9898 "wind": WindSchema,
99-});
99+}).strict();
100100 export type Channel = z.infer<typeof ChannelSchema>;
101101
102102 export const ResultsSchema = z.object({
103103 "channel": ChannelSchema,
104-});
104+}).strict();
105105 export type Results = z.infer<typeof ResultsSchema>;
106106
107107 export const QuerySchema = z.object({
@@ -109,10 +109,10 @@ export const QuerySchema = z.object({
109109 "created": z.coerce.date(),
110110 "lang": z.string(),
111111 "results": ResultsSchema,
112-});
112+}).strict();
113113 export type Query = z.infer<typeof QuerySchema>;
114114
115115 export const TopLevelSchema = z.object({
116116 "query": QuerySchema,
117-});
117+}).strict();
118118 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/a3d8c.json

1 generated file · +13 −13
Mtypescript-zoddefault / TopLevel.ts+13 −13
@@ -11,35 +11,35 @@ export type TypeName = z.infer<typeof TypeNameSchema>;
1111 export const TopSchema = z.object({
1212 "count": z.number().int(),
1313 "item": z.string(),
14-});
14+}).strict();
1515 export type Top = z.infer<typeof TopSchema>;
1616
1717 export const QuerySchema = z.object({
18-});
18+}).strict();
1919 export type Query = z.infer<typeof QuerySchema>;
2020
2121 export const GrantSchema = z.object({
2222 "flags": z.array(z.string()),
2323 "inherited": z.boolean(),
2424 "type": z.string(),
25-});
25+}).strict();
2626 export type Grant = z.infer<typeof GrantSchema>;
2727
2828 export const LicenseSchema = z.object({
2929 "name": z.string(),
30-});
30+}).strict();
3131 export type License = z.infer<typeof LicenseSchema>;
3232
3333 export const VisibleSchema = z.object({
3434 "table": z.boolean(),
35-});
35+}).strict();
3636 export type Visible = z.infer<typeof VisibleSchema>;
3737
3838 export const OwnerSchema = z.object({
3939 "displayName": z.string(),
4040 "id": z.string(),
4141 "screenName": z.string(),
42-});
42+}).strict();
4343 export type Owner = z.infer<typeof OwnerSchema>;
4444
4545 export const CachedContentsSchema = z.object({
@@ -50,12 +50,12 @@ export const CachedContentsSchema = z.object({
5050 "smallest": z.string(),
5151 "sum": z.string().regex(/^-?\d+$/).optional(),
5252 "top": z.array(TopSchema),
53-});
53+}).strict();
5454 export type CachedContents = z.infer<typeof CachedContentsSchema>;
5555
5656 export const RenderTypeConfigSchema = z.object({
5757 "visible": VisibleSchema,
58-});
58+}).strict();
5959 export type RenderTypeConfig = z.infer<typeof RenderTypeConfigSchema>;
6060
6161 export const ColumnSchema = z.object({
@@ -70,7 +70,7 @@ export const ColumnSchema = z.object({
7070 "renderTypeName": TypeNameSchema,
7171 "tableColumnId": z.number().int().optional(),
7272 "width": z.number().int().optional(),
73-});
73+}).strict();
7474 export type Column = z.infer<typeof ColumnSchema>;
7575
7676 export const MetadataSchema = z.object({
@@ -79,7 +79,7 @@ export const MetadataSchema = z.object({
7979 "rdfSubject": z.string().regex(/^-?\d+$/),
8080 "renderTypeConfig": RenderTypeConfigSchema,
8181 "rowIdentifier": z.string().regex(/^-?\d+$/),
82-});
82+}).strict();
8383 export type Metadata = z.infer<typeof MetadataSchema>;
8484
8585 export const ViewSchema = z.object({
@@ -120,16 +120,16 @@ export const ViewSchema = z.object({
120120 "viewCount": z.number().int(),
121121 "viewLastModified": z.number().int(),
122122 "viewType": z.string(),
123-});
123+}).strict();
124124 export type View = z.infer<typeof ViewSchema>;
125125
126126 export const MetaSchema = z.object({
127127 "view": ViewSchema,
128-});
128+}).strict();
129129 export type Meta = z.infer<typeof MetaSchema>;
130130
131131 export const TopLevelSchema = z.object({
132132 "data": z.array(z.array(z.union([z.null(), z.number().int(), z.string()]))),
133133 "meta": MetaSchema,
134-});
134+}).strict();
135135 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/a45b0.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -13,7 +13,7 @@ export const TopLevelElementSchema = z.object({
1313 "males": z.number().int(),
1414 "total": z.number().int(),
1515 "year": z.number().int(),
16-});
16+}).strict();
1717 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
1818
1919 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/misc/a71df.json

1 generated file · +4 −4
Mtypescript-zoddefault / TopLevel.ts+4 −4
@@ -11,14 +11,14 @@ export const StatusSchema = z.object({
1111 "reason": z.string(),
1212 "trend": z.string(),
1313 "type": z.string(),
14-});
14+}).strict();
1515 export type Status = z.infer<typeof StatusSchema>;
1616
1717 export const MetaSchema = z.object({
1818 "credit": z.string(),
1919 "updated": z.string(),
2020 "url": z.string(),
21-});
21+}).strict();
2222 export type Meta = z.infer<typeof MetaSchema>;
2323
2424 export const WeatherSchema = z.object({
@@ -27,7 +27,7 @@ export const WeatherSchema = z.object({
2727 "visibility": z.number(),
2828 "weather": z.string(),
2929 "wind": z.string(),
30-});
30+}).strict();
3131 export type Weather = z.infer<typeof WeatherSchema>;
3232
3333 export const TopLevelSchema = z.object({
@@ -39,5 +39,5 @@ export const TopLevelSchema = z.object({
3939 "state": z.string(),
4040 "status": StatusSchema,
4141 "weather": WeatherSchema,
42-});
42+}).strict();
4343 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/a9691.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -5,5 +5,5 @@ export const TopLevelSchema = z.object({
55 "base": z.string(),
66 "date": z.string(),
77 "rates": z.record(z.string(), z.number()),
8-});
8+}).strict();
99 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/ab0d1.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -13,7 +13,7 @@ export const TopLevelElementSchema = z.object({
1313 "males": z.number().int(),
1414 "total": z.number().int(),
1515 "year": z.number().int(),
16-});
16+}).strict();
1717 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
1818
1919 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/misc/abb4b.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -4,10 +4,10 @@ import * as z from "zod";
44 export const TotalPopulationSchema = z.object({
55 "date": z.string(),
66 "population": z.number().int(),
7-});
7+}).strict();
88 export type TotalPopulation = z.infer<typeof TotalPopulationSchema>;
99
1010 export const TopLevelSchema = z.object({
1111 "total_population": z.array(TotalPopulationSchema),
12-});
12+}).strict();
1313 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/ac944.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -5,5 +5,5 @@ export const TopLevelSchema = z.object({
55 "base": z.string(),
66 "date": z.string(),
77 "rates": z.record(z.string(), z.number()),
8-});
8+}).strict();
99 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/ad8be.json

1 generated file · +5 −5
Mtypescript-zoddefault / TopLevel.ts+5 −5
@@ -55,26 +55,26 @@ export type Title = z.infer<typeof TitleSchema>;
5555 export const IdentifierSchema = z.object({
5656 "identifier": z.string(),
5757 "scheme": SchemeSchema,
58-});
58+}).strict();
5959 export type Identifier = z.infer<typeof IdentifierSchema>;
6060
6161 export const LinkSchema = z.object({
6262 "note": NoteSchema,
6363 "url": z.string(),
64-});
64+}).strict();
6565 export type Link = z.infer<typeof LinkSchema>;
6666
6767 export const OtherNameSchema = z.object({
6868 "name": z.string(),
6969 "note": z.union([z.null(), z.string()]),
70-});
70+}).strict();
7171 export type OtherName = z.infer<typeof OtherNameSchema>;
7272
7373 export const TextSchema = z.object({
7474 "media_type": MediaTypeSchema,
7575 "title": TitleSchema,
7676 "url": z.string(),
77-});
77+}).strict();
7878 export type Text = z.infer<typeof TextSchema>;
7979
8080 export const TopLevelElementSchema = z.object({
@@ -86,7 +86,7 @@ export const TopLevelElementSchema = z.object({
8686 "other_names": z.array(OtherNameSchema),
8787 "superseded_by": z.union([z.null(), z.string()]),
8888 "text": z.array(TextSchema),
89-});
89+}).strict();
9090 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
9191
9292 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/misc/ae7f0.json

1 generated file · +5 −5
Mtypescript-zoddefault / TopLevel.ts+5 −5
@@ -37,7 +37,7 @@ export const KindSchema = z.enum([
3737 export type Kind = z.infer<typeof KindSchema>;
3838
3939 export const MediaEmbedSchema = z.object({
40-});
40+}).strict();
4141 export type MediaEmbed = z.infer<typeof MediaEmbedSchema>;
4242
4343 export const ChildDataSchema = z.object({
@@ -101,13 +101,13 @@ export const ChildDataSchema = z.object({
101101 "user_reports": z.array(z.any()),
102102 "view_count": z.null(),
103103 "visited": z.boolean(),
104-});
104+}).strict();
105105 export type ChildData = z.infer<typeof ChildDataSchema>;
106106
107107 export const ChildSchema = z.object({
108108 "data": ChildDataSchema,
109109 "kind": KindSchema,
110-});
110+}).strict();
111111 export type Child = z.infer<typeof ChildSchema>;
112112
113113 export const TopLevelDataSchema = z.object({
@@ -115,11 +115,11 @@ export const TopLevelDataSchema = z.object({
115115 "before": z.null(),
116116 "children": z.array(ChildSchema),
117117 "modhash": z.string(),
118-});
118+}).strict();
119119 export type TopLevelData = z.infer<typeof TopLevelDataSchema>;
120120
121121 export const TopLevelSchema = z.object({
122122 "data": TopLevelDataSchema,
123123 "kind": z.string(),
124-});
124+}).strict();
125125 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/ae9ca.json

1 generated file · +4 −4
Mtypescript-zoddefault / TopLevel.ts+4 −4
@@ -38,7 +38,7 @@ export type FeatureType = z.infer<typeof FeatureTypeSchema>;
3838 export const GeometrySchema = z.object({
3939 "coordinates": z.array(z.number()),
4040 "type": GeometryTypeSchema,
41-});
41+}).strict();
4242 export type Geometry = z.infer<typeof GeometrySchema>;
4343
4444 export const PropertiesSchema = z.object({
@@ -52,19 +52,19 @@ export const PropertiesSchema = z.object({
5252 "Number": z.string().regex(/^-?\d+$/),
5353 "Site Name": z.string(),
5454 "Ward": WardSchema,
55-});
55+}).strict();
5656 export type Properties = z.infer<typeof PropertiesSchema>;
5757
5858 export const FeatureSchema = z.object({
5959 "geometry": GeometrySchema,
6060 "properties": PropertiesSchema,
6161 "type": FeatureTypeSchema,
62-});
62+}).strict();
6363 export type Feature = z.infer<typeof FeatureSchema>;
6464
6565 export const TopLevelSchema = z.object({
6666 "features": z.array(FeatureSchema),
6767 "name": z.string(),
6868 "type": z.string(),
69-});
69+}).strict();
7070 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/af2d1.json

1 generated file · +6 −6
Mtypescript-zoddefault / TopLevel.ts+6 −6
@@ -74,13 +74,13 @@ export type FeatureType = z.infer<typeof FeatureTypeSchema>;
7474
7575 export const CrsPropertiesSchema = z.object({
7676 "name": z.string(),
77-});
77+}).strict();
7878 export type CrsProperties = z.infer<typeof CrsPropertiesSchema>;
7979
8080 export const GeometrySchema = z.object({
8181 "coordinates": z.array(z.array(z.array(z.array(z.number())))),
8282 "type": GeometryTypeSchema,
83-});
83+}).strict();
8484 export type Geometry = z.infer<typeof GeometrySchema>;
8585
8686 export const FeaturePropertiesSchema = z.object({
@@ -122,13 +122,13 @@ export const FeaturePropertiesSchema = z.object({
122122 "update_dat": z.string(),
123123 "updatedate": z.null(),
124124 "updateuser": z.null(),
125-});
125+}).strict();
126126 export type FeatureProperties = z.infer<typeof FeaturePropertiesSchema>;
127127
128128 export const CrsSchema = z.object({
129129 "properties": CrsPropertiesSchema,
130130 "type": z.string(),
131-});
131+}).strict();
132132 export type Crs = z.infer<typeof CrsSchema>;
133133
134134 export const FeatureSchema = z.object({
@@ -137,7 +137,7 @@ export const FeatureSchema = z.object({
137137 "id": z.string(),
138138 "properties": FeaturePropertiesSchema,
139139 "type": FeatureTypeSchema,
140-});
140+}).strict();
141141 export type Feature = z.infer<typeof FeatureSchema>;
142142
143143 export const TopLevelSchema = z.object({
@@ -145,5 +145,5 @@ export const TopLevelSchema = z.object({
145145 "features": z.array(FeatureSchema),
146146 "totalFeatures": z.number().int(),
147147 "type": z.string(),
148-});
148+}).strict();
149149 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/b4865.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -22,7 +22,7 @@ export type Nametype = z.infer<typeof NametypeSchema>;
2222 export const GeolocationSchema = z.object({
2323 "coordinates": z.array(z.number()),
2424 "type": TypeSchema,
25-});
25+}).strict();
2626 export type Geolocation = z.infer<typeof GeolocationSchema>;
2727
2828 export const TopLevelElementSchema = z.object({
@@ -38,7 +38,7 @@ export const TopLevelElementSchema = z.object({
3838 "reclat": z.string().optional(),
3939 "reclong": z.string().optional(),
4040 "year": z.coerce.date().optional(),
41-});
41+}).strict();
4242 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
4343
4444 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/misc/b6f2c.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -4,10 +4,10 @@ import * as z from "zod";
44 export const TotalPopulationSchema = z.object({
55 "date": z.string(),
66 "population": z.number().int(),
7-});
7+}).strict();
88 export type TotalPopulation = z.infer<typeof TotalPopulationSchema>;
99
1010 export const TopLevelSchema = z.object({
1111 "total_population": z.array(TotalPopulationSchema),
12-});
12+}).strict();
1313 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/b6fe5.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -6,5 +6,5 @@ export const TopLevelSchema = z.object({
66 "movie": z.string(),
77 "movie-image": z.string(),
88 "theater": z.string(),
9-});
9+}).strict();
1010 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/b9f64.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -3,5 +3,5 @@ import * as z from "zod";
33
44 export const TopLevelSchema = z.object({
55 "user-agent": z.string(),
6-});
6+}).strict();
77 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/bb1ec.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -4,10 +4,10 @@ import * as z from "zod";
44 export const TotalPopulationSchema = z.object({
55 "date": z.string(),
66 "population": z.number().int(),
7-});
7+}).strict();
88 export type TotalPopulation = z.infer<typeof TotalPopulationSchema>;
99
1010 export const TopLevelSchema = z.object({
1111 "total_population": z.array(TotalPopulationSchema),
12-});
12+}).strict();
1313 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/be234.json

1 generated file · +12 −12
Mtypescript-zoddefault / TopLevel.ts+12 −12
@@ -61,7 +61,7 @@ export const OembedSchema = z.object({
6161 "type": z.string(),
6262 "version": z.string(),
6363 "width": z.number().int(),
64-});
64+}).strict();
6565 export type Oembed = z.infer<typeof OembedSchema>;
6666
6767 export const MediaEmbedSchema = z.object({
@@ -69,32 +69,32 @@ export const MediaEmbedSchema = z.object({
6969 "height": z.number().int().optional(),
7070 "scrolling": z.boolean().optional(),
7171 "width": z.number().int().optional(),
72-});
72+}).strict();
7373 export type MediaEmbed = z.infer<typeof MediaEmbedSchema>;
7474
7575 export const SourceSchema = z.object({
7676 "height": z.number().int(),
7777 "url": z.string(),
7878 "width": z.number().int(),
79-});
79+}).strict();
8080 export type Source = z.infer<typeof SourceSchema>;
8181
8282 export const GifSchema = z.object({
8383 "resolutions": z.array(SourceSchema),
8484 "source": SourceSchema,
85-});
85+}).strict();
8686 export type Gif = z.infer<typeof GifSchema>;
8787
8888 export const MediaSchema = z.object({
8989 "oembed": OembedSchema,
9090 "type": DomainSchema,
91-});
91+}).strict();
9292 export type Media = z.infer<typeof MediaSchema>;
9393
9494 export const VariantsSchema = z.object({
9595 "gif": GifSchema.optional(),
9696 "mp4": GifSchema.optional(),
97-});
97+}).strict();
9898 export type Variants = z.infer<typeof VariantsSchema>;
9999
100100 export const ImageSchema = z.object({
@@ -102,13 +102,13 @@ export const ImageSchema = z.object({
102102 "resolutions": z.array(SourceSchema),
103103 "source": SourceSchema,
104104 "variants": VariantsSchema,
105-});
105+}).strict();
106106 export type Image = z.infer<typeof ImageSchema>;
107107
108108 export const PreviewSchema = z.object({
109109 "enabled": z.boolean(),
110110 "images": z.array(ImageSchema),
111-});
111+}).strict();
112112 export type Preview = z.infer<typeof PreviewSchema>;
113113
114114 export const ChildDataSchema = z.object({
@@ -176,13 +176,13 @@ export const ChildDataSchema = z.object({
176176 "user_reports": z.array(z.any()),
177177 "view_count": z.null(),
178178 "visited": z.boolean(),
179-});
179+}).strict();
180180 export type ChildData = z.infer<typeof ChildDataSchema>;
181181
182182 export const ChildSchema = z.object({
183183 "data": ChildDataSchema,
184184 "kind": KindSchema,
185-});
185+}).strict();
186186 export type Child = z.infer<typeof ChildSchema>;
187187
188188 export const TopLevelDataSchema = z.object({
@@ -190,11 +190,11 @@ export const TopLevelDataSchema = z.object({
190190 "before": z.null(),
191191 "children": z.array(ChildSchema),
192192 "modhash": z.string(),
193-});
193+}).strict();
194194 export type TopLevelData = z.infer<typeof TopLevelDataSchema>;
195195
196196 export const TopLevelSchema = z.object({
197197 "data": TopLevelDataSchema,
198198 "kind": z.string(),
199-});
199+}).strict();
200200 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/c0356.json

1 generated file · +3 −3
Mtypescript-zoddefault / TopLevel.ts+3 −3
@@ -4,18 +4,18 @@ import * as z from "zod";
44 export const DatumSchema = z.object({
55 "anomaly": z.string(),
66 "value": z.string(),
7-});
7+}).strict();
88 export type Datum = z.infer<typeof DatumSchema>;
99
1010 export const DescriptionSchema = z.object({
1111 "base_period": z.string(),
1212 "missing": z.number().int(),
1313 "title": z.string(),
14-});
14+}).strict();
1515 export type Description = z.infer<typeof DescriptionSchema>;
1616
1717 export const TopLevelSchema = z.object({
1818 "data": z.record(z.string(), DatumSchema),
1919 "description": DescriptionSchema,
20-});
20+}).strict();
2121 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/c0a3a.json

1 generated file · +4 −4
Mtypescript-zoddefault / TopLevel.ts+4 −4
@@ -11,14 +11,14 @@ export const StatusSchema = z.object({
1111 "reason": z.string(),
1212 "trend": z.string(),
1313 "type": z.string(),
14-});
14+}).strict();
1515 export type Status = z.infer<typeof StatusSchema>;
1616
1717 export const MetaSchema = z.object({
1818 "credit": z.string(),
1919 "updated": z.string(),
2020 "url": z.string(),
21-});
21+}).strict();
2222 export type Meta = z.infer<typeof MetaSchema>;
2323
2424 export const WeatherSchema = z.object({
@@ -27,7 +27,7 @@ export const WeatherSchema = z.object({
2727 "visibility": z.number(),
2828 "weather": z.string(),
2929 "wind": z.string(),
30-});
30+}).strict();
3131 export type Weather = z.infer<typeof WeatherSchema>;
3232
3333 export const TopLevelSchema = z.object({
@@ -39,5 +39,5 @@ export const TopLevelSchema = z.object({
3939 "state": z.string(),
4040 "status": StatusSchema,
4141 "weather": WeatherSchema,
42-});
42+}).strict();
4343 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/c3303.json

1 generated file · +10 −10
Mtypescript-zoddefault / TopLevel.ts+10 −10
@@ -26,7 +26,7 @@ export const The480_WStillSchema = z.object({
2626 "size": z.string().regex(/^-?\d+$/).optional(),
2727 "url": z.string(),
2828 "width": z.string().regex(/^-?\d+$/),
29-});
29+}).strict();
3030 export type The480_WStill = z.infer<typeof The480_WStillSchema>;
3131
3232 export const DownsizedSmallSchema = z.object({
@@ -34,7 +34,7 @@ export const DownsizedSmallSchema = z.object({
3434 "mp4": z.string(),
3535 "mp4_size": z.string().regex(/^-?\d+$/),
3636 "width": z.string().regex(/^-?\d+$/),
37-});
37+}).strict();
3838 export type DownsizedSmall = z.infer<typeof DownsizedSmallSchema>;
3939
4040 export const FixedHeightSchema = z.object({
@@ -48,13 +48,13 @@ export const FixedHeightSchema = z.object({
4848 "webp": z.string(),
4949 "webp_size": z.string().regex(/^-?\d+$/),
5050 "width": z.string().regex(/^-?\d+$/),
51-});
51+}).strict();
5252 export type FixedHeight = z.infer<typeof FixedHeightSchema>;
5353
5454 export const LoopingSchema = z.object({
5555 "mp4": z.string(),
5656 "mp4_size": z.string().regex(/^-?\d+$/),
57-});
57+}).strict();
5858 export type Looping = z.infer<typeof LoopingSchema>;
5959
6060 export const UserSchema = z.object({
@@ -63,21 +63,21 @@ export const UserSchema = z.object({
6363 "display_name": z.string(),
6464 "profile_url": z.string(),
6565 "username": UsernameSchema,
66-});
66+}).strict();
6767 export type User = z.infer<typeof UserSchema>;
6868
6969 export const MetaSchema = z.object({
7070 "msg": z.string(),
7171 "response_id": z.string(),
7272 "status": z.number().int(),
73-});
73+}).strict();
7474 export type Meta = z.infer<typeof MetaSchema>;
7575
7676 export const PaginationSchema = z.object({
7777 "count": z.number().int(),
7878 "offset": z.number().int(),
7979 "total_count": z.number().int(),
80-});
80+}).strict();
8181 export type Pagination = z.infer<typeof PaginationSchema>;
8282
8383 export const ImagesSchema = z.object({
@@ -104,7 +104,7 @@ export const ImagesSchema = z.object({
104104 "preview_gif": The480_WStillSchema,
105105 "preview_webp": The480_WStillSchema,
106106 "480w_still": The480_WStillSchema.optional(),
107-});
107+}).strict();
108108 export type Images = z.infer<typeof ImagesSchema>;
109109
110110 export const DatumSchema = z.object({
@@ -126,12 +126,12 @@ export const DatumSchema = z.object({
126126 "url": z.string(),
127127 "user": UserSchema.optional(),
128128 "username": UsernameSchema,
129-});
129+}).strict();
130130 export type Datum = z.infer<typeof DatumSchema>;
131131
132132 export const TopLevelSchema = z.object({
133133 "data": z.array(DatumSchema),
134134 "meta": MetaSchema,
135135 "pagination": PaginationSchema,
136-});
136+}).strict();
137137 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/c6cfd.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -4,10 +4,10 @@ import * as z from "zod";
44 export const CountrySchema = z.object({
55 "code": z.string(),
66 "name": z.string(),
7-});
7+}).strict();
88 export type Country = z.infer<typeof CountrySchema>;
99
1010 export const TopLevelSchema = z.object({
1111 "countries": z.array(CountrySchema),
12-});
12+}).strict();
1313 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/c8c7e.json

1 generated file · +3 −3
Mtypescript-zoddefault / TopLevel.ts+3 −3
@@ -17,7 +17,7 @@ export type Value = z.infer<typeof ValueSchema>;
1717 export const CountrySchema = z.object({
1818 "id": IdSchema,
1919 "value": ValueSchema,
20-});
20+}).strict();
2121 export type Country = z.infer<typeof CountrySchema>;
2222
2323 export const FluffyTopLevelSchema = z.object({
@@ -25,7 +25,7 @@ export const FluffyTopLevelSchema = z.object({
2525 "pages": z.number().int(),
2626 "per_page": z.string().regex(/^-?\d+$/),
2727 "total": z.number().int(),
28-});
28+}).strict();
2929 export type FluffyTopLevel = z.infer<typeof FluffyTopLevelSchema>;
3030
3131 export const PurpleTopLevelSchema = z.object({
@@ -34,7 +34,7 @@ export const PurpleTopLevelSchema = z.object({
3434 "decimal": z.string().regex(/^-?\d+$/),
3535 "indicator": CountrySchema,
3636 "value": z.string(),
37-});
37+}).strict();
3838 export type PurpleTopLevel = z.infer<typeof PurpleTopLevelSchema>;
3939
4040 export const TopLevelSchema = z.array(z.union([z.array(PurpleTopLevelSchema), FluffyTopLevelSchema]));
Test case

test/inputs/json/misc/cb0cc.json

1 generated file · +3 −3
Mtypescript-zoddefault / TopLevel.ts+3 −3
@@ -17,7 +17,7 @@ export const LaureateSchema = z.object({
1717 "motivation": z.string().optional(),
1818 "share": z.string().regex(/^-?\d+$/),
1919 "surname": z.string(),
20-});
20+}).strict();
2121 export type Laureate = z.infer<typeof LaureateSchema>;
2222
2323 export const PrizeSchema = z.object({
@@ -25,10 +25,10 @@ export const PrizeSchema = z.object({
2525 "laureates": z.array(LaureateSchema),
2626 "overallMotivation": z.string().optional(),
2727 "year": z.string().regex(/^-?\d+$/),
28-});
28+}).strict();
2929 export type Prize = z.infer<typeof PrizeSchema>;
3030
3131 export const TopLevelSchema = z.object({
3232 "prizes": z.array(PrizeSchema),
33-});
33+}).strict();
3434 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/cb81e.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -6,11 +6,11 @@ export const DescriptionSchema = z.object({
66 "missing": z.string(),
77 "title": z.string(),
88 "units": z.string(),
9-});
9+}).strict();
1010 export type Description = z.infer<typeof DescriptionSchema>;
1111
1212 export const TopLevelSchema = z.object({
1313 "data": z.record(z.string(), z.string()),
1414 "description": DescriptionSchema,
15-});
15+}).strict();
1616 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/ccd18.json

1 generated file · +4 −4
Mtypescript-zoddefault / TopLevel.ts+4 −4
@@ -11,14 +11,14 @@ export const StatusSchema = z.object({
1111 "reason": z.string(),
1212 "trend": z.string(),
1313 "type": z.string(),
14-});
14+}).strict();
1515 export type Status = z.infer<typeof StatusSchema>;
1616
1717 export const MetaSchema = z.object({
1818 "credit": z.string(),
1919 "updated": z.string(),
2020 "url": z.string(),
21-});
21+}).strict();
2222 export type Meta = z.infer<typeof MetaSchema>;
2323
2424 export const WeatherSchema = z.object({
@@ -27,7 +27,7 @@ export const WeatherSchema = z.object({
2727 "visibility": z.number(),
2828 "weather": z.string(),
2929 "wind": z.string(),
30-});
30+}).strict();
3131 export type Weather = z.infer<typeof WeatherSchema>;
3232
3333 export const TopLevelSchema = z.object({
@@ -39,5 +39,5 @@ export const TopLevelSchema = z.object({
3939 "state": z.string(),
4040 "status": StatusSchema,
4141 "weather": WeatherSchema,
42-});
42+}).strict();
4343 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/cd238.json

1 generated file · +4 −4
Mtypescript-zoddefault / TopLevel.ts+4 −4
@@ -11,14 +11,14 @@ export const StatusSchema = z.object({
1111 "reason": z.string(),
1212 "trend": z.string(),
1313 "type": z.string(),
14-});
14+}).strict();
1515 export type Status = z.infer<typeof StatusSchema>;
1616
1717 export const MetaSchema = z.object({
1818 "credit": z.string(),
1919 "updated": z.string(),
2020 "url": z.string(),
21-});
21+}).strict();
2222 export type Meta = z.infer<typeof MetaSchema>;
2323
2424 export const WeatherSchema = z.object({
@@ -27,7 +27,7 @@ export const WeatherSchema = z.object({
2727 "visibility": z.number(),
2828 "weather": z.string(),
2929 "wind": z.string(),
30-});
30+}).strict();
3131 export type Weather = z.infer<typeof WeatherSchema>;
3232
3333 export const TopLevelSchema = z.object({
@@ -39,5 +39,5 @@ export const TopLevelSchema = z.object({
3939 "state": z.string(),
4040 "status": StatusSchema,
4141 "weather": WeatherSchema,
42-});
42+}).strict();
4343 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/cd463.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -5,5 +5,5 @@ export const TopLevelSchema = z.object({
55 "base": z.string(),
66 "date": z.string(),
77 "rates": z.record(z.string(), z.number()),
8-});
8+}).strict();
99 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/cda6c.json

1 generated file · +3 −3
Mtypescript-zoddefault / TopLevel.ts+3 −3
@@ -17,7 +17,7 @@ export type Value = z.infer<typeof ValueSchema>;
1717 export const CountrySchema = z.object({
1818 "id": IdSchema,
1919 "value": ValueSchema,
20-});
20+}).strict();
2121 export type Country = z.infer<typeof CountrySchema>;
2222
2323 export const FluffyTopLevelSchema = z.object({
@@ -25,7 +25,7 @@ export const FluffyTopLevelSchema = z.object({
2525 "pages": z.number().int(),
2626 "per_page": z.string().regex(/^-?\d+$/),
2727 "total": z.number().int(),
28-});
28+}).strict();
2929 export type FluffyTopLevel = z.infer<typeof FluffyTopLevelSchema>;
3030
3131 export const PurpleTopLevelSchema = z.object({
@@ -34,7 +34,7 @@ export const PurpleTopLevelSchema = z.object({
3434 "decimal": z.string().regex(/^-?\d+$/),
3535 "indicator": CountrySchema,
3636 "value": z.string().regex(/^-?\d+$/),
37-});
37+}).strict();
3838 export type PurpleTopLevel = z.infer<typeof PurpleTopLevelSchema>;
3939
4040 export const TopLevelSchema = z.array(z.union([z.array(PurpleTopLevelSchema), FluffyTopLevelSchema]));
Test case

test/inputs/json/misc/cf0d8.json

1 generated file · +14 −14
Mtypescript-zoddefault / TopLevel.ts+14 −14
@@ -4,7 +4,7 @@ import * as z from "zod";
44 export const AstronomySchema = z.object({
55 "sunrise": z.string(),
66 "sunset": z.string(),
7-});
7+}).strict();
88 export type Astronomy = z.infer<typeof AstronomySchema>;
99
1010 export const AtmosphereSchema = z.object({
@@ -12,7 +12,7 @@ export const AtmosphereSchema = z.object({
1212 "pressure": z.string(),
1313 "rising": z.string().regex(/^-?\d+$/),
1414 "visibility": z.string(),
15-});
15+}).strict();
1616 export type Atmosphere = z.infer<typeof AtmosphereSchema>;
1717
1818 export const ImageSchema = z.object({
@@ -21,7 +21,7 @@ export const ImageSchema = z.object({
2121 "title": z.string(),
2222 "url": z.string(),
2323 "width": z.string().regex(/^-?\d+$/),
24-});
24+}).strict();
2525 export type Image = z.infer<typeof ImageSchema>;
2626
2727 export const ConditionSchema = z.object({
@@ -29,7 +29,7 @@ export const ConditionSchema = z.object({
2929 "date": z.string(),
3030 "temp": z.string().regex(/^-?\d+$/),
3131 "text": z.string(),
32-});
32+}).strict();
3333 export type Condition = z.infer<typeof ConditionSchema>;
3434
3535 export const ForecastSchema = z.object({
@@ -39,19 +39,19 @@ export const ForecastSchema = z.object({
3939 "high": z.string().regex(/^-?\d+$/),
4040 "low": z.string().regex(/^-?\d+$/),
4141 "text": z.string(),
42-});
42+}).strict();
4343 export type Forecast = z.infer<typeof ForecastSchema>;
4444
4545 export const GuidSchema = z.object({
4646 "isPermaLink": z.enum(["true", "false"]),
47-});
47+}).strict();
4848 export type Guid = z.infer<typeof GuidSchema>;
4949
5050 export const LocationSchema = z.object({
5151 "city": z.string(),
5252 "country": z.string(),
5353 "region": z.string(),
54-});
54+}).strict();
5555 export type Location = z.infer<typeof LocationSchema>;
5656
5757 export const UnitsSchema = z.object({
@@ -59,14 +59,14 @@ export const UnitsSchema = z.object({
5959 "pressure": z.string(),
6060 "speed": z.string(),
6161 "temperature": z.string(),
62-});
62+}).strict();
6363 export type Units = z.infer<typeof UnitsSchema>;
6464
6565 export const WindSchema = z.object({
6666 "chill": z.string().regex(/^-?\d+$/),
6767 "direction": z.string().regex(/^-?\d+$/),
6868 "speed": z.string().regex(/^-?\d+$/),
69-});
69+}).strict();
7070 export type Wind = z.infer<typeof WindSchema>;
7171
7272 export const ItemSchema = z.object({
@@ -79,7 +79,7 @@ export const ItemSchema = z.object({
7979 "long": z.string(),
8080 "pubDate": z.string(),
8181 "title": z.string(),
82-});
82+}).strict();
8383 export type Item = z.infer<typeof ItemSchema>;
8484
8585 export const ChannelSchema = z.object({
@@ -96,12 +96,12 @@ export const ChannelSchema = z.object({
9696 "ttl": z.string().regex(/^-?\d+$/),
9797 "units": UnitsSchema,
9898 "wind": WindSchema,
99-});
99+}).strict();
100100 export type Channel = z.infer<typeof ChannelSchema>;
101101
102102 export const ResultsSchema = z.object({
103103 "channel": ChannelSchema,
104-});
104+}).strict();
105105 export type Results = z.infer<typeof ResultsSchema>;
106106
107107 export const QuerySchema = z.object({
@@ -109,10 +109,10 @@ export const QuerySchema = z.object({
109109 "created": z.coerce.date(),
110110 "lang": z.string(),
111111 "results": ResultsSchema,
112-});
112+}).strict();
113113 export type Query = z.infer<typeof QuerySchema>;
114114
115115 export const TopLevelSchema = z.object({
116116 "query": QuerySchema,
117-});
117+}).strict();
118118 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/cfbce.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -5,5 +5,5 @@ export const TopLevelSchema = z.object({
55 "base": z.string(),
66 "date": z.string(),
77 "rates": z.record(z.string(), z.number()),
8-});
8+}).strict();
99 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/d0908.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -4,10 +4,10 @@ import * as z from "zod";
44 export const TotalPopulationSchema = z.object({
55 "date": z.string(),
66 "population": z.number().int(),
7-});
7+}).strict();
88 export type TotalPopulation = z.infer<typeof TotalPopulationSchema>;
99
1010 export const TopLevelSchema = z.object({
1111 "total_population": z.array(TotalPopulationSchema),
12-});
12+}).strict();
1313 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/d23d5.json

1 generated file · +3 −3
Mtypescript-zoddefault / TopLevel.ts+3 −3
@@ -2,7 +2,7 @@ import * as z from "zod";
22
33
44 export const FacetsSchema = z.object({
5-});
5+}).strict();
66 export type Facets = z.infer<typeof FacetsSchema>;
77
88 export const ResultSchema = z.object({
@@ -12,7 +12,7 @@ export const ResultSchema = z.object({
1212 "name": z.string(),
1313 "updated_at": z.coerce.date(),
1414 "uri": z.string(),
15-});
15+}).strict();
1616 export type Result = z.infer<typeof ResultSchema>;
1717
1818 export const TopLevelSchema = z.object({
@@ -23,5 +23,5 @@ export const TopLevelSchema = z.object({
2323 "offset": z.number().int(),
2424 "previous": z.boolean(),
2525 "results": z.array(ResultSchema),
26-});
26+}).strict();
2727 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/dbfb3.json

1 generated file · +14 −14
Mtypescript-zoddefault / TopLevel.ts+14 −14
@@ -10,7 +10,7 @@ export type Text = z.infer<typeof TextSchema>;
1010 export const AstronomySchema = z.object({
1111 "sunrise": z.string(),
1212 "sunset": z.string(),
13-});
13+}).strict();
1414 export type Astronomy = z.infer<typeof AstronomySchema>;
1515
1616 export const AtmosphereSchema = z.object({
@@ -18,7 +18,7 @@ export const AtmosphereSchema = z.object({
1818 "pressure": z.string(),
1919 "rising": z.string().regex(/^-?\d+$/),
2020 "visibility": z.string(),
21-});
21+}).strict();
2222 export type Atmosphere = z.infer<typeof AtmosphereSchema>;
2323
2424 export const ImageSchema = z.object({
@@ -27,7 +27,7 @@ export const ImageSchema = z.object({
2727 "title": z.string(),
2828 "url": z.string(),
2929 "width": z.string().regex(/^-?\d+$/),
30-});
30+}).strict();
3131 export type Image = z.infer<typeof ImageSchema>;
3232
3333 export const ConditionSchema = z.object({
@@ -35,7 +35,7 @@ export const ConditionSchema = z.object({
3535 "date": z.string(),
3636 "temp": z.string().regex(/^-?\d+$/),
3737 "text": TextSchema,
38-});
38+}).strict();
3939 export type Condition = z.infer<typeof ConditionSchema>;
4040
4141 export const ForecastSchema = z.object({
@@ -45,19 +45,19 @@ export const ForecastSchema = z.object({
4545 "high": z.string().regex(/^-?\d+$/),
4646 "low": z.string().regex(/^-?\d+$/),
4747 "text": TextSchema,
48-});
48+}).strict();
4949 export type Forecast = z.infer<typeof ForecastSchema>;
5050
5151 export const GuidSchema = z.object({
5252 "isPermaLink": z.enum(["true", "false"]),
53-});
53+}).strict();
5454 export type Guid = z.infer<typeof GuidSchema>;
5555
5656 export const LocationSchema = z.object({
5757 "city": z.string(),
5858 "country": z.string(),
5959 "region": z.string(),
60-});
60+}).strict();
6161 export type Location = z.infer<typeof LocationSchema>;
6262
6363 export const UnitsSchema = z.object({
@@ -65,14 +65,14 @@ export const UnitsSchema = z.object({
6565 "pressure": z.string(),
6666 "speed": z.string(),
6767 "temperature": z.string(),
68-});
68+}).strict();
6969 export type Units = z.infer<typeof UnitsSchema>;
7070
7171 export const WindSchema = z.object({
7272 "chill": z.string().regex(/^-?\d+$/),
7373 "direction": z.string().regex(/^-?\d+$/),
7474 "speed": z.string().regex(/^-?\d+$/),
75-});
75+}).strict();
7676 export type Wind = z.infer<typeof WindSchema>;
7777
7878 export const ItemSchema = z.object({
@@ -85,7 +85,7 @@ export const ItemSchema = z.object({
8585 "long": z.string(),
8686 "pubDate": z.string(),
8787 "title": z.string(),
88-});
88+}).strict();
8989 export type Item = z.infer<typeof ItemSchema>;
9090
9191 export const ChannelSchema = z.object({
@@ -102,12 +102,12 @@ export const ChannelSchema = z.object({
102102 "ttl": z.string().regex(/^-?\d+$/),
103103 "units": UnitsSchema,
104104 "wind": WindSchema,
105-});
105+}).strict();
106106 export type Channel = z.infer<typeof ChannelSchema>;
107107
108108 export const ResultsSchema = z.object({
109109 "channel": ChannelSchema,
110-});
110+}).strict();
111111 export type Results = z.infer<typeof ResultsSchema>;
112112
113113 export const QuerySchema = z.object({
@@ -115,10 +115,10 @@ export const QuerySchema = z.object({
115115 "created": z.coerce.date(),
116116 "lang": z.string(),
117117 "results": ResultsSchema,
118-});
118+}).strict();
119119 export type Query = z.infer<typeof QuerySchema>;
120120
121121 export const TopLevelSchema = z.object({
122122 "query": QuerySchema,
123-});
123+}).strict();
124124 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/dc44f.json

1 generated file · +4 −4
Mtypescript-zoddefault / TopLevel.ts+4 −4
@@ -106,13 +106,13 @@ export type Type = z.infer<typeof TypeSchema>;
106106 export const LegalityElementSchema = z.object({
107107 "format": FormatSchema,
108108 "legality": LegalityEnumSchema,
109-});
109+}).strict();
110110 export type LegalityElement = z.infer<typeof LegalityElementSchema>;
111111
112112 export const RulingSchema = z.object({
113113 "date": z.string(),
114114 "text": z.string(),
115-});
115+}).strict();
116116 export type Ruling = z.infer<typeof RulingSchema>;
117117
118118 export const CardSchema = z.object({
@@ -143,7 +143,7 @@ export const CardSchema = z.object({
143143 "type": z.string(),
144144 "types": z.array(TypeSchema),
145145 "variations": z.array(z.number().int()).optional(),
146-});
146+}).strict();
147147 export type Card = z.infer<typeof CardSchema>;
148148
149149 export const TopLevelSchema = z.object({
@@ -158,5 +158,5 @@ export const TopLevelSchema = z.object({
158158 "name": z.string(),
159159 "releaseDate": z.string(),
160160 "type": z.string(),
161-});
161+}).strict();
162162 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/dd1ce.json

1 generated file · +4 −4
Mtypescript-zoddefault / TopLevel.ts+4 −4
@@ -106,13 +106,13 @@ export type Type = z.infer<typeof TypeSchema>;
106106 export const LegalityElementSchema = z.object({
107107 "format": FormatSchema,
108108 "legality": LegalityEnumSchema,
109-});
109+}).strict();
110110 export type LegalityElement = z.infer<typeof LegalityElementSchema>;
111111
112112 export const RulingSchema = z.object({
113113 "date": z.string(),
114114 "text": z.string(),
115-});
115+}).strict();
116116 export type Ruling = z.infer<typeof RulingSchema>;
117117
118118 export const CardSchema = z.object({
@@ -143,7 +143,7 @@ export const CardSchema = z.object({
143143 "type": z.string(),
144144 "types": z.array(TypeSchema),
145145 "variations": z.array(z.number().int()).optional(),
146-});
146+}).strict();
147147 export type Card = z.infer<typeof CardSchema>;
148148
149149 export const TopLevelSchema = z.object({
@@ -158,5 +158,5 @@ export const TopLevelSchema = z.object({
158158 "name": z.string(),
159159 "releaseDate": z.string(),
160160 "type": z.string(),
161-});
161+}).strict();
162162 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/dec3a.json

1 generated file · +7 −7
Mtypescript-zoddefault / TopLevel.ts+7 −7
@@ -4,20 +4,20 @@ import * as z from "zod";
44 export const ResponseInfoSchema = z.object({
55 "developerMessage": z.string(),
66 "status": z.number().int(),
7-});
7+}).strict();
88 export type ResponseInfo = z.infer<typeof ResponseInfoSchema>;
99
1010 export const ResultsetSchema = z.object({
1111 "count": z.number().int(),
1212 "page": z.number().int(),
1313 "pagesize": z.number().int(),
14-});
14+}).strict();
1515 export type Resultset = z.infer<typeof ResultsetSchema>;
1616
1717 export const HiringOrgSchema = z.object({
1818 "name": z.string(),
1919 "uuid": z.string().uuid(),
20-});
20+}).strict();
2121 export type HiringOrg = z.infer<typeof HiringOrgSchema>;
2222
2323 export const LocationSchema = z.object({
@@ -31,14 +31,14 @@ export const LocationSchema = z.object({
3131 "postal_code": z.string().regex(/^-?\d+$/),
3232 "sub_premise": z.null(),
3333 "thoroughfare": z.string(),
34-});
34+}).strict();
3535 export type Location = z.infer<typeof LocationSchema>;
3636
3737 export const MetadataSchema = z.object({
3838 "executionTime": z.number(),
3939 "responseInfo": ResponseInfoSchema,
4040 "resultset": ResultsetSchema,
41-});
41+}).strict();
4242 export type Metadata = z.infer<typeof MetadataSchema>;
4343
4444 export const ResultSchema = z.object({
@@ -64,11 +64,11 @@ export const ResultSchema = z.object({
6464 "url": z.string(),
6565 "uuid": z.string().uuid(),
6666 "vuuid": z.string().uuid(),
67-});
67+}).strict();
6868 export type Result = z.infer<typeof ResultSchema>;
6969
7070 export const TopLevelSchema = z.object({
7171 "metadata": MetadataSchema,
7272 "results": z.array(ResultSchema),
73-});
73+}).strict();
7474 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/df957.json

1 generated file · +14 −14
Mtypescript-zoddefault / TopLevel.ts+14 −14
@@ -4,7 +4,7 @@ import * as z from "zod";
44 export const AstronomySchema = z.object({
55 "sunrise": z.string(),
66 "sunset": z.string(),
7-});
7+}).strict();
88 export type Astronomy = z.infer<typeof AstronomySchema>;
99
1010 export const AtmosphereSchema = z.object({
@@ -12,7 +12,7 @@ export const AtmosphereSchema = z.object({
1212 "pressure": z.string(),
1313 "rising": z.string().regex(/^-?\d+$/),
1414 "visibility": z.string(),
15-});
15+}).strict();
1616 export type Atmosphere = z.infer<typeof AtmosphereSchema>;
1717
1818 export const ImageSchema = z.object({
@@ -21,7 +21,7 @@ export const ImageSchema = z.object({
2121 "title": z.string(),
2222 "url": z.string(),
2323 "width": z.string().regex(/^-?\d+$/),
24-});
24+}).strict();
2525 export type Image = z.infer<typeof ImageSchema>;
2626
2727 export const ConditionSchema = z.object({
@@ -29,7 +29,7 @@ export const ConditionSchema = z.object({
2929 "date": z.string(),
3030 "temp": z.string().regex(/^-?\d+$/),
3131 "text": z.string(),
32-});
32+}).strict();
3333 export type Condition = z.infer<typeof ConditionSchema>;
3434
3535 export const ForecastSchema = z.object({
@@ -39,19 +39,19 @@ export const ForecastSchema = z.object({
3939 "high": z.string().regex(/^-?\d+$/),
4040 "low": z.string().regex(/^-?\d+$/),
4141 "text": z.string(),
42-});
42+}).strict();
4343 export type Forecast = z.infer<typeof ForecastSchema>;
4444
4545 export const GuidSchema = z.object({
4646 "isPermaLink": z.enum(["true", "false"]),
47-});
47+}).strict();
4848 export type Guid = z.infer<typeof GuidSchema>;
4949
5050 export const LocationSchema = z.object({
5151 "city": z.string(),
5252 "country": z.string(),
5353 "region": z.string(),
54-});
54+}).strict();
5555 export type Location = z.infer<typeof LocationSchema>;
5656
5757 export const UnitsSchema = z.object({
@@ -59,14 +59,14 @@ export const UnitsSchema = z.object({
5959 "pressure": z.string(),
6060 "speed": z.string(),
6161 "temperature": z.string(),
62-});
62+}).strict();
6363 export type Units = z.infer<typeof UnitsSchema>;
6464
6565 export const WindSchema = z.object({
6666 "chill": z.string().regex(/^-?\d+$/),
6767 "direction": z.string().regex(/^-?\d+$/),
6868 "speed": z.string().regex(/^-?\d+$/),
69-});
69+}).strict();
7070 export type Wind = z.infer<typeof WindSchema>;
7171
7272 export const ItemSchema = z.object({
@@ -79,7 +79,7 @@ export const ItemSchema = z.object({
7979 "long": z.string(),
8080 "pubDate": z.string(),
8181 "title": z.string(),
82-});
82+}).strict();
8383 export type Item = z.infer<typeof ItemSchema>;
8484
8585 export const ChannelSchema = z.object({
@@ -96,12 +96,12 @@ export const ChannelSchema = z.object({
9696 "ttl": z.string().regex(/^-?\d+$/),
9797 "units": UnitsSchema,
9898 "wind": WindSchema,
99-});
99+}).strict();
100100 export type Channel = z.infer<typeof ChannelSchema>;
101101
102102 export const ResultsSchema = z.object({
103103 "channel": ChannelSchema,
104-});
104+}).strict();
105105 export type Results = z.infer<typeof ResultsSchema>;
106106
107107 export const QuerySchema = z.object({
@@ -109,10 +109,10 @@ export const QuerySchema = z.object({
109109 "created": z.coerce.date(),
110110 "lang": z.string(),
111111 "results": ResultsSchema,
112-});
112+}).strict();
113113 export type Query = z.infer<typeof QuerySchema>;
114114
115115 export const TopLevelSchema = z.object({
116116 "query": QuerySchema,
117-});
117+}).strict();
118118 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/e0ac7.json

1 generated file · +10 −10
Mtypescript-zoddefault / TopLevel.ts+10 −10
@@ -19,7 +19,7 @@ export const DownsizedSchema = z.object({
1919 "size": z.string().regex(/^-?\d+$/).optional(),
2020 "url": z.string(),
2121 "width": z.string().regex(/^-?\d+$/),
22-});
22+}).strict();
2323 export type Downsized = z.infer<typeof DownsizedSchema>;
2424
2525 export const DownsizedSmallSchema = z.object({
@@ -27,7 +27,7 @@ export const DownsizedSmallSchema = z.object({
2727 "mp4": z.string(),
2828 "mp4_size": z.string().regex(/^-?\d+$/),
2929 "width": z.string().regex(/^-?\d+$/),
30-});
30+}).strict();
3131 export type DownsizedSmall = z.infer<typeof DownsizedSmallSchema>;
3232
3333 export const FixedHeightSchema = z.object({
@@ -41,13 +41,13 @@ export const FixedHeightSchema = z.object({
4141 "webp": z.string(),
4242 "webp_size": z.string().regex(/^-?\d+$/),
4343 "width": z.string().regex(/^-?\d+$/),
44-});
44+}).strict();
4545 export type FixedHeight = z.infer<typeof FixedHeightSchema>;
4646
4747 export const LoopingSchema = z.object({
4848 "mp4": z.string(),
4949 "mp4_size": z.string().regex(/^-?\d+$/),
50-});
50+}).strict();
5151 export type Looping = z.infer<typeof LoopingSchema>;
5252
5353 export const UserSchema = z.object({
@@ -57,21 +57,21 @@ export const UserSchema = z.object({
5757 "profile_url": z.string(),
5858 "twitter": z.string(),
5959 "username": z.string(),
60-});
60+}).strict();
6161 export type User = z.infer<typeof UserSchema>;
6262
6363 export const MetaSchema = z.object({
6464 "msg": z.string(),
6565 "response_id": z.string(),
6666 "status": z.number().int(),
67-});
67+}).strict();
6868 export type Meta = z.infer<typeof MetaSchema>;
6969
7070 export const PaginationSchema = z.object({
7171 "count": z.number().int(),
7272 "offset": z.number().int(),
7373 "total_count": z.number().int(),
74-});
74+}).strict();
7575 export type Pagination = z.infer<typeof PaginationSchema>;
7676
7777 export const ImagesSchema = z.object({
@@ -98,7 +98,7 @@ export const ImagesSchema = z.object({
9898 "preview": DownsizedSmallSchema,
9999 "preview_gif": DownsizedSchema,
100100 "preview_webp": DownsizedSchema,
101-});
101+}).strict();
102102 export type Images = z.infer<typeof ImagesSchema>;
103103
104104 export const DatumSchema = z.object({
@@ -120,12 +120,12 @@ export const DatumSchema = z.object({
120120 "url": z.string(),
121121 "user": UserSchema.optional(),
122122 "username": z.string(),
123-});
123+}).strict();
124124 export type Datum = z.infer<typeof DatumSchema>;
125125
126126 export const TopLevelSchema = z.object({
127127 "data": z.array(DatumSchema),
128128 "meta": MetaSchema,
129129 "pagination": PaginationSchema,
130-});
130+}).strict();
131131 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/e2915.json

1 generated file · +14 −14
Mtypescript-zoddefault / TopLevel.ts+14 −14
@@ -9,7 +9,7 @@ export type Text = z.infer<typeof TextSchema>;
99 export const AstronomySchema = z.object({
1010 "sunrise": z.string(),
1111 "sunset": z.string(),
12-});
12+}).strict();
1313 export type Astronomy = z.infer<typeof AstronomySchema>;
1414
1515 export const AtmosphereSchema = z.object({
@@ -17,7 +17,7 @@ export const AtmosphereSchema = z.object({
1717 "pressure": z.string(),
1818 "rising": z.string().regex(/^-?\d+$/),
1919 "visibility": z.string(),
20-});
20+}).strict();
2121 export type Atmosphere = z.infer<typeof AtmosphereSchema>;
2222
2323 export const ImageSchema = z.object({
@@ -26,7 +26,7 @@ export const ImageSchema = z.object({
2626 "title": z.string(),
2727 "url": z.string(),
2828 "width": z.string().regex(/^-?\d+$/),
29-});
29+}).strict();
3030 export type Image = z.infer<typeof ImageSchema>;
3131
3232 export const ConditionSchema = z.object({
@@ -34,7 +34,7 @@ export const ConditionSchema = z.object({
3434 "date": z.string(),
3535 "temp": z.string().regex(/^-?\d+$/),
3636 "text": z.string(),
37-});
37+}).strict();
3838 export type Condition = z.infer<typeof ConditionSchema>;
3939
4040 export const ForecastSchema = z.object({
@@ -44,19 +44,19 @@ export const ForecastSchema = z.object({
4444 "high": z.string().regex(/^-?\d+$/),
4545 "low": z.string().regex(/^-?\d+$/),
4646 "text": TextSchema,
47-});
47+}).strict();
4848 export type Forecast = z.infer<typeof ForecastSchema>;
4949
5050 export const GuidSchema = z.object({
5151 "isPermaLink": z.enum(["true", "false"]),
52-});
52+}).strict();
5353 export type Guid = z.infer<typeof GuidSchema>;
5454
5555 export const LocationSchema = z.object({
5656 "city": z.string(),
5757 "country": z.string(),
5858 "region": z.string(),
59-});
59+}).strict();
6060 export type Location = z.infer<typeof LocationSchema>;
6161
6262 export const UnitsSchema = z.object({
@@ -64,14 +64,14 @@ export const UnitsSchema = z.object({
6464 "pressure": z.string(),
6565 "speed": z.string(),
6666 "temperature": z.string(),
67-});
67+}).strict();
6868 export type Units = z.infer<typeof UnitsSchema>;
6969
7070 export const WindSchema = z.object({
7171 "chill": z.string().regex(/^-?\d+$/),
7272 "direction": z.string().regex(/^-?\d+$/),
7373 "speed": z.string().regex(/^-?\d+$/),
74-});
74+}).strict();
7575 export type Wind = z.infer<typeof WindSchema>;
7676
7777 export const ItemSchema = z.object({
@@ -84,7 +84,7 @@ export const ItemSchema = z.object({
8484 "long": z.string(),
8585 "pubDate": z.string(),
8686 "title": z.string(),
87-});
87+}).strict();
8888 export type Item = z.infer<typeof ItemSchema>;
8989
9090 export const ChannelSchema = z.object({
@@ -101,12 +101,12 @@ export const ChannelSchema = z.object({
101101 "ttl": z.string().regex(/^-?\d+$/),
102102 "units": UnitsSchema,
103103 "wind": WindSchema,
104-});
104+}).strict();
105105 export type Channel = z.infer<typeof ChannelSchema>;
106106
107107 export const ResultsSchema = z.object({
108108 "channel": ChannelSchema,
109-});
109+}).strict();
110110 export type Results = z.infer<typeof ResultsSchema>;
111111
112112 export const QuerySchema = z.object({
@@ -114,10 +114,10 @@ export const QuerySchema = z.object({
114114 "created": z.coerce.date(),
115115 "lang": z.string(),
116116 "results": ResultsSchema,
117-});
117+}).strict();
118118 export type Query = z.infer<typeof QuerySchema>;
119119
120120 export const TopLevelSchema = z.object({
121121 "query": QuerySchema,
122-});
122+}).strict();
123123 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/e2a58.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -4,7 +4,7 @@ import * as z from "zod";
44 export const TopLevelElementSchema = z.object({
55 "date": z.string(),
66 "stop-and-search": z.array(z.string()),
7-});
7+}).strict();
88 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
99
1010 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/misc/e324e.json

1 generated file · +13 −13
Mtypescript-zoddefault / TopLevel.ts+13 −13
@@ -9,14 +9,14 @@ export type Type = z.infer<typeof TypeSchema>;
99 export const PropertySchema = z.object({
1010 "description": z.string(),
1111 "type": TypeSchema,
12-});
12+}).strict();
1313 export type Property = z.infer<typeof PropertySchema>;
1414
1515 export const InfoSchema = z.object({
1616 "description": z.string(),
1717 "title": z.string(),
1818 "version": z.string(),
19-});
19+}).strict();
2020 export type Info = z.infer<typeof InfoSchema>;
2121
2222 export const ParameterSchema = z.object({
@@ -26,39 +26,39 @@ export const ParameterSchema = z.object({
2626 "name": z.string(),
2727 "required": z.boolean(),
2828 "type": TypeSchema,
29-});
29+}).strict();
3030 export type Parameter = z.infer<typeof ParameterSchema>;
3131
3232 export const ItemsSchema = z.object({
3333 "$ref": z.string(),
34-});
34+}).strict();
3535 export type Items = z.infer<typeof ItemsSchema>;
3636
3737 export const RateSchema = z.object({
3838 "properties": z.record(z.string(), PropertySchema),
39-});
39+}).strict();
4040 export type Rate = z.infer<typeof RateSchema>;
4141
4242 export const SchemaSchema = z.object({
4343 "items": ItemsSchema,
4444 "type": z.string(),
45-});
45+}).strict();
4646 export type Schema = z.infer<typeof SchemaSchema>;
4747
4848 export const DefinitionsSchema = z.object({
4949 "Rate": RateSchema,
50-});
50+}).strict();
5151 export type Definitions = z.infer<typeof DefinitionsSchema>;
5252
5353 export const The200Schema = z.object({
5454 "description": z.string(),
5555 "schema": SchemaSchema,
56-});
56+}).strict();
5757 export type The200 = z.infer<typeof The200Schema>;
5858
5959 export const ResponsesSchema = z.object({
6060 "200": The200Schema,
61-});
61+}).strict();
6262 export type Responses = z.infer<typeof ResponsesSchema>;
6363
6464 export const GetSchema = z.object({
@@ -67,17 +67,17 @@ export const GetSchema = z.object({
6767 "responses": ResponsesSchema,
6868 "summary": z.string(),
6969 "tags": z.array(z.string()),
70-});
70+}).strict();
7171 export type Get = z.infer<typeof GetSchema>;
7272
7373 export const TariffRatesSearchSchema = z.object({
7474 "get": GetSchema,
75-});
75+}).strict();
7676 export type TariffRatesSearch = z.infer<typeof TariffRatesSearchSchema>;
7777
7878 export const PathsSchema = z.object({
7979 "/tariff_rates/search": TariffRatesSearchSchema,
80-});
80+}).strict();
8181 export type Paths = z.infer<typeof PathsSchema>;
8282
8383 export const TopLevelSchema = z.object({
@@ -89,5 +89,5 @@ export const TopLevelSchema = z.object({
8989 "produces": z.array(z.string()),
9090 "schemes": z.array(z.string()),
9191 "swagger": z.string(),
92-});
92+}).strict();
9393 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/e53b5.json

1 generated file · +3 −3
Mtypescript-zoddefault / TopLevel.ts+3 −3
@@ -17,7 +17,7 @@ export type Value = z.infer<typeof ValueSchema>;
1717 export const CountrySchema = z.object({
1818 "id": IdSchema,
1919 "value": ValueSchema,
20-});
20+}).strict();
2121 export type Country = z.infer<typeof CountrySchema>;
2222
2323 export const FluffyTopLevelSchema = z.object({
@@ -25,7 +25,7 @@ export const FluffyTopLevelSchema = z.object({
2525 "pages": z.number().int(),
2626 "per_page": z.string().regex(/^-?\d+$/),
2727 "total": z.number().int(),
28-});
28+}).strict();
2929 export type FluffyTopLevel = z.infer<typeof FluffyTopLevelSchema>;
3030
3131 export const PurpleTopLevelSchema = z.object({
@@ -34,7 +34,7 @@ export const PurpleTopLevelSchema = z.object({
3434 "decimal": z.string().regex(/^-?\d+$/),
3535 "indicator": CountrySchema,
3636 "value": z.string().regex(/^-?\d+$/),
37-});
37+}).strict();
3838 export type PurpleTopLevel = z.infer<typeof PurpleTopLevelSchema>;
3939
4040 export const TopLevelSchema = z.array(z.union([z.array(PurpleTopLevelSchema), FluffyTopLevelSchema]));
Test case

test/inputs/json/misc/e64a0.json

1 generated file · +3 −3
Mtypescript-zoddefault / TopLevel.ts+3 −3
@@ -2,7 +2,7 @@ import * as z from "zod";
22
33
44 export const ArgsSchema = z.object({
5-});
5+}).strict();
66 export type Args = z.infer<typeof ArgsSchema>;
77
88 export const HeadersSchema = z.object({
@@ -10,7 +10,7 @@ export const HeadersSchema = z.object({
1010 "Connection": z.string(),
1111 "Host": z.string(),
1212 "User-Agent": z.string(),
13-});
13+}).strict();
1414 export type Headers = z.infer<typeof HeadersSchema>;
1515
1616 export const TopLevelSchema = z.object({
@@ -18,5 +18,5 @@ export const TopLevelSchema = z.object({
1818 "headers": HeadersSchema,
1919 "origin": z.string(),
2020 "url": z.string(),
21-});
21+}).strict();
2222 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/e8a0b.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -13,7 +13,7 @@ export const TopLevelElementSchema = z.object({
1313 "males": z.number().int(),
1414 "total": z.number().int(),
1515 "year": z.number().int(),
16-});
16+}).strict();
1717 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
1818
1919 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/misc/e8b04.json

1 generated file · +28 −28
Mtypescript-zoddefault / TopLevel.ts+28 −28
@@ -133,61 +133,61 @@ export const GrantSchema = z.object({
133133 "flags": z.array(GrantFlagSchema),
134134 "inherited": z.boolean(),
135135 "type": GrantTypeSchema,
136-});
136+}).strict();
137137 export type Grant = z.infer<typeof GrantSchema>;
138138
139139 export const TestSchema = z.object({
140140 "CFPB1": z.string(),
141-});
141+}).strict();
142142 export type Test = z.infer<typeof TestSchema>;
143143
144144 export const GroupSchema = z.object({
145145 "columnFieldName": z.string(),
146-});
146+}).strict();
147147 export type Group = z.infer<typeof GroupSchema>;
148148
149149 export const OrderSchema = z.object({
150150 "ascending": z.boolean(),
151151 "columnFieldName": OrderColumnFieldNameSchema,
152-});
152+}).strict();
153153 export type Order = z.infer<typeof OrderSchema>;
154154
155155 export const SelectSchema = z.object({
156156 "aggregate": z.string().optional(),
157157 "columnFieldName": z.string(),
158-});
158+}).strict();
159159 export type Select = z.infer<typeof SelectSchema>;
160160
161161 export const TableColumnIdSchema = z.object({
162162 "2819740": z.number().int(),
163-});
163+}).strict();
164164 export type TableColumnId = z.infer<typeof TableColumnIdSchema>;
165165
166166 export const PurpleVisibleSchema = z.object({
167167 "fatrow": z.boolean().optional(),
168168 "table": z.boolean().optional(),
169-});
169+}).strict();
170170 export type PurpleVisible = z.infer<typeof PurpleVisibleSchema>;
171171
172172 export const FieldSchema = z.object({
173173 "tableColumnId": z.number().int(),
174174 "type": FieldTypeSchema,
175-});
175+}).strict();
176176 export type Field = z.infer<typeof FieldSchema>;
177177
178178 export const StylesSchema = z.object({
179179 "width": WidthSchema,
180-});
180+}).strict();
181181 export type Styles = z.infer<typeof StylesSchema>;
182182
183183 export const AccessPointsSchema = z.object({
184184 "new_view": z.string(),
185-});
185+}).strict();
186186 export type AccessPoints = z.infer<typeof AccessPointsSchema>;
187187
188188 export const FluffyVisibleSchema = z.object({
189189 "href": z.boolean(),
190-});
190+}).strict();
191191 export type FluffyVisible = z.infer<typeof FluffyVisibleSchema>;
192192
193193 export const OwnerSchema = z.object({
@@ -201,12 +201,12 @@ export const OwnerSchema = z.object({
201201 "rights": z.array(z.string()).optional(),
202202 "roleName": RoleNameSchema.optional(),
203203 "screenName": z.string(),
204-});
204+}).strict();
205205 export type Owner = z.infer<typeof OwnerSchema>;
206206
207207 export const RatingsSchema = z.object({
208208 "rating": z.number().int(),
209-});
209+}).strict();
210210 export type Ratings = z.infer<typeof RatingsSchema>;
211211
212212 export const TableAuthorSchema = z.object({
@@ -215,12 +215,12 @@ export const TableAuthorSchema = z.object({
215215 "rights": z.array(z.string()).optional(),
216216 "roleName": RoleNameSchema.optional(),
217217 "screenName": z.string(),
218-});
218+}).strict();
219219 export type TableAuthor = z.infer<typeof TableAuthorSchema>;
220220
221221 export const CustomFieldsSchema = z.object({
222222 "TEST": TestSchema,
223-});
223+}).strict();
224224 export type CustomFields = z.infer<typeof CustomFieldsSchema>;
225225
226226 export const ChildMetadataSchema = z.object({
@@ -230,22 +230,22 @@ export const ChildMetadataSchema = z.object({
230230 "operator": MetadataOperatorSchema.optional(),
231231 "tableColumnId": TableColumnIdSchema.optional(),
232232 "unifiedVersion": z.number().int().optional(),
233-});
233+}).strict();
234234 export type ChildMetadata = z.infer<typeof ChildMetadataSchema>;
235235
236236 export const MetadataRenderTypeConfigSchema = z.object({
237237 "visible": PurpleVisibleSchema,
238-});
238+}).strict();
239239 export type MetadataRenderTypeConfig = z.infer<typeof MetadataRenderTypeConfigSchema>;
240240
241241 export const RowSchema = z.object({
242242 "fields": z.array(FieldSchema),
243-});
243+}).strict();
244244 export type Row = z.infer<typeof RowSchema>;
245245
246246 export const V1ArchivedPropertiesRenderTypeConfigSchema = z.object({
247247 "visible": FluffyVisibleSchema,
248-});
248+}).strict();
249249 export type V1ArchivedPropertiesRenderTypeConfig = z.infer<typeof V1ArchivedPropertiesRenderTypeConfigSchema>;
250250
251251 export const ChildSchema = z.object({
@@ -253,20 +253,20 @@ export const ChildSchema = z.object({
253253 "metadata": ChildMetadataSchema.optional(),
254254 "operator": ChildOperatorSchema,
255255 "value": z.string().optional(),
256-});
256+}).strict();
257257 export type Child = z.infer<typeof ChildSchema>;
258258
259259 export const ColumnSchema = z.object({
260260 "rows": z.array(RowSchema),
261261 "styles": StylesSchema,
262-});
262+}).strict();
263263 export type Column = z.infer<typeof ColumnSchema>;
264264
265265 export const V1ArchivedPropertiesSchema = z.object({
266266 "accessPoints": AccessPointsSchema,
267267 "blist_id": z.string().regex(/^-?\d+$/),
268268 "renderTypeConfig": V1ArchivedPropertiesRenderTypeConfigSchema,
269-});
269+}).strict();
270270 export type V1ArchivedProperties = z.infer<typeof V1ArchivedPropertiesSchema>;
271271
272272 export const WhereSchema = z.object({
@@ -275,12 +275,12 @@ export const WhereSchema = z.object({
275275 "metadata": ChildMetadataSchema.optional(),
276276 "operator": WhereOperatorSchema,
277277 "value": z.string().optional(),
278-});
278+}).strict();
279279 export type Where = z.infer<typeof WhereSchema>;
280280
281281 export const FatRowSchema = z.object({
282282 "columns": z.array(ColumnSchema),
283-});
283+}).strict();
284284 export type FatRow = z.infer<typeof FatRowSchema>;
285285
286286 export const JsonQuerySchema = z.object({
@@ -288,12 +288,12 @@ export const JsonQuerySchema = z.object({
288288 "order": z.array(OrderSchema).optional(),
289289 "select": z.array(SelectSchema).optional(),
290290 "where": WhereSchema.optional(),
291-});
291+}).strict();
292292 export type JsonQuery = z.infer<typeof JsonQuerySchema>;
293293
294294 export const RichRendererConfigsSchema = z.object({
295295 "fatRow": FatRowSchema,
296-});
296+}).strict();
297297 export type RichRendererConfigs = z.infer<typeof RichRendererConfigsSchema>;
298298
299299 export const TopLevelMetadataSchema = z.object({
@@ -307,7 +307,7 @@ export const TopLevelMetadataSchema = z.object({
307307 "rowIdentifier": z.string().optional(),
308308 "rowLabel": z.string().optional(),
309309 "v1_archived_properties": V1ArchivedPropertiesSchema.optional(),
310-});
310+}).strict();
311311 export type TopLevelMetadata = z.infer<typeof TopLevelMetadataSchema>;
312312
313313 export const TopLevelElementSchema = z.object({
@@ -351,7 +351,7 @@ export const TopLevelElementSchema = z.object({
351351 "viewCount": z.number().int(),
352352 "viewLastModified": z.number().int(),
353353 "viewType": ViewTypeSchema,
354-});
354+}).strict();
355355 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
356356
357357 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/misc/f22f5.json

1 generated file · +5 −5
Mtypescript-zoddefault / TopLevel.ts+5 −5
@@ -31,7 +31,7 @@ export const KindSchema = z.enum([
3131 export type Kind = z.infer<typeof KindSchema>;
3232
3333 export const MediaEmbedSchema = z.object({
34-});
34+}).strict();
3535 export type MediaEmbed = z.infer<typeof MediaEmbedSchema>;
3636
3737 export const ChildDataSchema = z.object({
@@ -95,13 +95,13 @@ export const ChildDataSchema = z.object({
9595 "user_reports": z.array(z.any()),
9696 "view_count": z.null(),
9797 "visited": z.boolean(),
98-});
98+}).strict();
9999 export type ChildData = z.infer<typeof ChildDataSchema>;
100100
101101 export const ChildSchema = z.object({
102102 "data": ChildDataSchema,
103103 "kind": KindSchema,
104-});
104+}).strict();
105105 export type Child = z.infer<typeof ChildSchema>;
106106
107107 export const TopLevelDataSchema = z.object({
@@ -109,11 +109,11 @@ export const TopLevelDataSchema = z.object({
109109 "before": z.null(),
110110 "children": z.array(ChildSchema),
111111 "modhash": z.string(),
112-});
112+}).strict();
113113 export type TopLevelData = z.infer<typeof TopLevelDataSchema>;
114114
115115 export const TopLevelSchema = z.object({
116116 "data": TopLevelDataSchema,
117117 "kind": z.string(),
118-});
118+}).strict();
119119 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/f3139.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -4,7 +4,7 @@ import * as z from "zod";
44 export const TopLevelElementSchema = z.object({
55 "id": z.string(),
66 "name": z.string(),
7-});
7+}).strict();
88 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
99
1010 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/misc/f3edf.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -13,7 +13,7 @@ export const TopLevelElementSchema = z.object({
1313 "males": z.number().int(),
1414 "total": z.number().int(),
1515 "year": z.number().int(),
16-});
16+}).strict();
1717 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
1818
1919 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/misc/f466a.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -13,7 +13,7 @@ export const TopLevelElementSchema = z.object({
1313 "males": z.number().int(),
1414 "total": z.number().int(),
1515 "year": z.number().int(),
16-});
16+}).strict();
1717 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
1818
1919 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/misc/f6a65.json

1 generated file · +10 −10
Mtypescript-zoddefault / TopLevel.ts+10 −10
@@ -29,7 +29,7 @@ export const The480_WStillSchema = z.object({
2929 "size": z.string().regex(/^-?\d+$/).optional(),
3030 "url": z.string(),
3131 "width": z.string().regex(/^-?\d+$/),
32-});
32+}).strict();
3333 export type The480_WStill = z.infer<typeof The480_WStillSchema>;
3434
3535 export const DownsizedSmallSchema = z.object({
@@ -37,7 +37,7 @@ export const DownsizedSmallSchema = z.object({
3737 "mp4": z.string(),
3838 "mp4_size": z.string().regex(/^-?\d+$/),
3939 "width": z.string().regex(/^-?\d+$/),
40-});
40+}).strict();
4141 export type DownsizedSmall = z.infer<typeof DownsizedSmallSchema>;
4242
4343 export const FixedHeightSchema = z.object({
@@ -51,13 +51,13 @@ export const FixedHeightSchema = z.object({
5151 "webp": z.string(),
5252 "webp_size": z.string().regex(/^-?\d+$/),
5353 "width": z.string().regex(/^-?\d+$/),
54-});
54+}).strict();
5555 export type FixedHeight = z.infer<typeof FixedHeightSchema>;
5656
5757 export const LoopingSchema = z.object({
5858 "mp4": z.string(),
5959 "mp4_size": z.string().regex(/^-?\d+$/),
60-});
60+}).strict();
6161 export type Looping = z.infer<typeof LoopingSchema>;
6262
6363 export const UserSchema = z.object({
@@ -67,21 +67,21 @@ export const UserSchema = z.object({
6767 "profile_url": z.string(),
6868 "twitter": z.string(),
6969 "username": UsernameSchema,
70-});
70+}).strict();
7171 export type User = z.infer<typeof UserSchema>;
7272
7373 export const MetaSchema = z.object({
7474 "msg": z.string(),
7575 "response_id": z.string(),
7676 "status": z.number().int(),
77-});
77+}).strict();
7878 export type Meta = z.infer<typeof MetaSchema>;
7979
8080 export const PaginationSchema = z.object({
8181 "count": z.number().int(),
8282 "offset": z.number().int(),
8383 "total_count": z.number().int(),
84-});
84+}).strict();
8585 export type Pagination = z.infer<typeof PaginationSchema>;
8686
8787 export const ImagesSchema = z.object({
@@ -108,7 +108,7 @@ export const ImagesSchema = z.object({
108108 "preview_gif": The480_WStillSchema,
109109 "preview_webp": The480_WStillSchema,
110110 "480w_still": The480_WStillSchema.optional(),
111-});
111+}).strict();
112112 export type Images = z.infer<typeof ImagesSchema>;
113113
114114 export const DatumSchema = z.object({
@@ -130,12 +130,12 @@ export const DatumSchema = z.object({
130130 "url": z.string(),
131131 "user": UserSchema.optional(),
132132 "username": UsernameSchema,
133-});
133+}).strict();
134134 export type Datum = z.infer<typeof DatumSchema>;
135135
136136 export const TopLevelSchema = z.object({
137137 "data": z.array(DatumSchema),
138138 "meta": MetaSchema,
139139 "pagination": PaginationSchema,
140-});
140+}).strict();
141141 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/f74d5.json

1 generated file · +13 −13
Mtypescript-zoddefault / TopLevel.ts+13 −13
@@ -11,35 +11,35 @@ export type TypeName = z.infer<typeof TypeNameSchema>;
1111 export const TopSchema = z.object({
1212 "count": z.number().int(),
1313 "item": z.string(),
14-});
14+}).strict();
1515 export type Top = z.infer<typeof TopSchema>;
1616
1717 export const QuerySchema = z.object({
18-});
18+}).strict();
1919 export type Query = z.infer<typeof QuerySchema>;
2020
2121 export const GrantSchema = z.object({
2222 "flags": z.array(z.string()),
2323 "inherited": z.boolean(),
2424 "type": z.string(),
25-});
25+}).strict();
2626 export type Grant = z.infer<typeof GrantSchema>;
2727
2828 export const LicenseSchema = z.object({
2929 "name": z.string(),
30-});
30+}).strict();
3131 export type License = z.infer<typeof LicenseSchema>;
3232
3333 export const VisibleSchema = z.object({
3434 "table": z.boolean(),
35-});
35+}).strict();
3636 export type Visible = z.infer<typeof VisibleSchema>;
3737
3838 export const OwnerSchema = z.object({
3939 "displayName": z.string(),
4040 "id": z.string(),
4141 "screenName": z.string(),
42-});
42+}).strict();
4343 export type Owner = z.infer<typeof OwnerSchema>;
4444
4545 export const CachedContentsSchema = z.object({
@@ -50,12 +50,12 @@ export const CachedContentsSchema = z.object({
5050 "smallest": z.string(),
5151 "sum": z.string().regex(/^-?\d+$/).optional(),
5252 "top": z.array(TopSchema),
53-});
53+}).strict();
5454 export type CachedContents = z.infer<typeof CachedContentsSchema>;
5555
5656 export const RenderTypeConfigSchema = z.object({
5757 "visible": VisibleSchema,
58-});
58+}).strict();
5959 export type RenderTypeConfig = z.infer<typeof RenderTypeConfigSchema>;
6060
6161 export const ColumnSchema = z.object({
@@ -70,7 +70,7 @@ export const ColumnSchema = z.object({
7070 "renderTypeName": TypeNameSchema,
7171 "tableColumnId": z.number().int().optional(),
7272 "width": z.number().int().optional(),
73-});
73+}).strict();
7474 export type Column = z.infer<typeof ColumnSchema>;
7575
7676 export const MetadataSchema = z.object({
@@ -79,7 +79,7 @@ export const MetadataSchema = z.object({
7979 "rdfSubject": z.string().regex(/^-?\d+$/),
8080 "renderTypeConfig": RenderTypeConfigSchema,
8181 "rowIdentifier": z.string().regex(/^-?\d+$/),
82-});
82+}).strict();
8383 export type Metadata = z.infer<typeof MetadataSchema>;
8484
8585 export const ViewSchema = z.object({
@@ -120,16 +120,16 @@ export const ViewSchema = z.object({
120120 "viewCount": z.number().int(),
121121 "viewLastModified": z.number().int(),
122122 "viewType": z.string(),
123-});
123+}).strict();
124124 export type View = z.infer<typeof ViewSchema>;
125125
126126 export const MetaSchema = z.object({
127127 "view": ViewSchema,
128-});
128+}).strict();
129129 export type Meta = z.infer<typeof MetaSchema>;
130130
131131 export const TopLevelSchema = z.object({
132132 "data": z.array(z.array(z.union([z.number().int(), z.string()]))),
133133 "meta": MetaSchema,
134-});
134+}).strict();
135135 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/f82d9.json

1 generated file · +14 −14
Mtypescript-zoddefault / TopLevel.ts+14 −14
@@ -9,14 +9,14 @@ export type Type = z.infer<typeof TypeSchema>;
99 export const ClickUrlSchema = z.object({
1010 "description": z.string(),
1111 "type": TypeSchema,
12-});
12+}).strict();
1313 export type ClickUrl = z.infer<typeof ClickUrlSchema>;
1414
1515 export const InfoSchema = z.object({
1616 "description": z.string(),
1717 "title": z.string(),
1818 "version": z.string(),
19-});
19+}).strict();
2020 export type Info = z.infer<typeof InfoSchema>;
2121
2222 export const ParameterSchema = z.object({
@@ -26,12 +26,12 @@ export const ParameterSchema = z.object({
2626 "name": z.string(),
2727 "required": z.boolean(),
2828 "type": TypeSchema,
29-});
29+}).strict();
3030 export type Parameter = z.infer<typeof ParameterSchema>;
3131
3232 export const ItemsSchema = z.object({
3333 "$ref": z.string(),
34-});
34+}).strict();
3535 export type Items = z.infer<typeof ItemsSchema>;
3636
3737 export const PropertiesSchema = z.object({
@@ -45,34 +45,34 @@ export const PropertiesSchema = z.object({
4545 "source_industry": ClickUrlSchema,
4646 "title": ClickUrlSchema,
4747 "url": ClickUrlSchema,
48-});
48+}).strict();
4949 export type Properties = z.infer<typeof PropertiesSchema>;
5050
5151 export const SchemaSchema = z.object({
5252 "items": ItemsSchema,
5353 "type": z.string(),
54-});
54+}).strict();
5555 export type Schema = z.infer<typeof SchemaSchema>;
5656
5757 export const ReportSchema = z.object({
5858 "properties": PropertiesSchema,
59-});
59+}).strict();
6060 export type Report = z.infer<typeof ReportSchema>;
6161
6262 export const The200Schema = z.object({
6363 "description": z.string(),
6464 "schema": SchemaSchema,
65-});
65+}).strict();
6666 export type The200 = z.infer<typeof The200Schema>;
6767
6868 export const DefinitionsSchema = z.object({
6969 "Report": ReportSchema,
70-});
70+}).strict();
7171 export type Definitions = z.infer<typeof DefinitionsSchema>;
7272
7373 export const ResponsesSchema = z.object({
7474 "200": The200Schema,
75-});
75+}).strict();
7676 export type Responses = z.infer<typeof ResponsesSchema>;
7777
7878 export const GetSchema = z.object({
@@ -81,17 +81,17 @@ export const GetSchema = z.object({
8181 "responses": ResponsesSchema,
8282 "summary": z.string(),
8383 "tags": z.array(z.string()),
84-});
84+}).strict();
8585 export type Get = z.infer<typeof GetSchema>;
8686
8787 export const MarketResearchLibrarySearchSchema = z.object({
8888 "get": GetSchema,
89-});
89+}).strict();
9090 export type MarketResearchLibrarySearch = z.infer<typeof MarketResearchLibrarySearchSchema>;
9191
9292 export const PathsSchema = z.object({
9393 "/market_research_library/search": MarketResearchLibrarySearchSchema,
94-});
94+}).strict();
9595 export type Paths = z.infer<typeof PathsSchema>;
9696
9797 export const TopLevelSchema = z.object({
@@ -103,5 +103,5 @@ export const TopLevelSchema = z.object({
103103 "produces": z.array(z.string()),
104104 "schemes": z.array(z.string()),
105105 "swagger": z.string(),
106-});
106+}).strict();
107107 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/f974d.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -7,5 +7,5 @@ export const TopLevelSchema = z.object({
77 "height": z.number().int(),
88 "time": z.number().int(),
99 "txIndexes": z.array(z.number().int()),
10-});
10+}).strict();
1111 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/faff5.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -4,10 +4,10 @@ import * as z from "zod";
44 export const ResponseSchema = z.object({
55 "player_count": z.number().int(),
66 "result": z.number().int(),
7-});
7+}).strict();
88 export type Response = z.infer<typeof ResponseSchema>;
99
1010 export const TopLevelSchema = z.object({
1111 "response": ResponseSchema,
12-});
12+}).strict();
1313 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/fcca3.json

1 generated file · +28 −28
Mtypescript-zoddefault / TopLevel.ts+28 −28
@@ -11,21 +11,21 @@ export type TypeName = z.infer<typeof TypeNameSchema>;
1111 export const TopSchema = z.object({
1212 "count": z.number().int(),
1313 "item": z.string(),
14-});
14+}).strict();
1515 export type Top = z.infer<typeof TopSchema>;
1616
1717 export const FormatSchema = z.object({
1818 "align": z.string().optional(),
1919 "noCommas": z.enum(["true", "false"]).optional(),
2020 "precisionStyle": z.string().optional(),
21-});
21+}).strict();
2222 export type Format = z.infer<typeof FormatSchema>;
2323
2424 export const GrantSchema = z.object({
2525 "flags": z.array(z.string()),
2626 "inherited": z.boolean(),
2727 "type": z.string(),
28-});
28+}).strict();
2929 export type Grant = z.infer<typeof GrantSchema>;
3030
3131 export const AttachmentSchema = z.object({
@@ -33,19 +33,19 @@ export const AttachmentSchema = z.object({
3333 "blobId": z.string(),
3434 "filename": z.string(),
3535 "name": z.string(),
36-});
36+}).strict();
3737 export type Attachment = z.infer<typeof AttachmentSchema>;
3838
3939 export const CommonCoreSchema = z.object({
4040 "Contact Email": z.string(),
4141 "Contact Name": z.string(),
4242 "Publisher": z.string(),
43-});
43+}).strict();
4444 export type CommonCore = z.infer<typeof CommonCoreSchema>;
4545
4646 export const DatasetInformationSchema = z.object({
4747 "Agency": z.string(),
48-});
48+}).strict();
4949 export type DatasetInformation = z.infer<typeof DatasetInformationSchema>;
5050
5151 export const DatasetSummarySchema = z.object({
@@ -55,35 +55,35 @@ export const DatasetSummarySchema = z.object({
5555 "Organization": z.string(),
5656 "Posting Frequency": z.string(),
5757 "Time Period": z.string(),
58-});
58+}).strict();
5959 export type DatasetSummary = z.infer<typeof DatasetSummarySchema>;
6060
6161 export const DisclaimersSchema = z.object({
6262 "Disclaimer": z.string(),
6363 "Limitations": z.string(),
64-});
64+}).strict();
6565 export type Disclaimers = z.infer<typeof DisclaimersSchema>;
6666
6767 export const TableColumnIdSchema = z.object({
6868 "703610": z.number().int(),
69-});
69+}).strict();
7070 export type TableColumnId = z.infer<typeof TableColumnIdSchema>;
7171
7272 export const FilterConditionMetadataSchema = z.object({
7373 "advanced": z.boolean(),
7474 "unifiedVersion": z.number().int(),
75-});
75+}).strict();
7676 export type FilterConditionMetadata = z.infer<typeof FilterConditionMetadataSchema>;
7777
7878 export const OrderSchema = z.object({
7979 "ascending": z.boolean(),
8080 "columnFieldName": z.string(),
81-});
81+}).strict();
8282 export type Order = z.infer<typeof OrderSchema>;
8383
8484 export const VisibleSchema = z.object({
8585 "table": z.boolean(),
86-});
86+}).strict();
8787 export type Visible = z.infer<typeof VisibleSchema>;
8888
8989 export const OwnerSchema = z.object({
@@ -95,13 +95,13 @@ export const OwnerSchema = z.object({
9595 "rights": z.array(z.string()),
9696 "roleName": z.string(),
9797 "screenName": z.string(),
98-});
98+}).strict();
9999 export type Owner = z.infer<typeof OwnerSchema>;
100100
101101 export const ExpressionSchema = z.object({
102102 "columnId": z.number().int(),
103103 "type": z.string(),
104-});
104+}).strict();
105105 export type Expression = z.infer<typeof ExpressionSchema>;
106106
107107 export const CachedContentsSchema = z.object({
@@ -112,7 +112,7 @@ export const CachedContentsSchema = z.object({
112112 "smallest": z.string(),
113113 "sum": z.string().regex(/^-?\d+$/).optional(),
114114 "top": z.array(TopSchema),
115-});
115+}).strict();
116116 export type CachedContents = z.infer<typeof CachedContentsSchema>;
117117
118118 export const CustomFieldsSchema = z.object({
@@ -120,30 +120,30 @@ export const CustomFieldsSchema = z.object({
120120 "Dataset Information": DatasetInformationSchema,
121121 "Dataset Summary": DatasetSummarySchema,
122122 "Disclaimers": DisclaimersSchema,
123-});
123+}).strict();
124124 export type CustomFields = z.infer<typeof CustomFieldsSchema>;
125125
126126 export const ChildMetadataSchema = z.object({
127127 "customValues": z.array(z.array(z.string())),
128128 "operator": z.string(),
129129 "tableColumnId": TableColumnIdSchema,
130-});
130+}).strict();
131131 export type ChildMetadata = z.infer<typeof ChildMetadataSchema>;
132132
133133 export const JsonQuerySchema = z.object({
134134 "order": z.array(OrderSchema),
135-});
135+}).strict();
136136 export type JsonQuery = z.infer<typeof JsonQuerySchema>;
137137
138138 export const RenderTypeConfigSchema = z.object({
139139 "visible": VisibleSchema,
140-});
140+}).strict();
141141 export type RenderTypeConfig = z.infer<typeof RenderTypeConfigSchema>;
142142
143143 export const OrderBySchema = z.object({
144144 "ascending": z.boolean(),
145145 "expression": ExpressionSchema,
146-});
146+}).strict();
147147 export type OrderBy = z.infer<typeof OrderBySchema>;
148148
149149 export const ColumnSchema = z.object({
@@ -159,19 +159,19 @@ export const ColumnSchema = z.object({
159159 "renderTypeName": TypeNameSchema,
160160 "tableColumnId": z.number().int().optional(),
161161 "width": z.number().int().optional(),
162-});
162+}).strict();
163163 export type Column = z.infer<typeof ColumnSchema>;
164164
165165 export const ChildSchema = z.object({
166166 "metadata": ChildMetadataSchema,
167167 "type": z.string(),
168168 "value": z.string(),
169-});
169+}).strict();
170170 export type Child = z.infer<typeof ChildSchema>;
171171
172172 export const QuerySchema = z.object({
173173 "orderBys": z.array(OrderBySchema),
174-});
174+}).strict();
175175 export type Query = z.infer<typeof QuerySchema>;
176176
177177 export const FilterConditionSchema = z.object({
@@ -179,7 +179,7 @@ export const FilterConditionSchema = z.object({
179179 "metadata": FilterConditionMetadataSchema,
180180 "type": z.string(),
181181 "value": z.string(),
182-});
182+}).strict();
183183 export type FilterCondition = z.infer<typeof FilterConditionSchema>;
184184
185185 export const ViewMetadataSchema = z.object({
@@ -191,7 +191,7 @@ export const ViewMetadataSchema = z.object({
191191 "rdfSubject": z.string().regex(/^-?\d+$/),
192192 "renderTypeConfig": RenderTypeConfigSchema,
193193 "rowLabel": z.string(),
194-});
194+}).strict();
195195 export type ViewMetadata = z.infer<typeof ViewMetadataSchema>;
196196
197197 export const ViewSchema = z.object({
@@ -232,16 +232,16 @@ export const ViewSchema = z.object({
232232 "viewCount": z.number().int(),
233233 "viewLastModified": z.number().int(),
234234 "viewType": z.string(),
235-});
235+}).strict();
236236 export type View = z.infer<typeof ViewSchema>;
237237
238238 export const MetaSchema = z.object({
239239 "view": ViewSchema,
240-});
240+}).strict();
241241 export type Meta = z.infer<typeof MetaSchema>;
242242
243243 export const TopLevelSchema = z.object({
244244 "data": z.array(z.array(z.union([z.null(), z.number().int(), z.string()]))),
245245 "meta": MetaSchema,
246-});
246+}).strict();
247247 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/misc/fd329.json

1 generated file · +3 −3
Mtypescript-zoddefault / TopLevel.ts+3 −3
@@ -4,7 +4,7 @@ import * as z from "zod";
44 export const DatumSchema = z.object({
55 "anomaly": z.string(),
66 "value": z.string(),
7-});
7+}).strict();
88 export type Datum = z.infer<typeof DatumSchema>;
99
1010 export const DescriptionSchema = z.object({
@@ -12,11 +12,11 @@ export const DescriptionSchema = z.object({
1212 "missing": z.number().int(),
1313 "title": z.string(),
1414 "units": z.string(),
15-});
15+}).strict();
1616 export type Description = z.infer<typeof DescriptionSchema>;
1717
1818 export const TopLevelSchema = z.object({
1919 "data": z.record(z.string(), DatumSchema),
2020 "description": DescriptionSchema,
21-});
21+}).strict();
2222 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/priority/blns-object.json

1 generated file · +4 −4
Mtypescript-zoddefault / TopLevel.ts+4 −4
@@ -232,7 +232,7 @@ export const ASchema = z.object({
232232 "和製漢語": z.string(),
233233 "田中さんにあげて下さい": z.string(),
234234 "`ィ(´∀`∩": z.string(),
235-});
235+}).strict();
236236 export type A = z.infer<typeof ASchema>;
237237
238238 export const BSchema = z.object({
@@ -395,7 +395,7 @@ export const BSchema = z.object({
395395 "찦차를 타고 온 펲시맨과 쑛다리 똠방각하": z.string(),
396396 "ﷺ": z.string(),
397397 "__ロ(,_,*)": z.string(),
398-});
398+}).strict();
399399 export type B = z.infer<typeof BSchema>;
400400
401401 export const CSchema = z.object({
@@ -594,12 +594,12 @@ export const CSchema = z.object({
594594 "울란바토르": z.string(),
595595 "The quick brown fox jumps over the lazy dog": z.string(),
596596 "(ノಥ益ಥ)ノ\ufeff ┻━┻": z.string(),
597-});
597+}).strict();
598598 export type C = z.infer<typeof CSchema>;
599599
600600 export const TopLevelSchema = z.object({
601601 "a": ASchema,
602602 "b": BSchema,
603603 "c": CSchema,
604-});
604+}).strict();
605605 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/priority/bug2037.json

1 generated file · +4 −4
Mtypescript-zoddefault / TopLevel.ts+4 −4
@@ -2,20 +2,20 @@ import * as z from "zod";
22
33
44 export const RewardSchema = z.object({
5-});
5+}).strict();
66 export type Reward = z.infer<typeof RewardSchema>;
77
88 export const ObjectiveSchema = z.object({
99 "rewards": z.record(z.string(), RewardSchema),
10-});
10+}).strict();
1111 export type Objective = z.infer<typeof ObjectiveSchema>;
1212
1313 export const MissionSpecSchema = z.object({
1414 "objectives": z.record(z.string(), ObjectiveSchema),
15-});
15+}).strict();
1616 export type MissionSpec = z.infer<typeof MissionSpecSchema>;
1717
1818 export const TopLevelSchema = z.object({
1919 "mission_specs": z.record(z.string(), MissionSpecSchema),
20-});
20+}).strict();
2121 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/priority/bug2521.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -4,10 +4,10 @@ import * as z from "zod";
44 export const OptionSchema = z.object({
55 "foo": z.string().optional(),
66 "name": z.string(),
7-});
7+}).strict();
88 export type Option = z.infer<typeof OptionSchema>;
99
1010 export const TopLevelSchema = z.object({
1111 "options": z.array(OptionSchema),
12-});
12+}).strict();
1313 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/priority/bug2590.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -5,10 +5,10 @@ export const InvoiceSchema = z.object({
55 "createdAt": z.union([z.null(), z.coerce.date()]),
66 "dueDate": z.union([z.null(), z.string()]),
77 "name": z.string(),
8-});
8+}).strict();
99 export type Invoice = z.infer<typeof InvoiceSchema>;
1010
1111 export const TopLevelSchema = z.object({
1212 "invoices": z.array(InvoiceSchema),
13-});
13+}).strict();
1414 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/priority/bug2663.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -5,5 +5,5 @@ export const TopLevelSchema = z.object({
55 "birthday": z.string(),
66 "lastSeen": z.coerce.date(),
77 "name": z.string(),
8-});
8+}).strict();
99 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/priority/bug2793.json

1 generated file · +3 −3
Mtypescript-zoddefault / TopLevel.ts+3 −3
@@ -2,17 +2,17 @@ import * as z from "zod";
22
33
44 export const HintsSchema = z.object({
5-});
5+}).strict();
66 export type Hints = z.infer<typeof HintsSchema>;
77
88 export const LabelsSchema = z.object({
99 "AccountNumber": z.string(),
1010 "Title": z.string(),
11-});
11+}).strict();
1212 export type Labels = z.infer<typeof LabelsSchema>;
1313
1414 export const TopLevelSchema = z.object({
1515 "Hints": HintsSchema,
1616 "Labels": LabelsSchema,
17-});
17+}).strict();
1818 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/priority/bug427.json

1 generated file · +61 −61
Mtypescript-zoddefault / TopLevel.ts+61 −61
@@ -103,7 +103,7 @@ export const GetSignatureTypeSchema: z.ZodType<GetSignatureType> = z.lazy(() =>
103103 "elementType": ElementTypeSchema.optional(),
104104 "name": NameSchema.optional(),
105105 "type": TypeEnumSchema,
106- })
106+ }).strict()
107107 );
108108
109109 export type IndexSignatureElement = {
@@ -124,7 +124,7 @@ export const IndexSignatureElementSchema: z.ZodType<IndexSignatureElement> = z.l
124124 "name": z.string(),
125125 "parameters": z.array(GetSignatureSchema).optional(),
126126 "type": PurpleTypeSchema,
127- })
127+ }).strict()
128128 );
129129
130130 export type PurpleType = {
@@ -137,7 +137,7 @@ export const PurpleTypeSchema: z.ZodType<PurpleType> = z.lazy(() =>
137137 "declaration": GetSignatureSchema.optional(),
138138 "name": NameSchema.optional(),
139139 "type": TypeEnumSchema,
140- })
140+ }).strict()
141141 );
142142
143143 export type GetSignatureChild = {
@@ -160,7 +160,7 @@ export const GetSignatureChildSchema: z.ZodType<GetSignatureChild> = z.lazy(() =
160160 "name": z.string(),
161161 "sources": z.array(SourceSchema),
162162 "type": PurpleTypeSchema,
163- })
163+ }).strict()
164164 );
165165
166166 export type GetSignature = {
@@ -195,7 +195,7 @@ export const GetSignatureSchema: z.ZodType<GetSignature> = z.lazy(() =>
195195 "sources": z.array(SourceSchema).optional(),
196196 "type": GetSignatureTypeSchema.optional(),
197197 "typeParameter": z.array(GetSignatureSchema).optional(),
198- })
198+ }).strict()
199199 );
200200
201201 export type ExtendedBy = {
@@ -212,70 +212,70 @@ export const ExtendedBySchema: z.ZodType<ExtendedBy> = z.lazy(() =>
212212 "name": z.string(),
213213 "type": TypeEnumSchema,
214214 "typeArguments": z.array(ExtendedBySchema).optional(),
215- })
215+ }).strict()
216216 );
217217
218218 export const PurpleCommentSchema = z.object({
219219 "shortText": z.string(),
220-});
220+}).strict();
221221 export type PurpleComment = z.infer<typeof PurpleCommentSchema>;
222222
223223 export const PurpleFlagsSchema = z.object({
224224 "isExported": z.boolean().optional(),
225-});
225+}).strict();
226226 export type PurpleFlags = z.infer<typeof PurpleFlagsSchema>;
227227
228228 export const GetSignatureFlagsSchema = z.object({
229-});
229+}).strict();
230230 export type GetSignatureFlags = z.infer<typeof GetSignatureFlagsSchema>;
231231
232232 export const ElementTypeSchema = z.object({
233233 "name": NameSchema,
234234 "type": TypeEnumSchema,
235-});
235+}).strict();
236236 export type ElementType = z.infer<typeof ElementTypeSchema>;
237237
238238 export const FluffyCommentSchema = z.object({
239239 "text": z.string(),
240-});
240+}).strict();
241241 export type FluffyComment = z.infer<typeof FluffyCommentSchema>;
242242
243243 export const FluffyFlagsSchema = z.object({
244244 "isOptional": z.boolean().optional(),
245-});
245+}).strict();
246246 export type FluffyFlags = z.infer<typeof FluffyFlagsSchema>;
247247
248248 export const SourceSchema = z.object({
249249 "character": z.number().int(),
250250 "fileName": FileNameSchema,
251251 "line": z.number().int(),
252-});
252+}).strict();
253253 export type Source = z.infer<typeof SourceSchema>;
254254
255255 export const GetSignatureCommentSchema = z.object({
256256 "returns": z.string().optional(),
257257 "shortText": z.string().optional(),
258258 "text": z.string().optional(),
259-});
259+}).strict();
260260 export type GetSignatureComment = z.infer<typeof GetSignatureCommentSchema>;
261261
262262 export const GroupSchema = z.object({
263263 "children": z.array(z.number().int()),
264264 "kind": z.number().int(),
265265 "title": z.string(),
266-});
266+}).strict();
267267 export type Group = z.infer<typeof GroupSchema>;
268268
269269 export const TentacledCommentSchema = z.object({
270270 "shortText": z.string().optional(),
271271 "text": z.string().optional(),
272-});
272+}).strict();
273273 export type TentacledComment = z.infer<typeof TentacledCommentSchema>;
274274
275275 export const TentacledFlagsSchema = z.object({
276276 "isOptional": z.boolean().optional(),
277277 "isRest": z.boolean().optional(),
278-});
278+}).strict();
279279 export type TentacledFlags = z.infer<typeof TentacledFlagsSchema>;
280280
281281 export const FluffyTypeSchema = z.object({
@@ -283,7 +283,7 @@ export const FluffyTypeSchema = z.object({
283283 "name": NameSchema.optional(),
284284 "type": TypeEnumSchema,
285285 "typeArguments": z.array(ElementTypeSchema).optional(),
286-});
286+}).strict();
287287 export type FluffyType = z.infer<typeof FluffyTypeSchema>;
288288
289289 export const PurpleDeclarationSchema = z.object({
@@ -294,7 +294,7 @@ export const PurpleDeclarationSchema = z.object({
294294 "kind": z.number().int(),
295295 "kindString": z.string(),
296296 "name": z.string(),
297-});
297+}).strict();
298298 export type PurpleDeclaration = z.infer<typeof PurpleDeclarationSchema>;
299299
300300 export const TypeElementSchema = z.object({
@@ -303,13 +303,13 @@ export const TypeElementSchema = z.object({
303303 "name": NameSchema.optional(),
304304 "type": TypeEnumSchema,
305305 "typeArguments": z.array(ElementTypeSchema).optional(),
306-});
306+}).strict();
307307 export type TypeElement = z.infer<typeof TypeElementSchema>;
308308
309309 export const TagSchema = z.object({
310310 "tag": z.string(),
311311 "text": z.string(),
312-});
312+}).strict();
313313 export type Tag = z.infer<typeof TagSchema>;
314314
315315 export const StickyFlagsSchema = z.object({
@@ -320,13 +320,13 @@ export const StickyFlagsSchema = z.object({
320320 "isProtected": z.boolean().optional(),
321321 "isPublic": z.boolean().optional(),
322322 "isStatic": z.boolean().optional(),
323-});
323+}).strict();
324324 export type StickyFlags = z.infer<typeof StickyFlagsSchema>;
325325
326326 export const IndigoFlagsSchema = z.object({
327327 "isPrivate": z.boolean().optional(),
328328 "isProtected": z.boolean().optional(),
329-});
329+}).strict();
330330 export type IndigoFlags = z.infer<typeof IndigoFlagsSchema>;
331331
332332 export const StickyTypeSchema = z.object({
@@ -338,7 +338,7 @@ export const StickyTypeSchema = z.object({
338338 "name": z.string().optional(),
339339 "type": TypeEnumSchema,
340340 "typeArguments": z.array(ElementTypeSchema).optional(),
341-});
341+}).strict();
342342 export type StickyType = z.infer<typeof StickyTypeSchema>;
343343
344344 export const IndecentTypeSchema = z.object({
@@ -346,19 +346,19 @@ export const IndecentTypeSchema = z.object({
346346 "elements": z.array(ElementTypeSchema).optional(),
347347 "name": NameSchema.optional(),
348348 "type": TypeEnumSchema,
349-});
349+}).strict();
350350 export type IndecentType = z.infer<typeof IndecentTypeSchema>;
351351
352352 export const HilariousTypeSchema = z.object({
353353 "declaration": GetSignatureSchema,
354354 "type": TypeEnumSchema,
355-});
355+}).strict();
356356 export type HilariousType = z.infer<typeof HilariousTypeSchema>;
357357
358358 export const IndigoCommentSchema = z.object({
359359 "returns": z.string(),
360360 "shortText": z.string(),
361-});
361+}).strict();
362362 export type IndigoComment = z.infer<typeof IndigoCommentSchema>;
363363
364364 export const FluffyParameterSchema = z.object({
@@ -370,14 +370,14 @@ export const FluffyParameterSchema = z.object({
370370 "name": z.string(),
371371 "sources": z.array(SourceSchema).optional(),
372372 "type": ElementTypeSchema,
373-});
373+}).strict();
374374 export type FluffyParameter = z.infer<typeof FluffyParameterSchema>;
375375
376376 export const PurpleTypeArgumentSchema = z.object({
377377 "operator": z.string(),
378378 "target": ElementTypeSchema,
379379 "type": z.string(),
380-});
380+}).strict();
381381 export type PurpleTypeArgument = z.infer<typeof PurpleTypeArgumentSchema>;
382382
383383 export const IndecentFlagsSchema = z.object({
@@ -388,7 +388,7 @@ export const IndecentFlagsSchema = z.object({
388388 "isLet": z.boolean().optional(),
389389 "isPrivate": z.boolean().optional(),
390390 "isProtected": z.boolean().optional(),
391-});
391+}).strict();
392392 export type IndecentFlags = z.infer<typeof IndecentFlagsSchema>;
393393
394394 export const IndigoChildSchema = z.object({
@@ -401,7 +401,7 @@ export const IndigoChildSchema = z.object({
401401 "name": z.string(),
402402 "sources": z.array(SourceSchema),
403403 "type": IndecentTypeSchema,
404-});
404+}).strict();
405405 export type IndigoChild = z.infer<typeof IndigoChildSchema>;
406406
407407 export const CunningTypeSchema = z.object({
@@ -410,7 +410,7 @@ export const CunningTypeSchema = z.object({
410410 "name": NameSchema.optional(),
411411 "type": TypeEnumSchema,
412412 "typeArguments": z.array(ElementTypeSchema).optional(),
413-});
413+}).strict();
414414 export type CunningType = z.infer<typeof CunningTypeSchema>;
415415
416416 export const IndigoDeclarationSchema = z.object({
@@ -423,13 +423,13 @@ export const IndigoDeclarationSchema = z.object({
423423 "name": z.string(),
424424 "signatures": z.array(GetSignatureSchema).optional(),
425425 "sources": z.array(SourceSchema),
426-});
426+}).strict();
427427 export type IndigoDeclaration = z.infer<typeof IndigoDeclarationSchema>;
428428
429429 export const FluffyTypeArgumentSchema = z.object({
430430 "type": TypeEnumSchema,
431431 "types": z.array(ElementTypeSchema),
432-});
432+}).strict();
433433 export type FluffyTypeArgument = z.infer<typeof FluffyTypeArgumentSchema>;
434434
435435 export const MischievousTypeSchema = z.object({
@@ -438,13 +438,13 @@ export const MischievousTypeSchema = z.object({
438438 "operator": z.string().optional(),
439439 "target": ElementTypeSchema.optional(),
440440 "type": z.string(),
441-});
441+}).strict();
442442 export type MischievousType = z.infer<typeof MischievousTypeSchema>;
443443
444444 export const IndecentCommentSchema = z.object({
445445 "shortText": z.string(),
446446 "tags": z.array(TagSchema).optional(),
447-});
447+}).strict();
448448 export type IndecentComment = z.infer<typeof IndecentCommentSchema>;
449449
450450 export const GetSignatureParameterSchema = z.object({
@@ -455,14 +455,14 @@ export const GetSignatureParameterSchema = z.object({
455455 "kindString": ParameterKindStringSchema,
456456 "name": z.string(),
457457 "type": FluffyTypeSchema,
458-});
458+}).strict();
459459 export type GetSignatureParameter = z.infer<typeof GetSignatureParameterSchema>;
460460
461461 export const TentacledTypeSchema = z.object({
462462 "declaration": PurpleDeclarationSchema.optional(),
463463 "name": NameSchema.optional(),
464464 "type": TypeEnumSchema,
465-});
465+}).strict();
466466 export type TentacledType = z.infer<typeof TentacledTypeSchema>;
467467
468468 export const StickyCommentSchema = z.object({
@@ -470,7 +470,7 @@ export const StickyCommentSchema = z.object({
470470 "shortText": z.string().optional(),
471471 "tags": z.array(TagSchema).optional(),
472472 "text": z.string().optional(),
473-});
473+}).strict();
474474 export type StickyComment = z.infer<typeof StickyCommentSchema>;
475475
476476 export const PurpleParameterSchema = z.object({
@@ -481,7 +481,7 @@ export const PurpleParameterSchema = z.object({
481481 "kindString": ParameterKindStringSchema,
482482 "name": z.string(),
483483 "type": StickyTypeSchema,
484-});
484+}).strict();
485485 export type PurpleParameter = z.infer<typeof PurpleParameterSchema>;
486486
487487 export const StickyChildSchema = z.object({
@@ -493,7 +493,7 @@ export const StickyChildSchema = z.object({
493493 "name": z.string(),
494494 "sources": z.array(SourceSchema),
495495 "type": IndecentTypeSchema,
496-});
496+}).strict();
497497 export type StickyChild = z.infer<typeof StickyChildSchema>;
498498
499499 export const IndexSignatureSchema = z.object({
@@ -504,7 +504,7 @@ export const IndexSignatureSchema = z.object({
504504 "name": z.string(),
505505 "parameters": z.array(GetSignatureSchema),
506506 "type": HilariousTypeSchema,
507-});
507+}).strict();
508508 export type IndexSignature = z.infer<typeof IndexSignatureSchema>;
509509
510510 export const TentacledSignatureSchema = z.object({
@@ -516,7 +516,7 @@ export const TentacledSignatureSchema = z.object({
516516 "name": z.string(),
517517 "parameters": z.array(FluffyParameterSchema).optional(),
518518 "type": ExtendedBySchema,
519-});
519+}).strict();
520520 export type TentacledSignature = z.infer<typeof TentacledSignatureSchema>;
521521
522522 export const TentacledDeclarationSchema = z.object({
@@ -530,14 +530,14 @@ export const TentacledDeclarationSchema = z.object({
530530 "name": z.string(),
531531 "signatures": z.array(GetSignatureSchema).optional(),
532532 "sources": z.array(SourceSchema),
533-});
533+}).strict();
534534 export type TentacledDeclaration = z.infer<typeof TentacledDeclarationSchema>;
535535
536536 export const FriskyTypeSchema = z.object({
537537 "declaration": IndigoDeclarationSchema.optional(),
538538 "name": NameSchema.optional(),
539539 "type": TypeEnumSchema,
540-});
540+}).strict();
541541 export type FriskyType = z.infer<typeof FriskyTypeSchema>;
542542
543543 export const TypeParameterSchema = z.object({
@@ -548,7 +548,7 @@ export const TypeParameterSchema = z.object({
548548 "kindString": z.string(),
549549 "name": z.string(),
550550 "type": MischievousTypeSchema.optional(),
551-});
551+}).strict();
552552 export type TypeParameter = z.infer<typeof TypeParameterSchema>;
553553
554554 export const PurpleSignatureSchema = z.object({
@@ -560,7 +560,7 @@ export const PurpleSignatureSchema = z.object({
560560 "name": z.string(),
561561 "parameters": z.array(GetSignatureSchema),
562562 "type": TentacledTypeSchema,
563-});
563+}).strict();
564564 export type PurpleSignature = z.infer<typeof PurpleSignatureSchema>;
565565
566566 export const FluffySignatureSchema = z.object({
@@ -576,7 +576,7 @@ export const FluffySignatureSchema = z.object({
576576 "parameters": z.array(PurpleParameterSchema).optional(),
577577 "type": ExtendedBySchema,
578578 "typeParameter": z.array(GetSignatureSchema).optional(),
579-});
579+}).strict();
580580 export type FluffySignature = z.infer<typeof FluffySignatureSchema>;
581581
582582 export const FluffyDeclarationSchema = z.object({
@@ -590,7 +590,7 @@ export const FluffyDeclarationSchema = z.object({
590590 "name": z.string(),
591591 "signatures": z.array(TentacledSignatureSchema).optional(),
592592 "sources": z.array(SourceSchema),
593-});
593+}).strict();
594594 export type FluffyDeclaration = z.infer<typeof FluffyDeclarationSchema>;
595595
596596 export const AmbitiousTypeSchema = z.object({
@@ -600,7 +600,7 @@ export const AmbitiousTypeSchema = z.object({
600600 "name": z.string().optional(),
601601 "type": TypeEnumSchema,
602602 "typeArguments": z.array(ElementTypeSchema).optional(),
603-});
603+}).strict();
604604 export type AmbitiousType = z.infer<typeof AmbitiousTypeSchema>;
605605
606606 export const IndecentChildSchema = z.object({
@@ -611,7 +611,7 @@ export const IndecentChildSchema = z.object({
611611 "name": z.string(),
612612 "sources": z.array(SourceSchema),
613613 "type": FriskyTypeSchema,
614-});
614+}).strict();
615615 export type IndecentChild = z.infer<typeof IndecentChildSchema>;
616616
617617 export const TentacledChildSchema = z.object({
@@ -625,7 +625,7 @@ export const TentacledChildSchema = z.object({
625625 "signatures": z.array(PurpleSignatureSchema).optional(),
626626 "sources": z.array(SourceSchema),
627627 "type": TypeElementSchema.optional(),
628-});
628+}).strict();
629629 export type TentacledChild = z.infer<typeof TentacledChildSchema>;
630630
631631 export const IndigoTypeSchema = z.object({
@@ -638,7 +638,7 @@ export const IndigoTypeSchema = z.object({
638638 "type": TypeEnumSchema,
639639 "typeArguments": z.array(PurpleTypeArgumentSchema).optional(),
640640 "types": z.array(TypeElementSchema).optional(),
641-});
641+}).strict();
642642 export type IndigoType = z.infer<typeof IndigoTypeSchema>;
643643
644644 export const TentacledParameterSchema = z.object({
@@ -651,7 +651,7 @@ export const TentacledParameterSchema = z.object({
651651 "name": z.string(),
652652 "originalName": z.string().optional(),
653653 "type": AmbitiousTypeSchema,
654-});
654+}).strict();
655655 export type TentacledParameter = z.infer<typeof TentacledParameterSchema>;
656656
657657 export const StickyDeclarationSchema = z.object({
@@ -664,7 +664,7 @@ export const StickyDeclarationSchema = z.object({
664664 "name": z.string(),
665665 "signatures": z.array(GetSignatureSchema),
666666 "sources": z.array(SourceSchema),
667-});
667+}).strict();
668668 export type StickyDeclaration = z.infer<typeof StickyDeclarationSchema>;
669669
670670 export const FluffyChildSchema = z.object({
@@ -685,7 +685,7 @@ export const FluffyChildSchema = z.object({
685685 "signatures": z.array(FluffySignatureSchema).optional(),
686686 "sources": z.array(SourceSchema),
687687 "type": IndigoTypeSchema.optional(),
688-});
688+}).strict();
689689 export type FluffyChild = z.infer<typeof FluffyChildSchema>;
690690
691691 export const StickySignatureSchema = z.object({
@@ -698,7 +698,7 @@ export const StickySignatureSchema = z.object({
698698 "parameters": z.array(TentacledParameterSchema).optional(),
699699 "type": CunningTypeSchema,
700700 "typeParameter": z.array(GetSignatureSchema).optional(),
701-});
701+}).strict();
702702 export type StickySignature = z.infer<typeof StickySignatureSchema>;
703703
704704 export const MagentaTypeSchema = z.object({
@@ -711,7 +711,7 @@ export const MagentaTypeSchema = z.object({
711711 "typeArguments": z.array(FluffyTypeArgumentSchema).optional(),
712712 "types": z.array(ExtendedBySchema).optional(),
713713 "value": z.string().optional(),
714-});
714+}).strict();
715715 export type MagentaType = z.infer<typeof MagentaTypeSchema>;
716716
717717 export const PurpleChildSchema = z.object({
@@ -732,7 +732,7 @@ export const PurpleChildSchema = z.object({
732732 "sources": z.array(SourceSchema),
733733 "type": MagentaTypeSchema.optional(),
734734 "typeParameter": z.array(TypeParameterSchema).optional(),
735-});
735+}).strict();
736736 export type PurpleChild = z.infer<typeof PurpleChildSchema>;
737737
738738 export const TopLevelChildSchema = z.object({
@@ -746,7 +746,7 @@ export const TopLevelChildSchema = z.object({
746746 "name": z.string(),
747747 "originalName": z.string(),
748748 "sources": z.array(SourceSchema),
749-});
749+}).strict();
750750 export type TopLevelChild = z.infer<typeof TopLevelChildSchema>;
751751
752752 export const TopLevelSchema = z.object({
@@ -756,5 +756,5 @@ export const TopLevelSchema = z.object({
756756 "id": z.number().int(),
757757 "kind": z.number().int(),
758758 "name": z.string(),
759-});
759+}).strict();
760760 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/priority/bug790.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -21,5 +21,5 @@ export const TopLevelSchema: z.ZodType<TopLevel> = z.lazy(() =>
2121 "parent_id": z.number().int(),
2222 "position": z.number().int(),
2323 "product_count": z.number().int(),
24- })
24+ }).strict()
2525 );
Test case

test/inputs/json/priority/bug855-short.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -7,7 +7,7 @@ export const TopLevelValueSchema = z.object({
77 "code": z.string(),
88 "emoticon_set": z.number().int(),
99 "id": z.number().int(),
10-});
10+}).strict();
1111 export type TopLevelValue = z.infer<typeof TopLevelValueSchema>;
1212
1313 export const TopLevelSchema = z.record(z.string(), TopLevelValueSchema);
Test case

test/inputs/json/priority/bug863.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -64,7 +64,7 @@ export const PurpleTopLevelSchema = z.object({
6464 "RANK": z.number().int(),
6565 "RANK_TITLE": RankTitleSchema,
6666 "SEX": SexSchema,
67-});
67+}).strict();
6868 export type PurpleTopLevel = z.infer<typeof PurpleTopLevelSchema>;
6969
7070 export const FluffyTopLevelSchema = z.object({
@@ -103,7 +103,7 @@ export const FluffyTopLevelSchema = z.object({
103103 "SOLIDERCOUNT": z.number().int(),
104104 "SOLITUSCOUNT": z.number().int(),
105105 "TRADERCOUNT": z.number().int(),
106-});
106+}).strict();
107107 export type FluffyTopLevel = z.infer<typeof FluffyTopLevelSchema>;
108108
109109 export const TopLevelSchema = z.array(z.union([z.array(PurpleTopLevelSchema), FluffyTopLevelSchema, z.string()]));
Test case

test/inputs/json/priority/coin-pairs.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -10,11 +10,11 @@ export const PairSchema = z.object({
1010 "min_amount": z.number(),
1111 "min_price": z.number(),
1212 "min_total": z.number(),
13-});
13+}).strict();
1414 export type Pair = z.infer<typeof PairSchema>;
1515
1616 export const TopLevelSchema = z.object({
1717 "pairs": z.record(z.string(), PairSchema),
1818 "server_time": z.number().int(),
19-});
19+}).strict();
2020 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/priority/combinations1.json

1 generated file · +14 −14
Mtypescript-zoddefault / TopLevel.ts+14 −14
@@ -22,7 +22,7 @@ export const CerographClassSchema = z.object({
2222 "Tolowa": z.null(),
2323 "tradeful": z.null(),
2424 "unriveting": z.null(),
25-});
25+}).strict();
2626 export type CerographClass = z.infer<typeof CerographClassSchema>;
2727
2828 export const ChemotherapeuticClassSchema = z.object({
@@ -51,7 +51,7 @@ export const ChemotherapeuticClassSchema = z.object({
5151 "stagmometer": z.null().optional(),
5252 "tetherball": z.null().optional(),
5353 "unshy": z.null().optional(),
54-});
54+}).strict();
5555 export type ChemotherapeuticClass = z.infer<typeof ChemotherapeuticClassSchema>;
5656
5757 export const CimeliaClassSchema = z.object({
@@ -60,7 +60,7 @@ export const CimeliaClassSchema = z.object({
6060 "disdiapason": z.string(),
6161 "homocerc": z.boolean(),
6262 "nonbookish": z.null(),
63-});
63+}).strict();
6464 export type CimeliaClass = z.infer<typeof CimeliaClassSchema>;
6565
6666 export const CoadjustClassSchema = z.object({
@@ -89,7 +89,7 @@ export const CoadjustClassSchema = z.object({
8989 "symbiot": z.null().optional(),
9090 "tablefellow": z.null().optional(),
9191 "unchargeable": z.null().optional(),
92-});
92+}).strict();
9393 export type CoadjustClass = z.infer<typeof CoadjustClassSchema>;
9494
9595 export const CredulityClassSchema = z.object({
@@ -113,7 +113,7 @@ export const CredulityClassSchema = z.object({
113113 "seriality": z.null(),
114114 "vamphorn": z.null(),
115115 "wharp": z.null(),
116-});
116+}).strict();
117117 export type CredulityClass = z.infer<typeof CredulityClassSchema>;
118118
119119 export const DeruralizeClassSchema = z.object({
@@ -137,7 +137,7 @@ export const DeruralizeClassSchema = z.object({
137137 "unnicked": z.null(),
138138 "unstavable": z.null(),
139139 "windfirm": z.null(),
140-});
140+}).strict();
141141 export type DeruralizeClass = z.infer<typeof DeruralizeClassSchema>;
142142
143143 export const DiaereseClassSchema = z.object({
@@ -161,7 +161,7 @@ export const DiaereseClassSchema = z.object({
161161 "silker": z.null(),
162162 "subdentated": z.null(),
163163 "subobscure": z.null(),
164-});
164+}).strict();
165165 export type DiaereseClass = z.infer<typeof DiaereseClassSchema>;
166166
167167 export const EncrustSchema = z.object({
@@ -185,7 +185,7 @@ export const EncrustSchema = z.object({
185185 "ungyved": z.null(),
186186 "whirlabout": z.null(),
187187 "woodenware": z.null(),
188-});
188+}).strict();
189189 export type Encrust = z.infer<typeof EncrustSchema>;
190190
191191 export const FagginglyClassSchema = z.object({
@@ -209,7 +209,7 @@ export const FagginglyClassSchema = z.object({
209209 "soleas": z.null(),
210210 "unfastenable": z.null(),
211211 "unmillinered": z.null(),
212-});
212+}).strict();
213213 export type FagginglyClass = z.infer<typeof FagginglyClassSchema>;
214214
215215 export const FenkClassSchema = z.object({
@@ -233,7 +233,7 @@ export const FenkClassSchema = z.object({
233233 "Tritoness": z.null(),
234234 "undergrade": z.null(),
235235 "undermountain": z.null(),
236-});
236+}).strict();
237237 export type FenkClass = z.infer<typeof FenkClassSchema>;
238238
239239 export const FlagmakingClassSchema = z.object({
@@ -257,7 +257,7 @@ export const FlagmakingClassSchema = z.object({
257257 "unloveliness": z.null(),
258258 "unquarantined": z.null(),
259259 "unrenounceable": z.null(),
260-});
260+}).strict();
261261 export type FlagmakingClass = z.infer<typeof FlagmakingClassSchema>;
262262
263263 export const HemocoeleClassSchema = z.object({
@@ -286,7 +286,7 @@ export const HemocoeleClassSchema = z.object({
286286 "untutelar": z.null().optional(),
287287 "vagrant": z.null().optional(),
288288 "Walt": z.null().optional(),
289-});
289+}).strict();
290290 export type HemocoeleClass = z.infer<typeof HemocoeleClassSchema>;
291291
292292 export const InteracinarSchema = z.object({
@@ -295,7 +295,7 @@ export const InteracinarSchema = z.object({
295295 "triseriatim": z.string(),
296296 "tubbing": z.number().int(),
297297 "untrimmed": z.null(),
298-});
298+}).strict();
299299 export type Interacinar = z.infer<typeof InteracinarSchema>;
300300
301301 export const TopLevelSchema = z.object({
@@ -342,5 +342,5 @@ export const TopLevelSchema = z.object({
342342 "interacinar": InteracinarSchema,
343343 "intercorrelation": z.array(z.union([z.null(), z.array(z.number().int())])),
344344 "jacutinga": z.array(z.union([z.array(z.number().int()), z.record(z.string(), z.union([z.null(), z.number().int()]))])),
345-});
345+}).strict();
346346 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/priority/combinations2.json

1 generated file · +11 −11
Mtypescript-zoddefault / TopLevel.ts+11 −11
@@ -22,7 +22,7 @@ export const AlleviateClassSchema = z.object({
2222 "unparking": z.null(),
2323 "unvarnishedness": z.null(),
2424 "wherewithal": z.null(),
25-});
25+}).strict();
2626 export type AlleviateClass = z.infer<typeof AlleviateClassSchema>;
2727
2828 export const RebeccaSchema = z.object({
@@ -31,7 +31,7 @@ export const RebeccaSchema = z.object({
3131 "disdiapason": z.string(),
3232 "homocerc": z.boolean(),
3333 "nonbookish": z.null(),
34-});
34+}).strict();
3535 export type Rebecca = z.infer<typeof RebeccaSchema>;
3636
3737 export const AmphithyronSchema = z.object({
@@ -60,7 +60,7 @@ export const AmphithyronSchema = z.object({
6060 "stagnum": z.number().int().optional(),
6161 "Those": z.number().int().optional(),
6262 "undecimal": z.number().int().optional(),
63-});
63+}).strict();
6464 export type Amphithyron = z.infer<typeof AmphithyronSchema>;
6565
6666 export const AnkeeClassSchema = z.object({
@@ -84,7 +84,7 @@ export const AnkeeClassSchema = z.object({
8484 "tracheophone": z.null(),
8585 "tuglike": z.null(),
8686 "unscratchingly": z.null(),
87-});
87+}).strict();
8888 export type AnkeeClass = z.infer<typeof AnkeeClassSchema>;
8989
9090 export const AnsarieClassSchema = z.object({
@@ -108,7 +108,7 @@ export const AnsarieClassSchema = z.object({
108108 "water": z.null(),
109109 "zestfully": z.null(),
110110 "zincic": z.null(),
111-});
111+}).strict();
112112 export type AnsarieClass = z.infer<typeof AnsarieClassSchema>;
113113
114114 export const ChytridiaceaeClassSchema = z.object({
@@ -132,7 +132,7 @@ export const ChytridiaceaeClassSchema = z.object({
132132 "uckia": z.null(),
133133 "unmettle": z.null(),
134134 "vorticellid": z.null(),
135-});
135+}).strict();
136136 export type ChytridiaceaeClass = z.infer<typeof ChytridiaceaeClassSchema>;
137137
138138 export const DiscordiaClassSchema = z.object({
@@ -161,7 +161,7 @@ export const DiscordiaClassSchema = z.object({
161161 "swow": z.number().int().optional(),
162162 "wastrel": z.number().int().optional(),
163163 "wingle": z.number().int().optional(),
164-});
164+}).strict();
165165 export type DiscordiaClass = z.infer<typeof DiscordiaClassSchema>;
166166
167167 export const GryphosaurusClassSchema = z.object({
@@ -185,7 +185,7 @@ export const GryphosaurusClassSchema = z.object({
185185 "Tahami": z.null(),
186186 "undaubed": z.null(),
187187 "underntime": z.null(),
188-});
188+}).strict();
189189 export type GryphosaurusClass = z.infer<typeof GryphosaurusClassSchema>;
190190
191191 export const LaviniaClassSchema = z.object({
@@ -214,7 +214,7 @@ export const LaviniaClassSchema = z.object({
214214 "tranquillize": z.number().int().optional(),
215215 "unquestionable": z.number().int().optional(),
216216 "uproute": z.number().int().optional(),
217-});
217+}).strict();
218218 export type LaviniaClass = z.infer<typeof LaviniaClassSchema>;
219219
220220 export const OskarClassSchema = z.object({
@@ -238,7 +238,7 @@ export const OskarClassSchema = z.object({
238238 "teachment": z.null(),
239239 "unmutinous": z.null(),
240240 "unstoppable": z.null(),
241-});
241+}).strict();
242242 export type OskarClass = z.infer<typeof OskarClassSchema>;
243243
244244 export const TopLevelSchema = z.object({
@@ -287,5 +287,5 @@ export const TopLevelSchema = z.object({
287287 "Shakespearolater": z.array(z.union([z.array(z.number().int()), z.number(), z.string()])),
288288 "Svan": z.array(z.number()),
289289 "Wayao": z.record(z.string(), z.number()),
290-});
290+}).strict();
291291 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/priority/combinations3.json

1 generated file · +15 −15
Mtypescript-zoddefault / TopLevel.ts+15 −15
@@ -22,7 +22,7 @@ export const JurorClassSchema = z.object({
2222 "uncontemporary": z.null(),
2323 "uncouched": z.null(),
2424 "uninhabitedness": z.null(),
25-});
25+}).strict();
2626 export type JurorClass = z.infer<typeof JurorClassSchema>;
2727
2828 export const LadronismClassSchema = z.object({
@@ -46,7 +46,7 @@ export const LadronismClassSchema = z.object({
4646 "uplook": z.null(),
4747 "vermiformis": z.null(),
4848 "whafabout": z.null(),
49-});
49+}).strict();
5050 export type LadronismClass = z.infer<typeof LadronismClassSchema>;
5151
5252 export const LandlubberlyClassSchema = z.object({
@@ -70,7 +70,7 @@ export const LandlubberlyClassSchema = z.object({
7070 "saddling": z.null(),
7171 "subcurrent": z.null(),
7272 "unrecriminative": z.null(),
73-});
73+}).strict();
7474 export type LandlubberlyClass = z.infer<typeof LandlubberlyClassSchema>;
7575
7676 export const LupusClassSchema = z.object({
@@ -99,7 +99,7 @@ export const LupusClassSchema = z.object({
9999 "unsignificantly": z.number().int().optional(),
100100 "unsnap": z.number().int().optional(),
101101 "vendible": z.number().int().optional(),
102-});
102+}).strict();
103103 export type LupusClass = z.infer<typeof LupusClassSchema>;
104104
105105 export const MaslinSchema = z.object({
@@ -148,7 +148,7 @@ export const MaslinSchema = z.object({
148148 "unassuaged": z.number().int().optional(),
149149 "ungross": z.null().optional(),
150150 "unjudiciously": z.null().optional(),
151-});
151+}).strict();
152152 export type Maslin = z.infer<typeof MaslinSchema>;
153153
154154 export const MonaziteClassSchema = z.object({
@@ -157,7 +157,7 @@ export const MonaziteClassSchema = z.object({
157157 "disdiapason": z.string(),
158158 "homocerc": z.boolean(),
159159 "nonbookish": z.null(),
160-});
160+}).strict();
161161 export type MonaziteClass = z.infer<typeof MonaziteClassSchema>;
162162
163163 export const MonotheisticallyClassSchema = z.object({
@@ -186,7 +186,7 @@ export const MonotheisticallyClassSchema = z.object({
186186 "superedification": z.null().optional(),
187187 "trust": z.null().optional(),
188188 "whitestone": z.null().optional(),
189-});
189+}).strict();
190190 export type MonotheisticallyClass = z.infer<typeof MonotheisticallyClassSchema>;
191191
192192 export const NoncontributingSchema = z.object({
@@ -195,7 +195,7 @@ export const NoncontributingSchema = z.object({
195195 "sauternes": z.number().int(),
196196 "sparsely": z.boolean(),
197197 "unrequested": z.null(),
198-});
198+}).strict();
199199 export type Noncontributing = z.infer<typeof NoncontributingSchema>;
200200
201201 export const OccupationalistClassSchema = z.object({
@@ -219,7 +219,7 @@ export const OccupationalistClassSchema = z.object({
219219 "tingitid": z.null(),
220220 "trailless": z.null(),
221221 "unpocketed": z.null(),
222-});
222+}).strict();
223223 export type OccupationalistClass = z.infer<typeof OccupationalistClassSchema>;
224224
225225 export const OutrivalClassSchema = z.object({
@@ -243,7 +243,7 @@ export const OutrivalClassSchema = z.object({
243243 "rebellious": z.null(),
244244 "recodify": z.null(),
245245 "unpaced": z.null(),
246-});
246+}).strict();
247247 export type OutrivalClass = z.infer<typeof OutrivalClassSchema>;
248248
249249 export const PiaculumClassSchema = z.object({
@@ -272,7 +272,7 @@ export const PiaculumClassSchema = z.object({
272272 "thorax": z.number().int().optional(),
273273 "yachting": z.number().int().optional(),
274274 "Zipper": z.number().int().optional(),
275-});
275+}).strict();
276276 export type PiaculumClass = z.infer<typeof PiaculumClassSchema>;
277277
278278 export const PneumoceleSchema = z.object({
@@ -301,7 +301,7 @@ export const PneumoceleSchema = z.object({
301301 "taillight": z.null().optional(),
302302 "unjealous": z.null().optional(),
303303 "visitorial": z.null().optional(),
304-});
304+}).strict();
305305 export type Pneumocele = z.infer<typeof PneumoceleSchema>;
306306
307307 export const PotwhiskyClassSchema = z.object({
@@ -325,7 +325,7 @@ export const PotwhiskyClassSchema = z.object({
325325 "thrashel": z.null(),
326326 "tyremesis": z.null(),
327327 "Yoruba": z.null(),
328-});
328+}).strict();
329329 export type PotwhiskyClass = z.infer<typeof PotwhiskyClassSchema>;
330330
331331 export const PrefreshmanClassSchema = z.object({
@@ -349,7 +349,7 @@ export const PrefreshmanClassSchema = z.object({
349349 "scutatiform": z.null(),
350350 "theodolite": z.null(),
351351 "underward": z.null(),
352-});
352+}).strict();
353353 export type PrefreshmanClass = z.infer<typeof PrefreshmanClassSchema>;
354354
355355 export const TopLevelSchema = z.object({
@@ -395,5 +395,5 @@ export const TopLevelSchema = z.object({
395395 "prevoidance": z.array(z.union([z.array(z.number().int()), MonaziteClassSchema, z.number().int()])),
396396 "probant": z.array(z.record(z.string(), z.union([z.null(), z.number().int()]))),
397397 "protext": z.array(z.union([z.array(z.number().int()), z.boolean(), MonaziteClassSchema])),
398-});
398+}).strict();
399399 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/priority/combinations4.json

1 generated file · +17 −17
Mtypescript-zoddefault / TopLevel.ts+17 −17
@@ -22,7 +22,7 @@ export const PulpitismClassSchema = z.object({
2222 "syllabe": z.null(),
2323 "toughhead": z.null(),
2424 "underburn": z.null(),
25-});
25+}).strict();
2626 export type PulpitismClass = z.infer<typeof PulpitismClassSchema>;
2727
2828 export const PyodermiaClassSchema = z.object({
@@ -46,7 +46,7 @@ export const PyodermiaClassSchema = z.object({
4646 "unclothedly": z.null(),
4747 "unimplied": z.null(),
4848 "unsyncopated": z.null(),
49-});
49+}).strict();
5050 export type PyodermiaClass = z.infer<typeof PyodermiaClassSchema>;
5151
5252 export const QuebrachineClassSchema = z.object({
@@ -55,7 +55,7 @@ export const QuebrachineClassSchema = z.object({
5555 "disdiapason": z.string(),
5656 "homocerc": z.boolean(),
5757 "nonbookish": z.null(),
58-});
58+}).strict();
5959 export type QuebrachineClass = z.infer<typeof QuebrachineClassSchema>;
6060
6161 export const ReimagineSchema = z.object({
@@ -84,7 +84,7 @@ export const ReimagineSchema = z.object({
8484 "subdie": z.null().optional(),
8585 "tibiometatarsal": z.null().optional(),
8686 "waltzlike": z.null().optional(),
87-});
87+}).strict();
8888 export type Reimagine = z.infer<typeof ReimagineSchema>;
8989
9090 export const RessautSchema = z.object({
@@ -108,7 +108,7 @@ export const RessautSchema = z.object({
108108 "Theopaschitism": z.string(),
109109 "undurableness": z.string(),
110110 "unmingleable": z.string(),
111-});
111+}).strict();
112112 export type Ressaut = z.infer<typeof RessautSchema>;
113113
114114 export const RewriteClassSchema = z.object({
@@ -132,7 +132,7 @@ export const RewriteClassSchema = z.object({
132132 "vertical": z.null(),
133133 "Whiggification": z.null(),
134134 "yardman": z.null(),
135-});
135+}).strict();
136136 export type RewriteClass = z.infer<typeof RewriteClassSchema>;
137137
138138 export const SantirClassSchema = z.object({
@@ -156,7 +156,7 @@ export const SantirClassSchema = z.object({
156156 "timelily": z.null(),
157157 "unprofaned": z.null(),
158158 "vorticular": z.null(),
159-});
159+}).strict();
160160 export type SantirClass = z.infer<typeof SantirClassSchema>;
161161
162162 export const SaxtenClassSchema = z.object({
@@ -185,7 +185,7 @@ export const SaxtenClassSchema = z.object({
185185 "trunchman": z.null().optional(),
186186 "urger": z.null().optional(),
187187 "withdrawnness": z.null().optional(),
188-});
188+}).strict();
189189 export type SaxtenClass = z.infer<typeof SaxtenClassSchema>;
190190
191191 export const ScattySchema = z.object({
@@ -209,7 +209,7 @@ export const ScattySchema = z.object({
209209 "Tabasco": z.null(),
210210 "teleianthous": z.null(),
211211 "uncombated": z.null(),
212-});
212+}).strict();
213213 export type Scatty = z.infer<typeof ScattySchema>;
214214
215215 export const SisteringClassSchema = z.object({
@@ -233,7 +233,7 @@ export const SisteringClassSchema = z.object({
233233 "unmixable": z.null(),
234234 "untruckling": z.null(),
235235 "vineal": z.null(),
236-});
236+}).strict();
237237 export type SisteringClass = z.infer<typeof SisteringClassSchema>;
238238
239239 export const StaghuntingSchema = z.object({
@@ -262,7 +262,7 @@ export const StaghuntingSchema = z.object({
262262 "trifid": z.number().int().optional(),
263263 "undefeatedly": z.number().int().optional(),
264264 "ungirlish": z.number().int().optional(),
265-});
265+}).strict();
266266 export type Staghunting = z.infer<typeof StaghuntingSchema>;
267267
268268 export const StrenuosityClassSchema = z.object({
@@ -291,7 +291,7 @@ export const StrenuosityClassSchema = z.object({
291291 "undueness": z.number().int().optional(),
292292 "worthily": z.number().int().optional(),
293293 "Yankeeist": z.number().int().optional(),
294-});
294+}).strict();
295295 export type StrenuosityClass = z.infer<typeof StrenuosityClassSchema>;
296296
297297 export const TruantcyClassSchema = z.object({
@@ -320,7 +320,7 @@ export const TruantcyClassSchema = z.object({
320320 "skelder": z.null().optional(),
321321 "windwaywardly": z.null().optional(),
322322 "Yuman": z.null().optional(),
323-});
323+}).strict();
324324 export type TruantcyClass = z.infer<typeof TruantcyClassSchema>;
325325
326326 export const UnimpeachablyClassSchema = z.object({
@@ -349,7 +349,7 @@ export const UnimpeachablyClassSchema = z.object({
349349 "tussocker": z.number().int().optional(),
350350 "ultraproud": z.number().int().optional(),
351351 "unsuggestedness": z.number().int().optional(),
352-});
352+}).strict();
353353 export type UnimpeachablyClass = z.infer<typeof UnimpeachablyClassSchema>;
354354
355355 export const UnstressedClassSchema = z.object({
@@ -373,7 +373,7 @@ export const UnstressedClassSchema = z.object({
373373 "undecreed": z.null(),
374374 "venerable": z.null(),
375375 "vowellessness": z.null(),
376-});
376+}).strict();
377377 export type UnstressedClass = z.infer<typeof UnstressedClassSchema>;
378378
379379 export const WrothyClassSchema = z.object({
@@ -397,7 +397,7 @@ export const WrothyClassSchema = z.object({
397397 "transhumance": z.null(),
398398 "triandrian": z.null(),
399399 "unbooked": z.null(),
400-});
400+}).strict();
401401 export type WrothyClass = z.infer<typeof WrothyClassSchema>;
402402
403403 export const TopLevelSchema = z.object({
@@ -453,5 +453,5 @@ export const TopLevelSchema = z.object({
453453 "warriorship": z.record(z.string(), z.boolean()),
454454 "whitepot": z.array(z.union([QuebrachineClassSchema, z.number()])),
455455 "wrothy": z.array(z.union([z.array(z.null()), WrothyClassSchema])),
456-});
456+}).strict();
457457 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/priority/combined-enum.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -10,11 +10,11 @@ export type X = z.infer<typeof XSchema>;
1010
1111 export const BarSchema = z.object({
1212 "x": XSchema,
13-});
13+}).strict();
1414 export type Bar = z.infer<typeof BarSchema>;
1515
1616 export const TopLevelSchema = z.object({
1717 "bar": z.array(BarSchema),
1818 "foo": z.array(BarSchema),
19-});
19+}).strict();
2020 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/priority/direct-recursive.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -15,5 +15,5 @@ export const TopLevelSchema: z.ZodType<TopLevel> = z.lazy(() =>
1515 "foo": z.number().int(),
1616 "moo": z.number(),
1717 "quux": z.string(),
18- })
18+ }).strict()
1919 );
Test case

test/inputs/json/priority/empty-enum.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -3,10 +3,10 @@ import * as z from "zod";
33
44 export const FooSchema = z.object({
55 "bar": z.string().optional(),
6-});
6+}).strict();
77 export type Foo = z.infer<typeof FooSchema>;
88
99 export const TopLevelSchema = z.object({
1010 "foo": z.array(FooSchema),
11-});
11+}).strict();
1212 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/priority/identifiers.json

1 generated file · +7 −7
Mtypescript-zoddefault / TopLevel.ts+7 −7
@@ -3,34 +3,34 @@ import * as z from "zod";
33
44 export const TopLevelBlaSchema = z.object({
55 "bar": z.number().int(),
6-});
6+}).strict();
77 export type TopLevelBla = z.infer<typeof TopLevelBlaSchema>;
88
99 export const EmptySchema = z.object({
1010 "x": z.number().int(),
11-});
11+}).strict();
1212 export type Empty = z.infer<typeof EmptySchema>;
1313
1414 export const FooBlaSchema = z.object({
15-});
15+}).strict();
1616 export type FooBla = z.infer<typeof FooBlaSchema>;
1717
1818 export const ThisIsAToughOneSchema = z.object({
1919 "\n\n\n": z.number().int(),
2020 "\"": z.number().int(),
21-});
21+}).strict();
2222 export type ThisIsAToughOne = z.infer<typeof ThisIsAToughOneSchema>;
2323
2424 export const EmptyClassSchema = z.object({
2525 "y": z.number().int(),
26-});
26+}).strict();
2727 export type EmptyClass = z.infer<typeof EmptyClassSchema>;
2828
2929 export const FooSchema = z.object({
3030 "bla": FooBlaSchema,
3131 "_": z.number().int(),
3232 "__": z.number().int(),
33-});
33+}).strict();
3434 export type Foo = z.infer<typeof FooSchema>;
3535
3636 export const TopLevelSchema = z.object({
@@ -40,5 +40,5 @@ export const TopLevelSchema = z.object({
4040 "ThisIsA\ud83d\ude1cTough\"\n\nOne": ThisIsAToughOneSchema,
4141 "!": z.number().int(),
4242 "Empty": EmptyClassSchema,
43-});
43+}).strict();
4444 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/priority/issue2680-object-array.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -3,7 +3,7 @@ import * as z from "zod";
33
44 export const TopLevelElementSchema = z.object({
55 "key": z.string(),
6-});
6+}).strict();
77 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
88
99 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/priority/keywords.json

1 generated file · +285 −285
Mtypescript-zoddefault / TopLevel.ts+285 −285
@@ -3,1397 +3,1397 @@ import * as z from "zod";
33
44 export const AbstractSchema = z.object({
55 "abstract": z.number().int(),
6-});
6+}).strict();
77 export type Abstract = z.infer<typeof AbstractSchema>;
88
99 export const AlignasSchema = z.object({
1010 "alignas": z.number().int(),
11-});
11+}).strict();
1212 export type Alignas = z.infer<typeof AlignasSchema>;
1313
1414 export const AlignofSchema = z.object({
1515 "alignof": z.number().int(),
16-});
16+}).strict();
1717 export type Alignof = z.infer<typeof AlignofSchema>;
1818
1919 export const AndSchema = z.object({
2020 "and": z.number().int(),
21-});
21+}).strict();
2222 export type And = z.infer<typeof AndSchema>;
2323
2424 export const AndEqSchema = z.object({
2525 "and_eq": z.number().int(),
26-});
26+}).strict();
2727 export type AndEq = z.infer<typeof AndEqSchema>;
2828
2929 export const AnySchema = z.object({
3030 "Any": z.number().int(),
31-});
31+}).strict();
3232 export type Any = z.infer<typeof AnySchema>;
3333
3434 export const ArrayClassSchema = z.object({
3535 "array": z.number().int(),
36-});
36+}).strict();
3737 export type ArrayClass = z.infer<typeof ArrayClassSchema>;
3838
3939 export const AsSchema = z.object({
4040 "as": z.number().int(),
41-});
41+}).strict();
4242 export type As = z.infer<typeof AsSchema>;
4343
4444 export const AsmSchema = z.object({
4545 "asm": z.number().int(),
46-});
46+}).strict();
4747 export type Asm = z.infer<typeof AsmSchema>;
4848
4949 export const AssertSchema = z.object({
5050 "assert": z.number().int(),
51-});
51+}).strict();
5252 export type Assert = z.infer<typeof AssertSchema>;
5353
5454 export const AssociatedtypeSchema = z.object({
5555 "associatedtype": z.number().int(),
56-});
56+}).strict();
5757 export type Associatedtype = z.infer<typeof AssociatedtypeSchema>;
5858
5959 export const AssociativitySchema = z.object({
6060 "associativity": z.number().int(),
61-});
61+}).strict();
6262 export type Associativity = z.infer<typeof AssociativitySchema>;
6363
6464 export const AsyncSchema = z.object({
6565 "async": z.number().int(),
66-});
66+}).strict();
6767 export type Async = z.infer<typeof AsyncSchema>;
6868
6969 export const AtomicSchema = z.object({
7070 "atomic": z.number().int(),
71-});
71+}).strict();
7272 export type Atomic = z.infer<typeof AtomicSchema>;
7373
7474 export const AtomicCancelSchema = z.object({
7575 "atomic_cancel": z.number().int(),
76-});
76+}).strict();
7777 export type AtomicCancel = z.infer<typeof AtomicCancelSchema>;
7878
7979 export const AtomicCommitSchema = z.object({
8080 "atomic_commit": z.number().int(),
81-});
81+}).strict();
8282 export type AtomicCommit = z.infer<typeof AtomicCommitSchema>;
8383
8484 export const AtomicNoexceptSchema = z.object({
8585 "atomic_noexcept": z.number().int(),
86-});
86+}).strict();
8787 export type AtomicNoexcept = z.infer<typeof AtomicNoexceptSchema>;
8888
8989 export const AutoSchema = z.object({
9090 "auto": z.number().int(),
91-});
91+}).strict();
9292 export type Auto = z.infer<typeof AutoSchema>;
9393
9494 export const AwaitSchema = z.object({
9595 "await": z.number().int(),
96-});
96+}).strict();
9797 export type Await = z.infer<typeof AwaitSchema>;
9898
9999 export const BaseSchema = z.object({
100100 "base": z.number().int(),
101-});
101+}).strict();
102102 export type Base = z.infer<typeof BaseSchema>;
103103
104104 export const BitandSchema = z.object({
105105 "bitand": z.number().int(),
106-});
106+}).strict();
107107 export type Bitand = z.infer<typeof BitandSchema>;
108108
109109 export const BitorSchema = z.object({
110110 "bitor": z.number().int(),
111-});
111+}).strict();
112112 export type Bitor = z.infer<typeof BitorSchema>;
113113
114114 export const BoolSchema = z.object({
115115 "BOOL": z.number().int(),
116-});
116+}).strict();
117117 export type Bool = z.infer<typeof BoolSchema>;
118118
119119 export const BooleanSchema = z.object({
120120 "boolean": z.number().int(),
121-});
121+}).strict();
122122 export type Boolean = z.infer<typeof BooleanSchema>;
123123
124124 export const BreakSchema = z.object({
125125 "break": z.number().int(),
126-});
126+}).strict();
127127 export type Break = z.infer<typeof BreakSchema>;
128128
129129 export const BycopySchema = z.object({
130130 "bycopy": z.number().int(),
131-});
131+}).strict();
132132 export type Bycopy = z.infer<typeof BycopySchema>;
133133
134134 export const ByrefSchema = z.object({
135135 "byref": z.number().int(),
136-});
136+}).strict();
137137 export type Byref = z.infer<typeof ByrefSchema>;
138138
139139 export const ByteSchema = z.object({
140140 "byte": z.number().int(),
141-});
141+}).strict();
142142 export type Byte = z.infer<typeof ByteSchema>;
143143
144144 export const CaseSchema = z.object({
145145 "case": z.number().int(),
146-});
146+}).strict();
147147 export type Case = z.infer<typeof CaseSchema>;
148148
149149 export const CatchSchema = z.object({
150150 "catch": z.number().int(),
151-});
151+}).strict();
152152 export type Catch = z.infer<typeof CatchSchema>;
153153
154154 export const ChanSchema = z.object({
155155 "chan": z.number().int(),
156-});
156+}).strict();
157157 export type Chan = z.infer<typeof ChanSchema>;
158158
159159 export const CharSchema = z.object({
160160 "char": z.number().int(),
161-});
161+}).strict();
162162 export type Char = z.infer<typeof CharSchema>;
163163
164164 export const Char16TSchema = z.object({
165165 "char16_t": z.number().int(),
166-});
166+}).strict();
167167 export type Char16T = z.infer<typeof Char16TSchema>;
168168
169169 export const Char32TSchema = z.object({
170170 "char32_t": z.number().int(),
171-});
171+}).strict();
172172 export type Char32T = z.infer<typeof Char32TSchema>;
173173
174174 export const CheckedSchema = z.object({
175175 "checked": z.number().int(),
176-});
176+}).strict();
177177 export type Checked = z.infer<typeof CheckedSchema>;
178178
179179 export const ClassClassSchema = z.object({
180180 "Class": z.number().int(),
181-});
181+}).strict();
182182 export type ClassClass = z.infer<typeof ClassClassSchema>;
183183
184184 export const CloneSchema = z.object({
185185 "clone": z.number().int(),
186-});
186+}).strict();
187187 export type Clone = z.infer<typeof CloneSchema>;
188188
189189 export const CoAwaitSchema = z.object({
190190 "co_await": z.number().int(),
191-});
191+}).strict();
192192 export type CoAwait = z.infer<typeof CoAwaitSchema>;
193193
194194 export const CoReturnSchema = z.object({
195195 "co_return": z.number().int(),
196-});
196+}).strict();
197197 export type CoReturn = z.infer<typeof CoReturnSchema>;
198198
199199 export const CoYieldSchema = z.object({
200200 "co_yield": z.number().int(),
201-});
201+}).strict();
202202 export type CoYield = z.infer<typeof CoYieldSchema>;
203203
204204 export const ComplSchema = z.object({
205205 "compl": z.number().int(),
206-});
206+}).strict();
207207 export type Compl = z.infer<typeof ComplSchema>;
208208
209209 export const ComplexSchema = z.object({
210210 "_Complex": z.number().int(),
211-});
211+}).strict();
212212 export type Complex = z.infer<typeof ComplexSchema>;
213213
214214 export const ConceptSchema = z.object({
215215 "concept": z.number().int(),
216-});
216+}).strict();
217217 export type Concept = z.infer<typeof ConceptSchema>;
218218
219219 export const ConsoleSchema = z.object({
220220 "console": z.number().int(),
221-});
221+}).strict();
222222 export type Console = z.infer<typeof ConsoleSchema>;
223223
224224 export const ConstSchema = z.object({
225225 "const": z.number().int(),
226-});
226+}).strict();
227227 export type Const = z.infer<typeof ConstSchema>;
228228
229229 export const ConstCastSchema = z.object({
230230 "const_cast": z.number().int(),
231-});
231+}).strict();
232232 export type ConstCast = z.infer<typeof ConstCastSchema>;
233233
234234 export const ConstexprSchema = z.object({
235235 "constexpr": z.number().int(),
236-});
236+}).strict();
237237 export type Constexpr = z.infer<typeof ConstexprSchema>;
238238
239239 export const ConstructorSchema = z.object({
240240 "constructor": z.number().int(),
241-});
241+}).strict();
242242 export type Constructor = z.infer<typeof ConstructorSchema>;
243243
244244 export const ContinueSchema = z.object({
245245 "continue": z.number().int(),
246-});
246+}).strict();
247247 export type Continue = z.infer<typeof ContinueSchema>;
248248
249249 export const ConvenienceSchema = z.object({
250250 "convenience": z.number().int(),
251-});
251+}).strict();
252252 export type Convenience = z.infer<typeof ConvenienceSchema>;
253253
254254 export const ConvertSchema = z.object({
255255 "convert": z.number().int(),
256-});
256+}).strict();
257257 export type Convert = z.infer<typeof ConvertSchema>;
258258
259259 export const ConverterSchema = z.object({
260260 "converter": z.number().int(),
261-});
261+}).strict();
262262 export type Converter = z.infer<typeof ConverterSchema>;
263263
264264 export const DateClassSchema = z.object({
265265 "date": z.number().int(),
266-});
266+}).strict();
267267 export type DateClass = z.infer<typeof DateClassSchema>;
268268
269269 export const DateParseHandlingSchema = z.object({
270270 "date_parse_handling": z.number().int(),
271-});
271+}).strict();
272272 export type DateParseHandling = z.infer<typeof DateParseHandlingSchema>;
273273
274274 export const DebuggerSchema = z.object({
275275 "debugger": z.number().int(),
276-});
276+}).strict();
277277 export type Debugger = z.infer<typeof DebuggerSchema>;
278278
279279 export const DecimalSchema = z.object({
280280 "decimal": z.number().int(),
281-});
281+}).strict();
282282 export type Decimal = z.infer<typeof DecimalSchema>;
283283
284284 export const DeclareSchema = z.object({
285285 "declare": z.number().int(),
286-});
286+}).strict();
287287 export type Declare = z.infer<typeof DeclareSchema>;
288288
289289 export const DecltypeSchema = z.object({
290290 "decltype": z.number().int(),
291-});
291+}).strict();
292292 export type Decltype = z.infer<typeof DecltypeSchema>;
293293
294294 export const DecodeStringSchema = z.object({
295295 "decode_string": z.number().int(),
296-});
296+}).strict();
297297 export type DecodeString = z.infer<typeof DecodeStringSchema>;
298298
299299 export const EmptySchema = z.object({
300300 "_": z.number().int(),
301-});
301+}).strict();
302302 export type Empty = z.infer<typeof EmptySchema>;
303303
304304 export const ImaginerySchema = z.object({
305305 "_Imaginery": z.number().int(),
306-});
306+}).strict();
307307 export type Imaginery = z.infer<typeof ImaginerySchema>;
308308
309309 export const AnyClassSchema = z.object({
310310 "any": z.number().int(),
311-});
311+}).strict();
312312 export type AnyClass = z.infer<typeof AnyClassSchema>;
313313
314314 export const BoolClassSchema = z.object({
315315 "_Bool": z.number().int(),
316-});
316+}).strict();
317317 export type BoolClass = z.infer<typeof BoolClassSchema>;
318318
319319 export const Obj1ClassSchema = z.object({
320320 "class": z.number().int(),
321-});
321+}).strict();
322322 export type Obj1Class = z.infer<typeof Obj1ClassSchema>;
323323
324324 export const Obj1BoolSchema = z.object({
325325 "bool": z.number().int(),
326-});
326+}).strict();
327327 export type Obj1Bool = z.infer<typeof Obj1BoolSchema>;
328328
329329 export const DefSchema = z.object({
330330 "def": z.number().int(),
331-});
331+}).strict();
332332 export type Def = z.infer<typeof DefSchema>;
333333
334334 export const DefaultSchema = z.object({
335335 "default": z.number().int(),
336-});
336+}).strict();
337337 export type Default = z.infer<typeof DefaultSchema>;
338338
339339 export const DeferSchema = z.object({
340340 "defer": z.number().int(),
341-});
341+}).strict();
342342 export type Defer = z.infer<typeof DeferSchema>;
343343
344344 export const DeinitSchema = z.object({
345345 "deinit": z.number().int(),
346-});
346+}).strict();
347347 export type Deinit = z.infer<typeof DeinitSchema>;
348348
349349 export const DelSchema = z.object({
350350 "del": z.number().int(),
351-});
351+}).strict();
352352 export type Del = z.infer<typeof DelSchema>;
353353
354354 export const DelegateSchema = z.object({
355355 "delegate": z.number().int(),
356-});
356+}).strict();
357357 export type Delegate = z.infer<typeof DelegateSchema>;
358358
359359 export const DeleteSchema = z.object({
360360 "delete": z.number().int(),
361-});
361+}).strict();
362362 export type Delete = z.infer<typeof DeleteSchema>;
363363
364364 export const DictSchema = z.object({
365365 "dict": z.number().int(),
366-});
366+}).strict();
367367 export type Dict = z.infer<typeof DictSchema>;
368368
369369 export const DictionarySchema = z.object({
370370 "dictionary": z.number().int(),
371-});
371+}).strict();
372372 export type Dictionary = z.infer<typeof DictionarySchema>;
373373
374374 export const DidSetSchema = z.object({
375375 "didSet": z.number().int(),
376-});
376+}).strict();
377377 export type DidSet = z.infer<typeof DidSetSchema>;
378378
379379 export const DoSchema = z.object({
380380 "do": z.number().int(),
381-});
381+}).strict();
382382 export type Do = z.infer<typeof DoSchema>;
383383
384384 export const DoubleSchema = z.object({
385385 "double": z.number().int(),
386-});
386+}).strict();
387387 export type Double = z.infer<typeof DoubleSchema>;
388388
389389 export const DynamicSchema = z.object({
390390 "dynamic": z.number().int(),
391-});
391+}).strict();
392392 export type Dynamic = z.infer<typeof DynamicSchema>;
393393
394394 export const DynamicCastSchema = z.object({
395395 "dynamic_cast": z.number().int(),
396-});
396+}).strict();
397397 export type DynamicCast = z.infer<typeof DynamicCastSchema>;
398398
399399 export const ElifSchema = z.object({
400400 "elif": z.number().int(),
401-});
401+}).strict();
402402 export type Elif = z.infer<typeof ElifSchema>;
403403
404404 export const ElseSchema = z.object({
405405 "else": z.number().int(),
406-});
406+}).strict();
407407 export type Else = z.infer<typeof ElseSchema>;
408408
409409 export const EncodeQuickTypeSchema = z.object({
410410 "encode_quick_type": z.number().int(),
411-});
411+}).strict();
412412 export type EncodeQuickType = z.infer<typeof EncodeQuickTypeSchema>;
413413
414414 export const EnumSchema = z.object({
415415 "enum": z.number().int(),
416-});
416+}).strict();
417417 export type Enum = z.infer<typeof EnumSchema>;
418418
419419 export const EqualityContractSchema = z.object({
420420 "equalityContract": z.number().int(),
421-});
421+}).strict();
422422 export type EqualityContract = z.infer<typeof EqualityContractSchema>;
423423
424424 export const EventSchema = z.object({
425425 "event": z.number().int(),
426-});
426+}).strict();
427427 export type Event = z.infer<typeof EventSchema>;
428428
429429 export const ExceptSchema = z.object({
430430 "except": z.number().int(),
431-});
431+}).strict();
432432 export type Except = z.infer<typeof ExceptSchema>;
433433
434434 export const ExceptionSchema = z.object({
435435 "exception": z.number().int(),
436-});
436+}).strict();
437437 export type Exception = z.infer<typeof ExceptionSchema>;
438438
439439 export const ExplicitSchema = z.object({
440440 "explicit": z.number().int(),
441-});
441+}).strict();
442442 export type Explicit = z.infer<typeof ExplicitSchema>;
443443
444444 export const ExportSchema = z.object({
445445 "export": z.number().int(),
446-});
446+}).strict();
447447 export type Export = z.infer<typeof ExportSchema>;
448448
449449 export const ExposingSchema = z.object({
450450 "exposing": z.number().int(),
451-});
451+}).strict();
452452 export type Exposing = z.infer<typeof ExposingSchema>;
453453
454454 export const ExtendsSchema = z.object({
455455 "extends": z.number().int(),
456-});
456+}).strict();
457457 export type Extends = z.infer<typeof ExtendsSchema>;
458458
459459 export const ExtensionSchema = z.object({
460460 "extension": z.number().int(),
461-});
461+}).strict();
462462 export type Extension = z.infer<typeof ExtensionSchema>;
463463
464464 export const ExternSchema = z.object({
465465 "extern": z.number().int(),
466-});
466+}).strict();
467467 export type Extern = z.infer<typeof ExternSchema>;
468468
469469 export const FallthroughSchema = z.object({
470470 "fallthrough": z.number().int(),
471-});
471+}).strict();
472472 export type Fallthrough = z.infer<typeof FallthroughSchema>;
473473
474474 export const FalseSchema = z.object({
475475 "False": z.number().int(),
476-});
476+}).strict();
477477 export type False = z.infer<typeof FalseSchema>;
478478
479479 export const FileprivateSchema = z.object({
480480 "fileprivate": z.number().int(),
481-});
481+}).strict();
482482 export type Fileprivate = z.infer<typeof FileprivateSchema>;
483483
484484 export const FinalSchema = z.object({
485485 "final": z.number().int(),
486-});
486+}).strict();
487487 export type Final = z.infer<typeof FinalSchema>;
488488
489489 export const FinallySchema = z.object({
490490 "finally": z.number().int(),
491-});
491+}).strict();
492492 export type Finally = z.infer<typeof FinallySchema>;
493493
494494 export const FixedSchema = z.object({
495495 "fixed": z.number().int(),
496-});
496+}).strict();
497497 export type Fixed = z.infer<typeof FixedSchema>;
498498
499499 export const FloatSchema = z.object({
500500 "float": z.number().int(),
501-});
501+}).strict();
502502 export type Float = z.infer<typeof FloatSchema>;
503503
504504 export const ForSchema = z.object({
505505 "for": z.number().int(),
506-});
506+}).strict();
507507 export type For = z.infer<typeof ForSchema>;
508508
509509 export const ForeachSchema = z.object({
510510 "foreach": z.number().int(),
511-});
511+}).strict();
512512 export type Foreach = z.infer<typeof ForeachSchema>;
513513
514514 export const FriendSchema = z.object({
515515 "friend": z.number().int(),
516-});
516+}).strict();
517517 export type Friend = z.infer<typeof FriendSchema>;
518518
519519 export const FromSchema = z.object({
520520 "from": z.number().int(),
521-});
521+}).strict();
522522 export type From = z.infer<typeof FromSchema>;
523523
524524 export const FromJsonSchema = z.object({
525525 "from_json": z.number().int(),
526-});
526+}).strict();
527527 export type FromJson = z.infer<typeof FromJsonSchema>;
528528
529529 export const FuncSchema = z.object({
530530 "func": z.number().int(),
531-});
531+}).strict();
532532 export type Func = z.infer<typeof FuncSchema>;
533533
534534 export const FunctionSchema = z.object({
535535 "function": z.number().int(),
536-});
536+}).strict();
537537 export type Function = z.infer<typeof FunctionSchema>;
538538
539539 export const GetSchema = z.object({
540540 "get": z.number().int(),
541-});
541+}).strict();
542542 export type Get = z.infer<typeof GetSchema>;
543543
544544 export const GlobalSchema = z.object({
545545 "global": z.number().int(),
546-});
546+}).strict();
547547 export type Global = z.infer<typeof GlobalSchema>;
548548
549549 export const GoSchema = z.object({
550550 "go": z.number().int(),
551-});
551+}).strict();
552552 export type Go = z.infer<typeof GoSchema>;
553553
554554 export const GotoSchema = z.object({
555555 "goto": z.number().int(),
556-});
556+}).strict();
557557 export type Goto = z.infer<typeof GotoSchema>;
558558
559559 export const GuardSchema = z.object({
560560 "guard": z.number().int(),
561-});
561+}).strict();
562562 export type Guard = z.infer<typeof GuardSchema>;
563563
564564 export const HasOwnPropertySchema = z.object({
565565 "hasOwnProperty": z.number().int(),
566-});
566+}).strict();
567567 export type HasOwnProperty = z.infer<typeof HasOwnPropertySchema>;
568568
569569 export const IdSchema = z.object({
570570 "id": z.number().int(),
571-});
571+}).strict();
572572 export type Id = z.infer<typeof IdSchema>;
573573
574574 export const IfSchema = z.object({
575575 "if": z.number().int(),
576-});
576+}).strict();
577577 export type If = z.infer<typeof IfSchema>;
578578
579579 export const ImpSchema = z.object({
580580 "IMP": z.number().int(),
581-});
581+}).strict();
582582 export type Imp = z.infer<typeof ImpSchema>;
583583
584584 export const ImplementsSchema = z.object({
585585 "implements": z.number().int(),
586-});
586+}).strict();
587587 export type Implements = z.infer<typeof ImplementsSchema>;
588588
589589 export const ImplicitSchema = z.object({
590590 "implicit": z.number().int(),
591-});
591+}).strict();
592592 export type Implicit = z.infer<typeof ImplicitSchema>;
593593
594594 export const ImportSchema = z.object({
595595 "import": z.number().int(),
596-});
596+}).strict();
597597 export type Import = z.infer<typeof ImportSchema>;
598598
599599 export const InSchema = z.object({
600600 "in": z.number().int(),
601-});
601+}).strict();
602602 export type In = z.infer<typeof InSchema>;
603603
604604 export const IndirectSchema = z.object({
605605 "indirect": z.number().int(),
606-});
606+}).strict();
607607 export type Indirect = z.infer<typeof IndirectSchema>;
608608
609609 export const InfixSchema = z.object({
610610 "infix": z.number().int(),
611-});
611+}).strict();
612612 export type Infix = z.infer<typeof InfixSchema>;
613613
614614 export const InitSchema = z.object({
615615 "init": z.number().int(),
616-});
616+}).strict();
617617 export type Init = z.infer<typeof InitSchema>;
618618
619619 export const InlineSchema = z.object({
620620 "inline": z.number().int(),
621-});
621+}).strict();
622622 export type Inline = z.infer<typeof InlineSchema>;
623623
624624 export const InoutSchema = z.object({
625625 "inout": z.number().int(),
626-});
626+}).strict();
627627 export type Inout = z.infer<typeof InoutSchema>;
628628
629629 export const InstanceofSchema = z.object({
630630 "instanceof": z.number().int(),
631-});
631+}).strict();
632632 export type Instanceof = z.infer<typeof InstanceofSchema>;
633633
634634 export const IntSchema = z.object({
635635 "int": z.number().int(),
636-});
636+}).strict();
637637 export type Int = z.infer<typeof IntSchema>;
638638
639639 export const InterfaceSchema = z.object({
640640 "interface": z.number().int(),
641-});
641+}).strict();
642642 export type Interface = z.infer<typeof InterfaceSchema>;
643643
644644 export const InternalSchema = z.object({
645645 "internal": z.number().int(),
646-});
646+}).strict();
647647 export type Internal = z.infer<typeof InternalSchema>;
648648
649649 export const FalseClassSchema = z.object({
650650 "false": z.number().int(),
651-});
651+}).strict();
652652 export type FalseClass = z.infer<typeof FalseClassSchema>;
653653
654654 export const IsSchema = z.object({
655655 "is": z.number().int(),
656-});
656+}).strict();
657657 export type Is = z.infer<typeof IsSchema>;
658658
659659 export const IterableSchema = z.object({
660660 "iterable": z.number().int(),
661-});
661+}).strict();
662662 export type Iterable = z.infer<typeof IterableSchema>;
663663
664664 export const JdecSchema = z.object({
665665 "jdec": z.number().int(),
666-});
666+}).strict();
667667 export type Jdec = z.infer<typeof JdecSchema>;
668668
669669 export const JencSchema = z.object({
670670 "jenc": z.number().int(),
671-});
671+}).strict();
672672 export type Jenc = z.infer<typeof JencSchema>;
673673
674674 export const JpipeSchema = z.object({
675675 "jpipe": z.number().int(),
676-});
676+}).strict();
677677 export type Jpipe = z.infer<typeof JpipeSchema>;
678678
679679 export const JsonSchema = z.object({
680680 "json": z.number().int(),
681-});
681+}).strict();
682682 export type Json = z.infer<typeof JsonSchema>;
683683
684684 export const JsonConverterSchema = z.object({
685685 "json_converter": z.number().int(),
686-});
686+}).strict();
687687 export type JsonConverter = z.infer<typeof JsonConverterSchema>;
688688
689689 export const JsonSerializerSchema = z.object({
690690 "json_serializer": z.number().int(),
691-});
691+}).strict();
692692 export type JsonSerializer = z.infer<typeof JsonSerializerSchema>;
693693
694694 export const JsonTokenSchema = z.object({
695695 "json_token": z.number().int(),
696-});
696+}).strict();
697697 export type JsonToken = z.infer<typeof JsonTokenSchema>;
698698
699699 export const JsonWriterSchema = z.object({
700700 "json_writer": z.number().int(),
701-});
701+}).strict();
702702 export type JsonWriter = z.infer<typeof JsonWriterSchema>;
703703
704704 export const LambdaSchema = z.object({
705705 "lambda": z.number().int(),
706-});
706+}).strict();
707707 export type Lambda = z.infer<typeof LambdaSchema>;
708708
709709 export const LazySchema = z.object({
710710 "lazy": z.number().int(),
711-});
711+}).strict();
712712 export type Lazy = z.infer<typeof LazySchema>;
713713
714714 export const LeftSchema = z.object({
715715 "left": z.number().int(),
716-});
716+}).strict();
717717 export type Left = z.infer<typeof LeftSchema>;
718718
719719 export const LetSchema = z.object({
720720 "let": z.number().int(),
721-});
721+}).strict();
722722 export type Let = z.infer<typeof LetSchema>;
723723
724724 export const ListSchema = z.object({
725725 "list": z.number().int(),
726-});
726+}).strict();
727727 export type List = z.infer<typeof ListSchema>;
728728
729729 export const LockSchema = z.object({
730730 "lock": z.number().int(),
731-});
731+}).strict();
732732 export type Lock = z.infer<typeof LockSchema>;
733733
734734 export const LongSchema = z.object({
735735 "long": z.number().int(),
736-});
736+}).strict();
737737 export type Long = z.infer<typeof LongSchema>;
738738
739739 export const MapSchema = z.object({
740740 "map": z.number().int(),
741-});
741+}).strict();
742742 export type Map = z.infer<typeof MapSchema>;
743743
744744 export const MetadataPropertyHandlingSchema = z.object({
745745 "metadata_property_handling": z.number().int(),
746-});
746+}).strict();
747747 export type MetadataPropertyHandling = z.infer<typeof MetadataPropertyHandlingSchema>;
748748
749749 export const ModuleSchema = z.object({
750750 "module": z.number().int(),
751-});
751+}).strict();
752752 export type Module = z.infer<typeof ModuleSchema>;
753753
754754 export const MutableSchema = z.object({
755755 "mutable": z.number().int(),
756-});
756+}).strict();
757757 export type Mutable = z.infer<typeof MutableSchema>;
758758
759759 export const MutatingSchema = z.object({
760760 "mutating": z.number().int(),
761-});
761+}).strict();
762762 export type Mutating = z.infer<typeof MutatingSchema>;
763763
764764 export const NamespaceSchema = z.object({
765765 "namespace": z.number().int(),
766-});
766+}).strict();
767767 export type Namespace = z.infer<typeof NamespaceSchema>;
768768
769769 export const NativeSchema = z.object({
770770 "native": z.number().int(),
771-});
771+}).strict();
772772 export type Native = z.infer<typeof NativeSchema>;
773773
774774 export const NewSchema = z.object({
775775 "new": z.number().int(),
776-});
776+}).strict();
777777 export type New = z.infer<typeof NewSchema>;
778778
779779 export const NewtonsoftSchema = z.object({
780780 "newtonsoft": z.number().int(),
781-});
781+}).strict();
782782 export type Newtonsoft = z.infer<typeof NewtonsoftSchema>;
783783
784784 export const NilSchema = z.object({
785785 "nil": z.number().int(),
786-});
786+}).strict();
787787 export type Nil = z.infer<typeof NilSchema>;
788788
789789 export const NoSchema = z.object({
790790 "NO": z.number().int(),
791-});
791+}).strict();
792792 export type No = z.infer<typeof NoSchema>;
793793
794794 export const NoexceptSchema = z.object({
795795 "noexcept": z.number().int(),
796-});
796+}).strict();
797797 export type Noexcept = z.infer<typeof NoexceptSchema>;
798798
799799 export const NonatomicSchema = z.object({
800800 "nonatomic": z.number().int(),
801-});
801+}).strict();
802802 export type Nonatomic = z.infer<typeof NonatomicSchema>;
803803
804804 export const NoneSchema = z.object({
805805 "None": z.number().int(),
806-});
806+}).strict();
807807 export type None = z.infer<typeof NoneSchema>;
808808
809809 export const NonlocalSchema = z.object({
810810 "nonlocal": z.number().int(),
811-});
811+}).strict();
812812 export type Nonlocal = z.infer<typeof NonlocalSchema>;
813813
814814 export const NonmutatingSchema = z.object({
815815 "nonmutating": z.number().int(),
816-});
816+}).strict();
817817 export type Nonmutating = z.infer<typeof NonmutatingSchema>;
818818
819819 export const NotSchema = z.object({
820820 "not": z.number().int(),
821-});
821+}).strict();
822822 export type Not = z.infer<typeof NotSchema>;
823823
824824 export const NotEqSchema = z.object({
825825 "not_eq": z.number().int(),
826-});
826+}).strict();
827827 export type NotEq = z.infer<typeof NotEqSchema>;
828828
829829 export const NsStringSchema = z.object({
830830 "NSString": z.number().int(),
831-});
831+}).strict();
832832 export type NsString = z.infer<typeof NsStringSchema>;
833833
834834 export const NullSchema = z.object({
835835 "NULL": z.number().int(),
836-});
836+}).strict();
837837 export type Null = z.infer<typeof NullSchema>;
838838
839839 export const NullptrSchema = z.object({
840840 "nullptr": z.number().int(),
841-});
841+}).strict();
842842 export type Nullptr = z.infer<typeof NullptrSchema>;
843843
844844 export const NumberSchema = z.object({
845845 "number": z.number().int(),
846-});
846+}).strict();
847847 export type Number = z.infer<typeof NumberSchema>;
848848
849849 export const NoneClassSchema = z.object({
850850 "none": z.number().int(),
851-});
851+}).strict();
852852 export type NoneClass = z.infer<typeof NoneClassSchema>;
853853
854854 export const NullClassSchema = z.object({
855855 "null": z.number().int(),
856-});
856+}).strict();
857857 export type NullClass = z.infer<typeof NullClassSchema>;
858858
859859 export const ProtocolClassSchema = z.object({
860860 "protocol": z.number().int(),
861-});
861+}).strict();
862862 export type ProtocolClass = z.infer<typeof ProtocolClassSchema>;
863863
864864 export const ObjectClassSchema = z.object({
865865 "object": z.number().int(),
866-});
866+}).strict();
867867 export type ObjectClass = z.infer<typeof ObjectClassSchema>;
868868
869869 export const OfSchema = z.object({
870870 "of": z.number().int(),
871-});
871+}).strict();
872872 export type Of = z.infer<typeof OfSchema>;
873873
874874 export const OnewaySchema = z.object({
875875 "oneway": z.number().int(),
876-});
876+}).strict();
877877 export type Oneway = z.infer<typeof OnewaySchema>;
878878
879879 export const OpenSchema = z.object({
880880 "open": z.number().int(),
881-});
881+}).strict();
882882 export type Open = z.infer<typeof OpenSchema>;
883883
884884 export const OperatorSchema = z.object({
885885 "operator": z.number().int(),
886-});
886+}).strict();
887887 export type Operator = z.infer<typeof OperatorSchema>;
888888
889889 export const OptionalSchema = z.object({
890890 "optional": z.number().int(),
891-});
891+}).strict();
892892 export type Optional = z.infer<typeof OptionalSchema>;
893893
894894 export const OrSchema = z.object({
895895 "or": z.number().int(),
896-});
896+}).strict();
897897 export type Or = z.infer<typeof OrSchema>;
898898
899899 export const OrEqSchema = z.object({
900900 "or_eq": z.number().int(),
901-});
901+}).strict();
902902 export type OrEq = z.infer<typeof OrEqSchema>;
903903
904904 export const OutSchema = z.object({
905905 "out": z.number().int(),
906-});
906+}).strict();
907907 export type Out = z.infer<typeof OutSchema>;
908908
909909 export const OverrideSchema = z.object({
910910 "override": z.number().int(),
911-});
911+}).strict();
912912 export type Override = z.infer<typeof OverrideSchema>;
913913
914914 export const PackageSchema = z.object({
915915 "package": z.number().int(),
916-});
916+}).strict();
917917 export type Package = z.infer<typeof PackageSchema>;
918918
919919 export const ParamsSchema = z.object({
920920 "params": z.number().int(),
921-});
921+}).strict();
922922 export type Params = z.infer<typeof ParamsSchema>;
923923
924924 export const PassSchema = z.object({
925925 "pass": z.number().int(),
926-});
926+}).strict();
927927 export type Pass = z.infer<typeof PassSchema>;
928928
929929 export const PortSchema = z.object({
930930 "port": z.number().int(),
931-});
931+}).strict();
932932 export type Port = z.infer<typeof PortSchema>;
933933
934934 export const PostfixSchema = z.object({
935935 "postfix": z.number().int(),
936-});
936+}).strict();
937937 export type Postfix = z.infer<typeof PostfixSchema>;
938938
939939 export const PrecedenceSchema = z.object({
940940 "precedence": z.number().int(),
941-});
941+}).strict();
942942 export type Precedence = z.infer<typeof PrecedenceSchema>;
943943
944944 export const PrefixSchema = z.object({
945945 "prefix": z.number().int(),
946-});
946+}).strict();
947947 export type Prefix = z.infer<typeof PrefixSchema>;
948948
949949 export const PrintSchema = z.object({
950950 "print": z.number().int(),
951-});
951+}).strict();
952952 export type Print = z.infer<typeof PrintSchema>;
953953
954954 export const PrintMembersSchema = z.object({
955955 "printMembers": z.number().int(),
956-});
956+}).strict();
957957 export type PrintMembers = z.infer<typeof PrintMembersSchema>;
958958
959959 export const PrintfSchema = z.object({
960960 "printf": z.number().int(),
961-});
961+}).strict();
962962 export type Printf = z.infer<typeof PrintfSchema>;
963963
964964 export const PrivateSchema = z.object({
965965 "private": z.number().int(),
966-});
966+}).strict();
967967 export type Private = z.infer<typeof PrivateSchema>;
968968
969969 export const ProtectedSchema = z.object({
970970 "protected": z.number().int(),
971-});
971+}).strict();
972972 export type Protected = z.infer<typeof ProtectedSchema>;
973973
974974 export const ProtocolSchema = z.object({
975975 "Protocol": z.number().int(),
976-});
976+}).strict();
977977 export type Protocol = z.infer<typeof ProtocolSchema>;
978978
979979 export const SelfClassSchema = z.object({
980980 "self": z.number().int(),
981-});
981+}).strict();
982982 export type SelfClass = z.infer<typeof SelfClassSchema>;
983983
984984 export const TrueClassSchema = z.object({
985985 "true": z.number().int(),
986-});
986+}).strict();
987987 export type TrueClass = z.infer<typeof TrueClassSchema>;
988988
989989 export const TypeClassSchema = z.object({
990990 "type": z.number().int(),
991-});
991+}).strict();
992992 export type TypeClass = z.infer<typeof TypeClassSchema>;
993993
994994 export const PublicSchema = z.object({
995995 "public": z.number().int(),
996-});
996+}).strict();
997997 export type Public = z.infer<typeof PublicSchema>;
998998
999999 export const QuicktypeSchema = z.object({
10001000 "quicktype": z.number().int(),
1001-});
1001+}).strict();
10021002 export type Quicktype = z.infer<typeof QuicktypeSchema>;
10031003
10041004 export const RaiseSchema = z.object({
10051005 "raise": z.number().int(),
1006-});
1006+}).strict();
10071007 export type Raise = z.infer<typeof RaiseSchema>;
10081008
10091009 export const RangeSchema = z.object({
10101010 "range": z.number().int(),
1011-});
1011+}).strict();
10121012 export type Range = z.infer<typeof RangeSchema>;
10131013
10141014 export const ReadonlySchema = z.object({
10151015 "readonly": z.number().int(),
1016-});
1016+}).strict();
10171017 export type Readonly = z.infer<typeof ReadonlySchema>;
10181018
10191019 export const RefSchema = z.object({
10201020 "ref": z.number().int(),
1021-});
1021+}).strict();
10221022 export type Ref = z.infer<typeof RefSchema>;
10231023
10241024 export const RegisterSchema = z.object({
10251025 "register": z.number().int(),
1026-});
1026+}).strict();
10271027 export type Register = z.infer<typeof RegisterSchema>;
10281028
10291029 export const ReinterpretCastSchema = z.object({
10301030 "reinterpret_cast": z.number().int(),
1031-});
1031+}).strict();
10321032 export type ReinterpretCast = z.infer<typeof ReinterpretCastSchema>;
10331033
10341034 export const RepeatSchema = z.object({
10351035 "repeat": z.number().int(),
1036-});
1036+}).strict();
10371037 export type Repeat = z.infer<typeof RepeatSchema>;
10381038
10391039 export const RequireSchema = z.object({
10401040 "require": z.number().int(),
1041-});
1041+}).strict();
10421042 export type Require = z.infer<typeof RequireSchema>;
10431043
10441044 export const RequiredSchema = z.object({
10451045 "required": z.number().int(),
1046-});
1046+}).strict();
10471047 export type Required = z.infer<typeof RequiredSchema>;
10481048
10491049 export const RequiresSchema = z.object({
10501050 "requires": z.number().int(),
1051-});
1051+}).strict();
10521052 export type Requires = z.infer<typeof RequiresSchema>;
10531053
10541054 export const RestrictSchema = z.object({
10551055 "restrict": z.number().int(),
1056-});
1056+}).strict();
10571057 export type Restrict = z.infer<typeof RestrictSchema>;
10581058
10591059 export const RetainSchema = z.object({
10601060 "retain": z.number().int(),
1061-});
1061+}).strict();
10621062 export type Retain = z.infer<typeof RetainSchema>;
10631063
10641064 export const RethrowsSchema = z.object({
10651065 "rethrows": z.number().int(),
1066-});
1066+}).strict();
10671067 export type Rethrows = z.infer<typeof RethrowsSchema>;
10681068
10691069 export const ReturnSchema = z.object({
10701070 "return": z.number().int(),
1071-});
1071+}).strict();
10721072 export type Return = z.infer<typeof ReturnSchema>;
10731073
10741074 export const RightSchema = z.object({
10751075 "right": z.number().int(),
1076-});
1076+}).strict();
10771077 export type Right = z.infer<typeof RightSchema>;
10781078
10791079 export const SbyteSchema = z.object({
10801080 "sbyte": z.number().int(),
1081-});
1081+}).strict();
10821082 export type Sbyte = z.infer<typeof SbyteSchema>;
10831083
10841084 export const SealedSchema = z.object({
10851085 "sealed": z.number().int(),
1086-});
1086+}).strict();
10871087 export type Sealed = z.infer<typeof SealedSchema>;
10881088
10891089 export const SelSchema = z.object({
10901090 "SEL": z.number().int(),
1091-});
1091+}).strict();
10921092 export type Sel = z.infer<typeof SelSchema>;
10931093
10941094 export const SelectSchema = z.object({
10951095 "select": z.number().int(),
1096-});
1096+}).strict();
10971097 export type Select = z.infer<typeof SelectSchema>;
10981098
10991099 export const SelfSchema = z.object({
11001100 "Self": z.number().int(),
1101-});
1101+}).strict();
11021102 export type Self = z.infer<typeof SelfSchema>;
11031103
11041104 export const SerializeSchema = z.object({
11051105 "serialize": z.number().int(),
1106-});
1106+}).strict();
11071107 export type Serialize = z.infer<typeof SerializeSchema>;
11081108
11091109 export const SetSchema = z.object({
11101110 "set": z.number().int(),
1111-});
1111+}).strict();
11121112 export type Set = z.infer<typeof SetSchema>;
11131113
11141114 export const ShortSchema = z.object({
11151115 "short": z.number().int(),
1116-});
1116+}).strict();
11171117 export type Short = z.infer<typeof ShortSchema>;
11181118
11191119 export const SignedSchema = z.object({
11201120 "signed": z.number().int(),
1121-});
1121+}).strict();
11221122 export type Signed = z.infer<typeof SignedSchema>;
11231123
11241124 export const SizeofSchema = z.object({
11251125 "sizeof": z.number().int(),
1126-});
1126+}).strict();
11271127 export type Sizeof = z.infer<typeof SizeofSchema>;
11281128
11291129 export const StackallocSchema = z.object({
11301130 "stackalloc": z.number().int(),
1131-});
1131+}).strict();
11321132 export type Stackalloc = z.infer<typeof StackallocSchema>;
11331133
11341134 export const StaticSchema = z.object({
11351135 "static": z.number().int(),
1136-});
1136+}).strict();
11371137 export type Static = z.infer<typeof StaticSchema>;
11381138
11391139 export const StaticAssertSchema = z.object({
11401140 "static_assert": z.number().int(),
1141-});
1141+}).strict();
11421142 export type StaticAssert = z.infer<typeof StaticAssertSchema>;
11431143
11441144 export const StaticCastSchema = z.object({
11451145 "static_cast": z.number().int(),
1146-});
1146+}).strict();
11471147 export type StaticCast = z.infer<typeof StaticCastSchema>;
11481148
11491149 export const StrictfpSchema = z.object({
11501150 "strictfp": z.number().int(),
1151-});
1151+}).strict();
11521152 export type Strictfp = z.infer<typeof StrictfpSchema>;
11531153
11541154 export const StringClassSchema = z.object({
11551155 "string": z.number().int(),
1156-});
1156+}).strict();
11571157 export type StringClass = z.infer<typeof StringClassSchema>;
11581158
11591159 export const StructSchema = z.object({
11601160 "struct": z.number().int(),
1161-});
1161+}).strict();
11621162 export type Struct = z.infer<typeof StructSchema>;
11631163
11641164 export const SubscriptSchema = z.object({
11651165 "subscript": z.number().int(),
1166-});
1166+}).strict();
11671167 export type Subscript = z.infer<typeof SubscriptSchema>;
11681168
11691169 export const SuperSchema = z.object({
11701170 "super": z.number().int(),
1171-});
1171+}).strict();
11721172 export type Super = z.infer<typeof SuperSchema>;
11731173
11741174 export const SwitchSchema = z.object({
11751175 "switch": z.number().int(),
1176-});
1176+}).strict();
11771177 export type Switch = z.infer<typeof SwitchSchema>;
11781178
11791179 export const SymbolSchema = z.object({
11801180 "symbol": z.number().int(),
1181-});
1181+}).strict();
11821182 export type Symbol = z.infer<typeof SymbolSchema>;
11831183
11841184 export const SynchronizedSchema = z.object({
11851185 "synchronized": z.number().int(),
1186-});
1186+}).strict();
11871187 export type Synchronized = z.infer<typeof SynchronizedSchema>;
11881188
11891189 export const SystemSchema = z.object({
11901190 "system": z.number().int(),
1191-});
1191+}).strict();
11921192 export type System = z.infer<typeof SystemSchema>;
11931193
11941194 export const TemplateSchema = z.object({
11951195 "template": z.number().int(),
1196-});
1196+}).strict();
11971197 export type Template = z.infer<typeof TemplateSchema>;
11981198
11991199 export const ThenSchema = z.object({
12001200 "then": z.number().int(),
1201-});
1201+}).strict();
12021202 export type Then = z.infer<typeof ThenSchema>;
12031203
12041204 export const ThisSchema = z.object({
12051205 "this": z.number().int(),
1206-});
1206+}).strict();
12071207 export type This = z.infer<typeof ThisSchema>;
12081208
12091209 export const ThreadLocalSchema = z.object({
12101210 "thread_local": z.number().int(),
1211-});
1211+}).strict();
12121212 export type ThreadLocal = z.infer<typeof ThreadLocalSchema>;
12131213
12141214 export const ThrowSchema = z.object({
12151215 "throw": z.number().int(),
1216-});
1216+}).strict();
12171217 export type Throw = z.infer<typeof ThrowSchema>;
12181218
12191219 export const ThrowsSchema = z.object({
12201220 "throws": z.number().int(),
1221-});
1221+}).strict();
12221222 export type Throws = z.infer<typeof ThrowsSchema>;
12231223
12241224 export const ToJsonSchema = z.object({
12251225 "to_json": z.number().int(),
1226-});
1226+}).strict();
12271227 export type ToJson = z.infer<typeof ToJsonSchema>;
12281228
12291229 export const TopLevelClassSchema = z.object({
12301230 "top_level": z.number().int(),
1231-});
1231+}).strict();
12321232 export type TopLevelClass = z.infer<typeof TopLevelClassSchema>;
12331233
12341234 export const TransientSchema = z.object({
12351235 "transient": z.number().int(),
1236-});
1236+}).strict();
12371237 export type Transient = z.infer<typeof TransientSchema>;
12381238
12391239 export const TrueSchema = z.object({
12401240 "True": z.number().int(),
1241-});
1241+}).strict();
12421242 export type True = z.infer<typeof TrueSchema>;
12431243
12441244 export const TrySchema = z.object({
12451245 "try": z.number().int(),
1246-});
1246+}).strict();
12471247 export type Try = z.infer<typeof TrySchema>;
12481248
12491249 export const TypeSchema = z.object({
12501250 "Type": z.number().int(),
1251-});
1251+}).strict();
12521252 export type Type = z.infer<typeof TypeSchema>;
12531253
12541254 export const TypealiasSchema = z.object({
12551255 "typealias": z.number().int(),
1256-});
1256+}).strict();
12571257 export type Typealias = z.infer<typeof TypealiasSchema>;
12581258
12591259 export const TypedefSchema = z.object({
12601260 "typedef": z.number().int(),
1261-});
1261+}).strict();
12621262 export type Typedef = z.infer<typeof TypedefSchema>;
12631263
12641264 export const TypeidSchema = z.object({
12651265 "typeid": z.number().int(),
1266-});
1266+}).strict();
12671267 export type Typeid = z.infer<typeof TypeidSchema>;
12681268
12691269 export const TypenameSchema = z.object({
12701270 "typename": z.number().int(),
1271-});
1271+}).strict();
12721272 export type Typename = z.infer<typeof TypenameSchema>;
12731273
12741274 export const TypeofSchema = z.object({
12751275 "typeof": z.number().int(),
1276-});
1276+}).strict();
12771277 export type Typeof = z.infer<typeof TypeofSchema>;
12781278
12791279 export const UintSchema = z.object({
12801280 "uint": z.number().int(),
1281-});
1281+}).strict();
12821282 export type Uint = z.infer<typeof UintSchema>;
12831283
12841284 export const UlongSchema = z.object({
12851285 "ulong": z.number().int(),
1286-});
1286+}).strict();
12871287 export type Ulong = z.infer<typeof UlongSchema>;
12881288
12891289 export const UncheckedSchema = z.object({
12901290 "unchecked": z.number().int(),
1291-});
1291+}).strict();
12921292 export type Unchecked = z.infer<typeof UncheckedSchema>;
12931293
12941294 export const UndefinedSchema = z.object({
12951295 "undefined": z.number().int(),
1296-});
1296+}).strict();
12971297 export type Undefined = z.infer<typeof UndefinedSchema>;
12981298
12991299 export const UnionSchema = z.object({
13001300 "union": z.number().int(),
1301-});
1301+}).strict();
13021302 export type Union = z.infer<typeof UnionSchema>;
13031303
13041304 export const UnownedSchema = z.object({
13051305 "unowned": z.number().int(),
1306-});
1306+}).strict();
13071307 export type Unowned = z.infer<typeof UnownedSchema>;
13081308
13091309 export const UnsafeSchema = z.object({
13101310 "unsafe": z.number().int(),
1311-});
1311+}).strict();
13121312 export type Unsafe = z.infer<typeof UnsafeSchema>;
13131313
13141314 export const UnsignedSchema = z.object({
13151315 "unsigned": z.number().int(),
1316-});
1316+}).strict();
13171317 export type Unsigned = z.infer<typeof UnsignedSchema>;
13181318
13191319 export const UshortSchema = z.object({
13201320 "ushort": z.number().int(),
1321-});
1321+}).strict();
13221322 export type Ushort = z.infer<typeof UshortSchema>;
13231323
13241324 export const UsingSchema = z.object({
13251325 "using": z.number().int(),
1326-});
1326+}).strict();
13271327 export type Using = z.infer<typeof UsingSchema>;
13281328
13291329 export const VarSchema = z.object({
13301330 "var": z.number().int(),
1331-});
1331+}).strict();
13321332 export type Var = z.infer<typeof VarSchema>;
13331333
13341334 export const VirtualSchema = z.object({
13351335 "virtual": z.number().int(),
1336-});
1336+}).strict();
13371337 export type Virtual = z.infer<typeof VirtualSchema>;
13381338
13391339 export const VoidSchema = z.object({
13401340 "void": z.number().int(),
1341-});
1341+}).strict();
13421342 export type Void = z.infer<typeof VoidSchema>;
13431343
13441344 export const VolatileSchema = z.object({
13451345 "volatile": z.number().int(),
1346-});
1346+}).strict();
13471347 export type Volatile = z.infer<typeof VolatileSchema>;
13481348
13491349 export const WcharTSchema = z.object({
13501350 "wchar_t": z.number().int(),
1351-});
1351+}).strict();
13521352 export type WcharT = z.infer<typeof WcharTSchema>;
13531353
13541354 export const WeakSchema = z.object({
13551355 "weak": z.number().int(),
1356-});
1356+}).strict();
13571357 export type Weak = z.infer<typeof WeakSchema>;
13581358
13591359 export const WhereSchema = z.object({
13601360 "where": z.number().int(),
1361-});
1361+}).strict();
13621362 export type Where = z.infer<typeof WhereSchema>;
13631363
13641364 export const WhileSchema = z.object({
13651365 "while": z.number().int(),
1366-});
1366+}).strict();
13671367 export type While = z.infer<typeof WhileSchema>;
13681368
13691369 export const WillSetSchema = z.object({
13701370 "willSet": z.number().int(),
1371-});
1371+}).strict();
13721372 export type WillSet = z.infer<typeof WillSetSchema>;
13731373
13741374 export const WithSchema = z.object({
13751375 "with": z.number().int(),
1376-});
1376+}).strict();
13771377 export type With = z.infer<typeof WithSchema>;
13781378
13791379 export const XorSchema = z.object({
13801380 "xor": z.number().int(),
1381-});
1381+}).strict();
13821382 export type Xor = z.infer<typeof XorSchema>;
13831383
13841384 export const XorEqSchema = z.object({
13851385 "xor_eq": z.number().int(),
1386-});
1386+}).strict();
13871387 export type XorEq = z.infer<typeof XorEqSchema>;
13881388
13891389 export const YesSchema = z.object({
13901390 "YES": z.number().int(),
1391-});
1391+}).strict();
13921392 export type Yes = z.infer<typeof YesSchema>;
13931393
13941394 export const YieldSchema = z.object({
13951395 "yield": z.number().int(),
1396-});
1396+}).strict();
13971397 export type Yield = z.infer<typeof YieldSchema>;
13981398
13991399 export const Obj1Schema = z.object({
@@ -1463,7 +1463,7 @@ export const Obj1Schema = z.object({
14631463 "_Bool": BoolClassSchema,
14641464 "class": Obj1ClassSchema,
14651465 "bool": Obj1BoolSchema,
1466-});
1466+}).strict();
14671467 export type Obj1 = z.infer<typeof Obj1Schema>;
14681468
14691469 export const Obj2Schema = z.object({
@@ -1533,7 +1533,7 @@ export const Obj2Schema = z.object({
15331533 "interface": InterfaceSchema,
15341534 "internal": InternalSchema,
15351535 "false": FalseClassSchema,
1536-});
1536+}).strict();
15371537 export type Obj2 = z.infer<typeof Obj2Schema>;
15381538
15391539 export const Obj3Schema = z.object({
@@ -1603,7 +1603,7 @@ export const Obj3Schema = z.object({
16031603 "private": PrivateSchema,
16041604 "protected": ProtectedSchema,
16051605 "Protocol": ProtocolSchema,
1606-});
1606+}).strict();
16071607 export type Obj3 = z.infer<typeof Obj3Schema>;
16081608
16091609 export const Obj4Schema = z.object({
@@ -1672,7 +1672,7 @@ export const Obj4Schema = z.object({
16721672 "ulong": UlongSchema,
16731673 "unchecked": UncheckedSchema,
16741674 "undefined": UndefinedSchema,
1675-});
1675+}).strict();
16761676 export type Obj4 = z.infer<typeof Obj4Schema>;
16771677
16781678 export const Obj5Schema = z.object({
@@ -1697,7 +1697,7 @@ export const Obj5Schema = z.object({
16971697 "xor_eq": XorEqSchema,
16981698 "YES": YesSchema,
16991699 "yield": YieldSchema,
1700-});
1700+}).strict();
17011701 export type Obj5 = z.infer<typeof Obj5Schema>;
17021702
17031703 export const TopLevelSchema = z.object({
@@ -1707,5 +1707,5 @@ export const TopLevelSchema = z.object({
17071707 "obj3": Obj3Schema,
17081708 "obj4": Obj4Schema,
17091709 "obj5": Obj5Schema,
1710-});
1710+}).strict();
17111711 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/priority/kotlin-enum-class-case-collision.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -9,7 +9,7 @@ export type Category = z.infer<typeof CategorySchema>;
99
1010 export const TopLevelElementSchema = z.object({
1111 "category": CategorySchema,
12-});
12+}).strict();
1313 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
1414
1515 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/priority/list.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -9,5 +9,5 @@ export const TopLevelSchema: z.ZodType<TopLevel> = z.lazy(() =>
99 z.object({
1010 "data": z.number().int(),
1111 "next": z.union([z.null(), TopLevelSchema]),
12- })
12+ }).strict()
1313 );
Test case

test/inputs/json/priority/name-style.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -9,5 +9,5 @@ export const TopLevelSchema = z.object({
99 "should_know_that_id_is_an_initialism": z.string(),
1010 " spaces are separators too ": z.boolean(),
1111 "ZSR_HH_DEMO3_DELMATNR": z.boolean(),
12-});
12+}).strict();
1313 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/priority/nbl-stats.json

1 generated file · +13 −13
Mtypescript-zoddefault / TopLevel.ts+13 −13
@@ -95,7 +95,7 @@ export const TeamSchema = z.object({
9595 "teamCodeInternational": z.string(),
9696 "teamName": z.string(),
9797 "teamNameInternational": z.string(),
98-});
98+}).strict();
9999 export type Team = z.infer<typeof TeamSchema>;
100100
101101 export const PbpSchema = z.object({
@@ -123,14 +123,14 @@ export const PbpSchema = z.object({
123123 "subType": z.string(),
124124 "success": z.number().int(),
125125 "tno": z.number().int(),
126-});
126+}).strict();
127127 export type Pbp = z.infer<typeof PbpSchema>;
128128
129129 export const TimeSchema = z.object({
130130 "gt": z.string(),
131131 "per": z.number().int(),
132132 "perType": PerTypeSchema,
133-});
133+}).strict();
134134 export type Time = z.infer<typeof TimeSchema>;
135135
136136 export const CompSchema = z.object({
@@ -138,7 +138,7 @@ export const CompSchema = z.object({
138138 "sMinutesAverage": z.string(),
139139 "sPointsAverage": z.number(),
140140 "sReboundsTotalAverage": z.number(),
141-});
141+}).strict();
142142 export type Comp = z.infer<typeof CompSchema>;
143143
144144 export const ShotSchema = z.object({
@@ -154,7 +154,7 @@ export const ShotSchema = z.object({
154154 "tno": z.number().int(),
155155 "x": z.number().int(),
156156 "y": z.number().int(),
157-});
157+}).strict();
158158 export type Shot = z.infer<typeof ShotSchema>;
159159
160160 export const OthermatchSchema = z.object({
@@ -169,7 +169,7 @@ export const OthermatchSchema = z.object({
169169 "team2": TeamSchema,
170170 "team2Name": z.string(),
171171 "team2Score": z.number().int(),
172-});
172+}).strict();
173173 export type Othermatch = z.infer<typeof OthermatchSchema>;
174174
175175 export const ScorerSchema = z.object({
@@ -193,12 +193,12 @@ export const ScorerSchema = z.object({
193193 "times": z.array(TimeSchema).optional(),
194194 "tno": z.number().int(),
195195 "tot": z.number().int().optional(),
196-});
196+}).strict();
197197 export type Scorer = z.infer<typeof ScorerSchema>;
198198
199199 export const SBlocksSchema = z.object({
200200 "1": ScorerSchema,
201-});
201+}).strict();
202202 export type SBlocks = z.infer<typeof SBlocksSchema>;
203203
204204 export const PlSchema = z.object({
@@ -252,7 +252,7 @@ export const PlSchema = z.object({
252252 "sTwoPointersPercentage": z.number().int(),
253253 "shirtNumber": z.string().regex(/^-?\d+$/),
254254 "starter": z.number().int(),
255-});
255+}).strict();
256256 export type Pl = z.infer<typeof PlSchema>;
257257
258258 export const TotalldsSchema = z.object({
@@ -261,7 +261,7 @@ export const TotalldsSchema = z.object({
261261 "sPoints": z.record(z.string(), ScorerSchema),
262262 "sReboundsTotal": z.record(z.string(), ScorerSchema),
263263 "sSteals": z.record(z.string(), ScorerSchema),
264-});
264+}).strict();
265265 export type Totallds = z.infer<typeof TotalldsSchema>;
266266
267267 export const LdsSchema = z.object({
@@ -270,7 +270,7 @@ export const LdsSchema = z.object({
270270 "sPoints": z.record(z.string(), ScorerSchema),
271271 "sReboundsTotal": z.record(z.string(), ScorerSchema),
272272 "sSteals": z.record(z.string(), ScorerSchema),
273-});
273+}).strict();
274274 export type Lds = z.infer<typeof LdsSchema>;
275275
276276 export const TmSchema = z.object({
@@ -339,7 +339,7 @@ export const TmSchema = z.object({
339339 "tot_sTwoPointersAttempted": z.number().int(),
340340 "tot_sTwoPointersMade": z.number().int(),
341341 "tot_sTwoPointersPercentage": z.number().int(),
342-});
342+}).strict();
343343 export type Tm = z.infer<typeof TmSchema>;
344344
345345 export const TopLevelSchema = z.object({
@@ -363,5 +363,5 @@ export const TopLevelSchema = z.object({
363363 "tm": z.record(z.string(), TmSchema),
364364 "totalTimeAdded": z.number().int(),
365365 "totallds": TotalldsSchema,
366-});
366+}).strict();
367367 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/priority/nested-objects.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -4,5 +4,5 @@ import * as z from "zod";
44 export const TopLevelSchema = z.object({
55 "a": z.record(z.string(), z.number().int()),
66 "b": z.record(z.string(), z.number().int()),
7-});
7+}).strict();
88 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/priority/nst-test-suite.json

1 generated file · +12 −12
Mtypescript-zoddefault / TopLevel.ts+12 −12
@@ -2,60 +2,60 @@ import * as z from "zod";
22
33
44 export const JsonSchema = z.object({
5-});
5+}).strict();
66 export type Json = z.infer<typeof JsonSchema>;
77
88 export const YObjectBasicJsonSchema = z.object({
99 "asd": z.string(),
10-});
10+}).strict();
1111 export type YObjectBasicJson = z.infer<typeof YObjectBasicJsonSchema>;
1212
1313 export const YObjectEmptyKeyJsonSchema = z.object({
1414 "": z.number().int(),
15-});
15+}).strict();
1616 export type YObjectEmptyKeyJson = z.infer<typeof YObjectEmptyKeyJsonSchema>;
1717
1818 export const YObjectEscapedNullInKeyJsonSchema = z.object({
1919 "foo\u0000bar": z.number().int(),
20-});
20+}).strict();
2121 export type YObjectEscapedNullInKeyJson = z.infer<typeof YObjectEscapedNullInKeyJsonSchema>;
2222
2323 export const YObjectExtremeNumbersJsonSchema = z.object({
2424 "max": z.number(),
2525 "min": z.number(),
26-});
26+}).strict();
2727 export type YObjectExtremeNumbersJson = z.infer<typeof YObjectExtremeNumbersJsonSchema>;
2828
2929 export const YObjectJsonSchema = z.object({
3030 "asd": z.string(),
3131 "dfg": z.string(),
32-});
32+}).strict();
3333 export type YObjectJson = z.infer<typeof YObjectJsonSchema>;
3434
3535 export const XSchema = z.object({
3636 "id": z.string(),
37-});
37+}).strict();
3838 export type X = z.infer<typeof XSchema>;
3939
4040 export const YObjectSimpleJsonSchema = z.object({
4141 "a": z.array(z.any()),
42-});
42+}).strict();
4343 export type YObjectSimpleJson = z.infer<typeof YObjectSimpleJsonSchema>;
4444
4545 export const YObjectStringUnicodeJsonSchema = z.object({
4646 "title": z.string(),
47-});
47+}).strict();
4848 export type YObjectStringUnicodeJson = z.infer<typeof YObjectStringUnicodeJsonSchema>;
4949
5050 export const YObjectWithNewlinesJsonSchema = z.object({
5151 "a": z.string(),
52-});
52+}).strict();
5353 export type YObjectWithNewlinesJson = z.infer<typeof YObjectWithNewlinesJsonSchema>;
5454
5555 export const YObjectLongStringsJsonSchema = z.object({
5656 "id": z.string(),
5757 "x": z.array(XSchema),
58-});
58+}).strict();
5959 export type YObjectLongStringsJson = z.infer<typeof YObjectLongStringsJsonSchema>;
6060
6161 export const TopLevelSchema = z.object({
@@ -152,5 +152,5 @@ export const TopLevelSchema = z.object({
152152 "y_structure_trailing_newline.json": z.array(z.string()),
153153 "y_structure_true_in_array.json": z.array(z.boolean()),
154154 "y_structure_whitespace_array.json": z.array(z.any()),
155-});
155+}).strict();
156156 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/priority/number-map.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -3,5 +3,5 @@ import * as z from "zod";
33
44 export const TopLevelSchema = z.object({
55 "foo": z.record(z.string(), z.number()),
6-});
6+}).strict();
77 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/priority/omit-empty.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -4,10 +4,10 @@ import * as z from "zod";
44 export const ResultSchema = z.object({
55 "age": z.number().int(),
66 "name": z.null().optional(),
7-});
7+}).strict();
88 export type Result = z.infer<typeof ResultSchema>;
99
1010 export const TopLevelSchema = z.object({
1111 "results": z.array(ResultSchema),
12-});
12+}).strict();
1313 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/priority/optional-union.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -3,7 +3,7 @@ import * as z from "zod";
33
44 export const TopLevelElementSchema = z.object({
55 "a": z.union([z.number().int(), z.string()]).optional(),
6-});
6+}).strict();
77 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
88
99 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/priority/php-mixed-union.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -3,10 +3,10 @@ import * as z from "zod";
33
44 export const MixedClassSchema = z.object({
55 "nested": z.string(),
6-});
6+}).strict();
77 export type MixedClass = z.infer<typeof MixedClassSchema>;
88
99 export const TopLevelSchema = z.object({
1010 "mixed": z.array(z.union([z.null(), z.boolean(), MixedClassSchema, z.number().int(), z.string()])),
11-});
11+}).strict();
1212 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/priority/php-validation.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -7,5 +7,5 @@ export const TopLevelSchema = z.object({
77 "integers": z.array(z.number().int()),
88 "number": z.number(),
99 "string": z.string(),
10-});
10+}).strict();
1111 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/priority/recursive.json

1 generated file · +17 −17
Mtypescript-zoddefault / TopLevel.ts+17 −17
@@ -7,7 +7,7 @@ export type Format = {
77 export const FormatSchema: z.ZodType<Format> = z.lazy(() =>
88 z.object({
99 "formats": FormatsClassSchema,
10- })
10+ }).strict()
1111 );
1212
1313 export type FormatsClass = {
@@ -22,40 +22,40 @@ export const FormatsClassSchema: z.ZodType<FormatsClass> = z.lazy(() =>
2222 "height": z.number().int(),
2323 "url": z.string(),
2424 "width": z.number().int(),
25- })
25+ }).strict()
2626 );
2727
2828 export const LinkLinkSchema = z.object({
2929 "type": z.string(),
3030 "url": z.string(),
31-});
31+}).strict();
3232 export type LinkLink = z.infer<typeof LinkLinkSchema>;
3333
3434 export const CategoryThumbnailSchema = z.object({
3535 "url": z.string(),
36-});
36+}).strict();
3737 export type CategoryThumbnail = z.infer<typeof CategoryThumbnailSchema>;
3838
3939 export const EonandyearSchema = z.object({
4040 "lowestsetbit": z.number().int(),
41-});
41+}).strict();
4242 export type Eonandyear = z.infer<typeof EonandyearSchema>;
4343
4444 export const XmlschematypeSchema = z.object({
4545 "localpart": z.string(),
4646 "namespaceuri": z.string(),
4747 "prefix": z.string(),
48-});
48+}).strict();
4949 export type Xmlschematype = z.infer<typeof XmlschematypeSchema>;
5050
5151 export const CurrencySchema = z.object({
5252 "abbreviation": z.string(),
53-});
53+}).strict();
5454 export type Currency = z.infer<typeof CurrencySchema>;
5555
5656 export const LinkElementSchema = z.object({
5757 "link": LinkLinkSchema,
58-});
58+}).strict();
5959 export type LinkElement = z.infer<typeof LinkElementSchema>;
6060
6161 export const DateClassSchema = z.object({
@@ -70,19 +70,19 @@ export const DateClassSchema = z.object({
7070 "valid": z.boolean(),
7171 "xmlschematype": XmlschematypeSchema,
7272 "year": z.number().int(),
73-});
73+}).strict();
7474 export type DateClass = z.infer<typeof DateClassSchema>;
7575
7676 export const UseraverageratingSchema = z.object({
7777 "links": z.array(LinkElementSchema),
7878 "numcomments": z.number().int(),
7979 "rating": z.string(),
80-});
80+}).strict();
8181 export type Useraveragerating = z.infer<typeof UseraverageratingSchema>;
8282
8383 export const SpecificationSchema = z.object({
8484 "links": z.array(LinkElementSchema),
85-});
85+}).strict();
8686 export type Specification = z.infer<typeof SpecificationSchema>;
8787
8888 export const CategorySchema = z.object({
@@ -94,7 +94,7 @@ export const CategorySchema = z.object({
9494 "name": z.string(),
9595 "parentcategoryid": z.number().int(),
9696 "thumbnail": CategoryThumbnailSchema,
97-});
97+}).strict();
9898 export type Category = z.infer<typeof CategorySchema>;
9999
100100 export const DetailsSchema = z.object({
@@ -105,12 +105,12 @@ export const DetailsSchema = z.object({
105105 "elapsedtime": z.number().int(),
106106 "message": z.string(),
107107 "status": z.string(),
108-});
108+}).strict();
109109 export type Details = z.infer<typeof DetailsSchema>;
110110
111111 export const RatingSchema = z.object({
112112 "useraveragerating": UseraverageratingSchema,
113-});
113+}).strict();
114114 export type Rating = z.infer<typeof RatingSchema>;
115115
116116 export const ProductProductSchema = z.object({
@@ -130,12 +130,12 @@ export const ProductProductSchema = z.object({
130130 "specification": SpecificationSchema,
131131 "thumbnail": FormatsClassSchema,
132132 "totalsellers": z.number().int(),
133-});
133+}).strict();
134134 export type ProductProduct = z.infer<typeof ProductProductSchema>;
135135
136136 export const ProductElementSchema = z.object({
137137 "product": ProductProductSchema,
138-});
138+}).strict();
139139 export type ProductElement = z.infer<typeof ProductElementSchema>;
140140
141141 export const TopLevelSchema = z.object({
@@ -149,5 +149,5 @@ export const TopLevelSchema = z.object({
149149 "totalpages": z.number().int(),
150150 "totalresultsavailable": z.number().int(),
151151 "totalresultsreturned": z.number().int(),
152-});
152+}).strict();
153153 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/priority/simple-identifiers.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -11,5 +11,5 @@ export const TopLevelSchema = z.object({
1111 "undefined": z.string(),
1212 "x": z.string(),
1313 "x y": z.string(),
14-});
14+}).strict();
1515 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/priority/union-constructor-clash.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -3,11 +3,11 @@ import * as z from "zod";
33
44 export const BoolInUnionSchema = z.object({
55 "a": z.boolean(),
6-});
6+}).strict();
77 export type BoolInUnion = z.infer<typeof BoolInUnionSchema>;
88
99 export const TopLevelSchema = z.object({
1010 "BoolInUnion": BoolInUnionSchema,
1111 "union": z.array(z.union([z.boolean(), z.number().int()])),
12-});
12+}).strict();
1313 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/priority/unions.json

1 generated file · +2 −2
Mtypescript-zoddefault / TopLevel.ts+2 −2
@@ -3,12 +3,12 @@ import * as z from "zod";
33
44 export const ZClassSchema = z.object({
55 "a": z.boolean(),
6-});
6+}).strict();
77 export type ZClass = z.infer<typeof ZClassSchema>;
88
99 export const TopLevelSchema = z.object({
1010 "x": z.array(z.union([z.null(), z.number().int(), z.string()])),
1111 "y": z.array(z.union([z.null(), z.number().int()])),
1212 "z": z.array(z.union([z.array(z.number().int()), ZClassSchema, z.number().int()])),
13-});
13+}).strict();
1414 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/priority/url.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -4,5 +4,5 @@ import * as z from "zod";
44 export const TopLevelSchema = z.object({
55 "fromURL": z.string(),
66 "url": z.string(),
7-});
7+}).strict();
88 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/priority/uuids.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -8,5 +8,5 @@ export const TopLevelSchema = z.object({
88 "stringValue": z.string(),
99 "uuidValue": z.string().uuid(),
1010 "uuidValues": z.array(z.string().uuid()),
11-});
11+}).strict();
1212 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/samples/bitcoin-block.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -7,5 +7,5 @@ export const TopLevelSchema = z.object({
77 "height": z.number().int(),
88 "time": z.number().int(),
99 "txIndexes": z.array(z.number().int()),
10-});
10+}).strict();
1111 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/samples/getting-started.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -4,5 +4,5 @@ import * as z from "zod";
44 export const TopLevelSchema = z.object({
55 "greeting": z.string(),
66 "instructions": z.array(z.string()),
7-});
7+}).strict();
88 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/samples/github-events.json

1 generated file · +17 −17
Mtypescript-zoddefault / TopLevel.ts+17 −17
@@ -14,7 +14,7 @@ export const ActorSchema = z.object({
1414 "id": z.number().int(),
1515 "login": z.string(),
1616 "url": z.string(),
17-});
17+}).strict();
1818 export type Actor = z.infer<typeof ActorSchema>;
1919
2020 export const UserSchema = z.object({
@@ -35,13 +35,13 @@ export const UserSchema = z.object({
3535 "subscriptions_url": z.string(),
3636 "type": TypeSchema,
3737 "url": z.string(),
38-});
38+}).strict();
3939 export type User = z.infer<typeof UserSchema>;
4040
4141 export const AuthorSchema = z.object({
4242 "email": z.string(),
4343 "name": z.string(),
44-});
44+}).strict();
4545 export type Author = z.infer<typeof AuthorSchema>;
4646
4747 export const LabelSchema = z.object({
@@ -50,7 +50,7 @@ export const LabelSchema = z.object({
5050 "id": z.number().int(),
5151 "name": z.string(),
5252 "url": z.string(),
53-});
53+}).strict();
5454 export type Label = z.infer<typeof LabelSchema>;
5555
5656 export const MilestoneSchema = z.object({
@@ -69,7 +69,7 @@ export const MilestoneSchema = z.object({
6969 "title": z.string(),
7070 "updated_at": z.coerce.date(),
7171 "url": z.string(),
72-});
72+}).strict();
7373 export type Milestone = z.infer<typeof MilestoneSchema>;
7474
7575 export const IssuePullRequestSchema = z.object({
@@ -77,7 +77,7 @@ export const IssuePullRequestSchema = z.object({
7777 "html_url": z.string(),
7878 "patch_url": z.string(),
7979 "url": z.string(),
80-});
80+}).strict();
8181 export type IssuePullRequest = z.infer<typeof IssuePullRequestSchema>;
8282
8383 export const BaseRepoSchema = z.object({
@@ -150,19 +150,19 @@ export const BaseRepoSchema = z.object({
150150 "url": z.string(),
151151 "watchers": z.number().int(),
152152 "watchers_count": z.number().int(),
153-});
153+}).strict();
154154 export type BaseRepo = z.infer<typeof BaseRepoSchema>;
155155
156156 export const CommentsSchema = z.object({
157157 "href": z.string(),
158-});
158+}).strict();
159159 export type Comments = z.infer<typeof CommentsSchema>;
160160
161161 export const TopLevelRepoSchema = z.object({
162162 "id": z.number().int(),
163163 "name": z.string(),
164164 "url": z.string(),
165-});
165+}).strict();
166166 export type TopLevelRepo = z.infer<typeof TopLevelRepoSchema>;
167167
168168 export const CommentSchema = z.object({
@@ -174,7 +174,7 @@ export const CommentSchema = z.object({
174174 "updated_at": z.coerce.date(),
175175 "url": z.string(),
176176 "user": UserSchema,
177-});
177+}).strict();
178178 export type Comment = z.infer<typeof CommentSchema>;
179179
180180 export const CommitSchema = z.object({
@@ -183,7 +183,7 @@ export const CommitSchema = z.object({
183183 "message": z.string(),
184184 "sha": z.string(),
185185 "url": z.string(),
186-});
186+}).strict();
187187 export type Commit = z.infer<typeof CommitSchema>;
188188
189189 export const IssueSchema = z.object({
@@ -209,7 +209,7 @@ export const IssueSchema = z.object({
209209 "updated_at": z.coerce.date(),
210210 "url": z.string(),
211211 "user": UserSchema,
212-});
212+}).strict();
213213 export type Issue = z.infer<typeof IssueSchema>;
214214
215215 export const BaseSchema = z.object({
@@ -218,7 +218,7 @@ export const BaseSchema = z.object({
218218 "repo": BaseRepoSchema,
219219 "sha": z.string(),
220220 "user": UserSchema,
221-});
221+}).strict();
222222 export type Base = z.infer<typeof BaseSchema>;
223223
224224 export const LinksSchema = z.object({
@@ -230,7 +230,7 @@ export const LinksSchema = z.object({
230230 "review_comments": CommentsSchema,
231231 "self": CommentsSchema,
232232 "statuses": CommentsSchema,
233-});
233+}).strict();
234234 export type Links = z.infer<typeof LinksSchema>;
235235
236236 export const PayloadPullRequestSchema = z.object({
@@ -275,7 +275,7 @@ export const PayloadPullRequestSchema = z.object({
275275 "updated_at": z.coerce.date(),
276276 "url": z.string(),
277277 "user": UserSchema,
278-});
278+}).strict();
279279 export type PayloadPullRequest = z.infer<typeof PayloadPullRequestSchema>;
280280
281281 export const PayloadSchema = z.object({
@@ -295,7 +295,7 @@ export const PayloadSchema = z.object({
295295 "ref": z.string().optional(),
296296 "ref_type": z.string().optional(),
297297 "size": z.number().int().optional(),
298-});
298+}).strict();
299299 export type Payload = z.infer<typeof PayloadSchema>;
300300
301301 export const TopLevelElementSchema = z.object({
@@ -307,7 +307,7 @@ export const TopLevelElementSchema = z.object({
307307 "public": z.boolean(),
308308 "repo": TopLevelRepoSchema,
309309 "type": z.string(),
310-});
310+}).strict();
311311 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
312312
313313 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/json/samples/kitchen-sink.json

1 generated file · +4 −4
Mtypescript-zoddefault / TopLevel.ts+4 −4
@@ -3,20 +3,20 @@ import * as z from "zod";
33
44 export const DifferentThingClassSchema = z.object({
55 "name": z.string(),
6-});
6+}).strict();
77 export type DifferentThingClass = z.infer<typeof DifferentThingClassSchema>;
88
99 export const PersonElementSchema = z.object({
1010 "intOrString": z.union([z.number().int(), z.string().regex(/^-?\d+$/).transform(Number)]),
1111 "name": z.string(),
1212 "optionalValue": z.boolean().optional(),
13-});
13+}).strict();
1414 export type PersonElement = z.infer<typeof PersonElementSchema>;
1515
1616 export const PurplePersonSchema = z.object({
1717 "intOrString": z.number().int(),
1818 "name": z.string(),
19-});
19+}).strict();
2020 export type PurplePerson = z.infer<typeof PurplePersonSchema>;
2121
2222 export const TopLevelSchema = z.object({
@@ -34,5 +34,5 @@ export const TopLevelSchema = z.object({
3434 "stringValue": z.string(),
3535 "tuples": z.array(z.array(z.union([z.number().int(), z.string()]))),
3636 "uuidValue": z.string(),
37-});
37+}).strict();
3838 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/samples/null-safe.json

1 generated file · +3 −3
Mtypescript-zoddefault / TopLevel.ts+3 −3
@@ -5,7 +5,7 @@ export const AddressSchema = z.object({
55 "city": z.string(),
66 "country": z.string(),
77 "street": z.string(),
8-});
8+}).strict();
99 export type Address = z.infer<typeof AddressSchema>;
1010
1111 export const ItemSchema = z.object({
@@ -13,10 +13,10 @@ export const ItemSchema = z.object({
1313 "created_at": z.coerce.date().optional(),
1414 "name": z.string(),
1515 "sex": z.union([z.null(), z.number().int()]),
16-});
16+}).strict();
1717 export type Item = z.infer<typeof ItemSchema>;
1818
1919 export const TopLevelSchema = z.object({
2020 "item": z.array(ItemSchema),
21-});
21+}).strict();
2222 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/samples/pokedex.json

1 generated file · +3 −3
Mtypescript-zoddefault / TopLevel.ts+3 −3
@@ -36,7 +36,7 @@ export type Type = z.infer<typeof TypeSchema>;
3636 export const EvolutionSchema = z.object({
3737 "name": z.string(),
3838 "num": z.string(),
39-});
39+}).strict();
4040 export type Evolution = z.infer<typeof EvolutionSchema>;
4141
4242 export const PokemonSchema = z.object({
@@ -57,10 +57,10 @@ export const PokemonSchema = z.object({
5757 "type": z.array(TypeSchema),
5858 "weaknesses": z.array(TypeSchema),
5959 "weight": z.string(),
60-});
60+}).strict();
6161 export type Pokemon = z.infer<typeof PokemonSchema>;
6262
6363 export const TopLevelSchema = z.object({
6464 "pokemon": z.array(PokemonSchema),
65-});
65+}).strict();
6666 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/samples/reddit.json

1 generated file · +10 −10
Mtypescript-zoddefault / TopLevel.ts+10 −10
@@ -53,26 +53,26 @@ export const KindSchema = z.enum([
5353 export type Kind = z.infer<typeof KindSchema>;
5454
5555 export const MediaEmbedSchema = z.object({
56-});
56+}).strict();
5757 export type MediaEmbed = z.infer<typeof MediaEmbedSchema>;
5858
5959 export const SourceSchema = z.object({
6060 "height": z.number().int(),
6161 "url": z.string(),
6262 "width": z.number().int(),
63-});
63+}).strict();
6464 export type Source = z.infer<typeof SourceSchema>;
6565
6666 export const GifSchema = z.object({
6767 "resolutions": z.array(SourceSchema),
6868 "source": SourceSchema,
69-});
69+}).strict();
7070 export type Gif = z.infer<typeof GifSchema>;
7171
7272 export const VariantsSchema = z.object({
7373 "gif": GifSchema.optional(),
7474 "mp4": GifSchema.optional(),
75-});
75+}).strict();
7676 export type Variants = z.infer<typeof VariantsSchema>;
7777
7878 export const ImageSchema = z.object({
@@ -80,13 +80,13 @@ export const ImageSchema = z.object({
8080 "resolutions": z.array(SourceSchema),
8181 "source": SourceSchema,
8282 "variants": VariantsSchema,
83-});
83+}).strict();
8484 export type Image = z.infer<typeof ImageSchema>;
8585
8686 export const PreviewSchema = z.object({
8787 "enabled": z.boolean(),
8888 "images": z.array(ImageSchema),
89-});
89+}).strict();
9090 export type Preview = z.infer<typeof PreviewSchema>;
9191
9292 export const ChildDataSchema = z.object({
@@ -156,13 +156,13 @@ export const ChildDataSchema = z.object({
156156 "view_count": z.null(),
157157 "visited": z.boolean(),
158158 "whitelist_status": WhitelistStatusSchema,
159-});
159+}).strict();
160160 export type ChildData = z.infer<typeof ChildDataSchema>;
161161
162162 export const ChildSchema = z.object({
163163 "data": ChildDataSchema,
164164 "kind": KindSchema,
165-});
165+}).strict();
166166 export type Child = z.infer<typeof ChildSchema>;
167167
168168 export const TopLevelDataSchema = z.object({
@@ -170,11 +170,11 @@ export const TopLevelDataSchema = z.object({
170170 "before": z.null(),
171171 "children": z.array(ChildSchema),
172172 "modhash": z.string(),
173-});
173+}).strict();
174174 export type TopLevelData = z.infer<typeof TopLevelDataSchema>;
175175
176176 export const TopLevelSchema = z.object({
177177 "data": TopLevelDataSchema,
178178 "kind": z.string(),
179-});
179+}).strict();
180180 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/samples/simple-object.json

1 generated file · +1 −1
Mtypescript-zoddefault / TopLevel.ts+1 −1
@@ -5,5 +5,5 @@ export const TopLevelSchema = z.object({
55 "date": z.number().int(),
66 "title": z.string(),
77 "validity": z.boolean(),
8-});
8+}).strict();
99 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/samples/spotify-album.json

1 generated file · +8 −8
Mtypescript-zoddefault / TopLevel.ts+8 −8
@@ -3,25 +3,25 @@ import * as z from "zod";
33
44 export const ExternalUrlsSchema = z.object({
55 "spotify": z.string(),
6-});
6+}).strict();
77 export type ExternalUrls = z.infer<typeof ExternalUrlsSchema>;
88
99 export const CopyrightSchema = z.object({
1010 "text": z.string(),
1111 "type": z.string(),
12-});
12+}).strict();
1313 export type Copyright = z.infer<typeof CopyrightSchema>;
1414
1515 export const ExternalIdsSchema = z.object({
1616 "upc": z.string(),
17-});
17+}).strict();
1818 export type ExternalIds = z.infer<typeof ExternalIdsSchema>;
1919
2020 export const ImageSchema = z.object({
2121 "height": z.number().int(),
2222 "url": z.string(),
2323 "width": z.number().int(),
24-});
24+}).strict();
2525 export type Image = z.infer<typeof ImageSchema>;
2626
2727 export const ArtistSchema = z.object({
@@ -31,7 +31,7 @@ export const ArtistSchema = z.object({
3131 "name": z.string(),
3232 "type": z.string(),
3333 "uri": z.string(),
34-});
34+}).strict();
3535 export type Artist = z.infer<typeof ArtistSchema>;
3636
3737 export const ItemSchema = z.object({
@@ -48,7 +48,7 @@ export const ItemSchema = z.object({
4848 "track_number": z.number().int(),
4949 "type": z.string(),
5050 "uri": z.string(),
51-});
51+}).strict();
5252 export type Item = z.infer<typeof ItemSchema>;
5353
5454 export const TracksSchema = z.object({
@@ -59,7 +59,7 @@ export const TracksSchema = z.object({
5959 "offset": z.number().int(),
6060 "previous": z.null(),
6161 "total": z.number().int(),
62-});
62+}).strict();
6363 export type Tracks = z.infer<typeof TracksSchema>;
6464
6565 export const TopLevelSchema = z.object({
@@ -80,5 +80,5 @@ export const TopLevelSchema = z.object({
8080 "tracks": TracksSchema,
8181 "type": z.string(),
8282 "uri": z.string(),
83-});
83+}).strict();
8484 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/samples/us-avg-temperatures.json

1 generated file · +3 −3
Mtypescript-zoddefault / TopLevel.ts+3 −3
@@ -4,7 +4,7 @@ import * as z from "zod";
44 export const DatumSchema = z.object({
55 "anomaly": z.string(),
66 "value": z.string(),
7-});
7+}).strict();
88 export type Datum = z.infer<typeof DatumSchema>;
99
1010 export const DescriptionSchema = z.object({
@@ -12,11 +12,11 @@ export const DescriptionSchema = z.object({
1212 "missing": z.number().int(),
1313 "title": z.string(),
1414 "units": z.string(),
15-});
15+}).strict();
1616 export type Description = z.infer<typeof DescriptionSchema>;
1717
1818 export const TopLevelSchema = z.object({
1919 "data": z.record(z.string(), DatumSchema),
2020 "description": DescriptionSchema,
21-});
21+}).strict();
2222 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/json/samples/us-senators.json

1 generated file · +5 −5
Mtypescript-zoddefault / TopLevel.ts+5 −5
@@ -82,7 +82,7 @@ export const MetaSchema = z.object({
8282 "limit": z.number().int(),
8383 "offset": z.number().int(),
8484 "total_count": z.number().int(),
85-});
85+}).strict();
8686 export type Meta = z.infer<typeof MetaSchema>;
8787
8888 export const ExtraSchema = z.object({
@@ -91,7 +91,7 @@ export const ExtraSchema = z.object({
9191 "fax": z.string().optional(),
9292 "office": z.string(),
9393 "rss_url": z.string().optional(),
94-});
94+}).strict();
9595 export type Extra = z.infer<typeof ExtraSchema>;
9696
9797 export const PersonSchema = z.object({
@@ -112,7 +112,7 @@ export const PersonSchema = z.object({
112112 "sortname": z.string(),
113113 "twitterid": z.union([z.null(), z.string()]),
114114 "youtubeid": z.union([z.null(), z.string()]),
115-});
115+}).strict();
116116 export type Person = z.infer<typeof PersonSchema>;
117117
118118 export const ObjectElementSchema = z.object({
@@ -138,11 +138,11 @@ export const ObjectElementSchema = z.object({
138138 "title": TitleSchema,
139139 "title_long": RoleTypeLabelSchema,
140140 "website": z.string(),
141-});
141+}).strict();
142142 export type ObjectElement = z.infer<typeof ObjectElementSchema>;
143143
144144 export const TopLevelSchema = z.object({
145145 "meta": MetaSchema,
146146 "objects": z.array(ObjectElementSchema),
147-});
147+}).strict();
148148 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/accessors.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -13,5 +13,5 @@ export const TopLevelSchema = z.object({
1313 "enum": EnumSchema,
1414 "foo": z.string(),
1515 "union": z.union([z.boolean(), z.number()]),
16-});
16+}).strict();
1717 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/all-of-additional-properties-false.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -20,5 +20,5 @@ export const TopLevelSchema = z.object({
2020 "frequency": FrequencySchema,
2121 "description": z.string().optional(),
2222 "type": TypeSchema,
23-});
23+}).strict();
2424 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/any.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -4,5 +4,5 @@ import * as z from "zod";
44 export const TopLevelSchema = z.object({
55 "foo": z.any(),
66 "values": z.record(z.string(), z.any()),
7-});
7+}).passthrough();
88 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/bool-string.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -14,5 +14,5 @@ export const TopLevelSchema = z.object({
1414 "optional": z.enum(["true", "false"]).optional(),
1515 "unionWithBool": z.union([z.boolean(), z.enum(["true", "false"]).transform(x => x === "true")]),
1616 "unionWithBoolAndEnum": z.union([z.boolean(), z.enum(["true", "false"]).transform(x => x === "true"), UnionWithBoolAndEnumEnumSchema]),
17-});
17+}).passthrough();
1818 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/boolean-subschema.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -6,5 +6,5 @@ export const TopLevelSchema = z.object({
66 "empty": z.array(z.any()),
77 "foo": z.string(),
88 "impossible": z.any().optional(),
9-});
9+}).strict();
1010 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/camelCase.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -4,5 +4,5 @@ import * as z from "zod";
44 export const TopLevelSchema = z.object({
55 "myProperty": z.string().optional(),
66 "secondProperty": z.string().optional(),
7-});
7+}).passthrough();
88 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/class-map-union.schema

1 generated file · +11 −5
Mschema-typescript-zoddefault / TopLevel.ts+11 −5
@@ -1,12 +1,18 @@
11 import * as z from "zod";
22
33
4-export const UnionClassSchema = z.object({
4+export const BarObjectSchema = z.object({
55 "quux": z.number().int().optional(),
6-});
7-export type UnionClass = z.infer<typeof UnionClassSchema>;
6+}).passthrough();
7+export type BarObject = z.infer<typeof BarObjectSchema>;
8+
9+export const TopLevelUnionSchema = z.object({
10+ "foo": z.union([z.boolean(), z.number(), BarObjectSchema]).optional(),
11+ "bar": z.union([z.boolean(), BarObjectSchema, z.string()]).optional(),
12+}).catchall(z.union([z.boolean(), BarObjectSchema]));
13+export type TopLevelUnion = z.infer<typeof TopLevelUnionSchema>;
814
915 export const TopLevelSchema = z.object({
10- "union": z.record(z.string(), z.union([z.boolean(), UnionClassSchema, z.number(), z.string()])).optional(),
11-});
16+ "union": TopLevelUnionSchema.optional(),
17+}).strict();
1218 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/class-with-additional.schema

1 generated file · +7 −2
Mschema-typescript-zoddefault / TopLevel.ts+7 −2
@@ -1,7 +1,12 @@
11 import * as z from "zod";
22
33
4+export const MapSchema = z.object({
5+ "foo": z.number().optional(),
6+}).catchall(z.boolean());
7+export type Map = z.infer<typeof MapSchema>;
8+
49 export const TopLevelSchema = z.object({
5- "map": z.record(z.string(), z.union([z.boolean(), z.number()])).optional(),
6-});
10+ "map": MapSchema.optional(),
11+}).strict();
712 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/comment-injection-enum-nested-comment.schema

2 generated files · +2 −2
Mcomment-injection-typescript-zoddefault / TopLevel.ts+1 −1
@@ -12,5 +12,5 @@ export type Kind = z.infer<typeof KindSchema>;
1212
1313 export const TopLevelSchema = z.object({
1414 "kind": KindSchema,
15-});
15+}).strict();
1616 export type TopLevel = z.infer<typeof TopLevelSchema>;
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -12,5 +12,5 @@ export type Kind = z.infer<typeof KindSchema>;
1212
1313 export const TopLevelSchema = z.object({
1414 "kind": KindSchema,
15-});
15+}).strict();
1616 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/comment-injection-enum.schema

2 generated files · +2 −2
Mcomment-injection-typescript-zoddefault / TopLevel.ts+1 −1
@@ -15,5 +15,5 @@ export type Kind = z.infer<typeof KindSchema>;
1515
1616 export const TopLevelSchema = z.object({
1717 "kind": KindSchema,
18-});
18+}).strict();
1919 export type TopLevel = z.infer<typeof TopLevelSchema>;
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -15,5 +15,5 @@ export type Kind = z.infer<typeof KindSchema>;
1515
1616 export const TopLevelSchema = z.object({
1717 "kind": KindSchema,
18-});
18+}).strict();
1919 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/comment-injection-nested-comment.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -3,5 +3,5 @@ import * as z from "zod";
33
44 export const TopLevelSchema = z.object({
55 "value": z.string(),
6-});
6+}).strict();
77 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/comment-injection.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -6,5 +6,5 @@ export const TopLevelSchema = z.object({
66 "trailingQuote": z.string().optional(),
77 "trailingTripleQuote": z.string().optional(),
88 "value": z.string(),
9-});
9+}).strict();
1010 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/const-non-string.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -12,5 +12,5 @@ export const TopLevelSchema = z.object({
1212 "kind": KindSchema,
1313 "ratio": z.number(),
1414 "version": z.number(),
15-});
15+}).passthrough();
1616 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/constructor.schema

1 generated file · +2 −2
Mschema-typescript-zoddefault / TopLevel.ts+2 −2
@@ -2,10 +2,10 @@ import * as z from "zod";
22
33
44 export const ConstructorSchema = z.object({
5-});
5+}).strict();
66 export type Constructor = z.infer<typeof ConstructorSchema>;
77
88 export const TopLevelSchema = z.preprocess(value => typeof value === "object" && value !== null && !Array.isArray(value) ? Object.assign(Object.create(null), value) : value, z.object({
99 "constructor": z.union([ConstructorSchema, z.number()]).optional(),
10-}));
10+}).passthrough());
1111 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/cut-enum.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -3,5 +3,5 @@ import * as z from "zod";
33
44 export const TopLevelSchema = z.object({
55 "foo": z.number().int(),
6-});
6+}).passthrough();
77 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/date-time-or-string.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -9,5 +9,5 @@ export type BarEnum = z.infer<typeof BarEnumSchema>;
99 export const TopLevelSchema = z.object({
1010 "bar": z.union([BarEnumSchema, z.coerce.date()]),
1111 "foo": z.string(),
12-});
12+}).passthrough();
1313 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/date-time.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -13,5 +13,5 @@ export const TopLevelSchema = z.object({
1313 "date-time": z.coerce.date(),
1414 "time": z.string(),
1515 "union-array": z.array(z.string()),
16-});
16+}).strict();
1717 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/default-value.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -3,5 +3,5 @@ import * as z from "zod";
33
44 export const TopLevelSchema = z.object({
55 "id": z.number().int(),
6-});
6+}).strict();
77 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/description-with-double-quotes.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -3,5 +3,5 @@ import * as z from "zod";
33
44 export const TopLevelSchema = z.object({
55 "foo": z.boolean().optional(),
6-});
6+}).passthrough();
77 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/description.schema

1 generated file · +5 −5
Mschema-typescript-zoddefault / TopLevel.ts+5 −5
@@ -8,16 +8,16 @@ export const EnumSchema = z.enum([
88 ]);
99 export type Enum = z.infer<typeof EnumSchema>;
1010
11-export const ObjectOrStringClassSchema = z.object({
11+export const ObjectOrStringObjectSchema = z.object({
1212 "prop": z.number(),
13-});
14-export type ObjectOrStringClass = z.infer<typeof ObjectOrStringClassSchema>;
13+}).passthrough();
14+export type ObjectOrStringObject = z.infer<typeof ObjectOrStringObjectSchema>;
1515
1616 export const TopLevelSchema = z.object({
1717 "bar": z.boolean().optional(),
1818 "enum": EnumSchema,
1919 "foo": z.number().optional(),
20- "object-or-string": z.union([ObjectOrStringClassSchema, z.string()]),
20+ "object-or-string": z.union([ObjectOrStringObjectSchema, z.string()]),
2121 "union": z.union([z.number(), z.string()]),
22-});
22+}).strict();
2323 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/direct-union.schema

1 generated file · +2 −2
Mschema-typescript-zoddefault / TopLevel.ts+2 −2
@@ -4,10 +4,10 @@ import * as z from "zod";
44 export const ThingSchema = z.object({
55 "optional": z.union([z.null(), z.array(z.any()), z.boolean(), z.number(), z.number().int(), z.record(z.string(), z.any()), z.string()]).optional(),
66 "required": z.union([z.null(), z.array(z.any()), z.boolean(), z.number(), z.number().int(), z.record(z.string(), z.any()), z.string()]),
7-});
7+}).strict();
88 export type Thing = z.infer<typeof ThingSchema>;
99
1010 export const TopLevelSchema = z.object({
1111 "stuff": z.record(z.string(), ThingSchema),
12-});
12+}).strict();
1313 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/enum-large.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -36,5 +36,5 @@ export type Priority = z.infer<typeof PrioritySchema>;
3636 export const TopLevelSchema = z.object({
3737 "callsign": CallsignSchema,
3838 "priority": PrioritySchema,
39-});
39+}).passthrough();
4040 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/enum-with-null.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -9,5 +9,5 @@ export type Enum = z.infer<typeof EnumSchema>;
99
1010 export const TopLevelSchema = z.object({
1111 "enum": z.union([z.null(), EnumSchema]),
12-});
12+}).strict();
1313 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/enum-with-values.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -14,5 +14,5 @@ export type Weekdays = z.infer<typeof WeekdaysSchema>;
1414
1515 export const TopLevelSchema = z.object({
1616 "weekdays": WeekdaysSchema,
17-});
17+}).passthrough();
1818 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/enum.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -30,5 +30,5 @@ export const TopLevelSchema = z.object({
3030 "gve": GveSchema,
3131 "lvc": LvcSchema.optional(),
3232 "otherArr": z.array(OtherArrSchema).optional(),
33-});
33+}).passthrough();
3434 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/go-schema-pattern-properties.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -3,5 +3,5 @@ import * as z from "zod";
33
44 export const TopLevelSchema = z.object({
55 "map": z.record(z.string(), z.number().int()),
6-});
6+}).passthrough();
77 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/haskell-enum-forbidden.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -9,5 +9,5 @@ export type Health = z.infer<typeof HealthSchema>;
99
1010 export const TopLevelSchema = z.object({
1111 "health": HealthSchema,
12-});
12+}).passthrough();
1313 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/id-no-address.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -3,5 +3,5 @@ import * as z from "zod";
33
44 export const TopLevelSchema = z.object({
55 "item": z.number().int(),
6-});
6+}).passthrough();
77 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/id-root.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -3,5 +3,5 @@ import * as z from "zod";
33
44 export const TopLevelSchema = z.object({
55 "bar": z.number().int(),
6-});
6+}).passthrough();
77 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/ie-suffix-singularization.schema

1 generated file · +2 −2
Mschema-typescript-zoddefault / TopLevel.ts+2 −2
@@ -4,10 +4,10 @@ import * as z from "zod";
44 export const CookieSchema = z.object({
55 "name": z.string(),
66 "value": z.string(),
7-});
7+}).passthrough();
88 export type Cookie = z.infer<typeof CookieSchema>;
99
1010 export const TopLevelSchema = z.object({
1111 "cookies": z.array(CookieSchema),
12-});
12+}).passthrough();
1313 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/implicit-all-of.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -5,5 +5,5 @@ export const TopLevelSchema = z.object({
55 "foo": z.number().int(),
66 "bar": z.boolean(),
77 "quux": z.string(),
8-});
8+}).passthrough();
99 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/implicit-class-array-union.schema

1 generated file · +5 −5
Mschema-typescript-zoddefault / TopLevel.ts+5 −5
@@ -1,12 +1,12 @@
11 import * as z from "zod";
22
33
4-export const FooClassSchema = z.object({
4+export const FooObjectSchema = z.object({
55 "bar": z.number().int(),
6-});
7-export type FooClass = z.infer<typeof FooClassSchema>;
6+}).passthrough();
7+export type FooObject = z.infer<typeof FooObjectSchema>;
88
99 export const TopLevelSchema = z.object({
10- "foo": z.union([z.null(), z.array(z.number().int()), z.boolean(), FooClassSchema, z.number(), z.number().int(), z.string()]),
11-});
10+ "foo": z.union([z.null(), z.array(z.number().int()), z.boolean(), z.number(), z.number().int(), FooObjectSchema, z.string()]),
11+}).passthrough();
1212 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/implicit-one-of.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -5,5 +5,5 @@ export const TopLevelSchema = z.object({
55 "foo": z.number().int(),
66 "bar": z.boolean().optional(),
77 "quux": z.string().optional(),
8-});
8+}).passthrough();
99 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/integer-float-union.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -3,5 +3,5 @@ import * as z from "zod";
33
44 export const TopLevelSchema = z.object({
55 "number": z.number(),
6-});
6+}).passthrough();
77 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/integer-string.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -14,5 +14,5 @@ export const TopLevelSchema = z.object({
1414 "optional": z.string().regex(/^-?\d+$/).optional(),
1515 "unionWithInt": z.union([z.number().int(), z.string().regex(/^-?\d+$/).transform(Number)]),
1616 "unionWithIntAndEnum": z.union([UnionWithIntAndEnumEnumSchema, z.number().int(), z.string().regex(/^-?\d+$/).transform(Number)]),
17-});
17+}).passthrough();
1818 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/integer-type.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -11,5 +11,5 @@ export const TopLevelSchema = z.object({
1111 "small_negative": z.number().int().min(-100).max(0),
1212 "small_positive": z.number().int().min(0).max(100),
1313 "unbounded": z.number().int(),
14-});
14+}).passthrough();
1515 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/intersection-nested.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -3,5 +3,5 @@ import * as z from "zod";
33
44 export const TopLevelSchema = z.object({
55 "intersection": z.number().optional(),
6-});
6+}).strict();
77 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/intersection.schema

1 generated file · +2 −2
Mschema-typescript-zoddefault / TopLevel.ts+2 −2
@@ -4,10 +4,10 @@ import * as z from "zod";
44 export const IntersectionSchema = z.object({
55 "foo": z.number(),
66 "bar": z.string().optional(),
7-});
7+}).passthrough();
88 export type Intersection = z.infer<typeof IntersectionSchema>;
99
1010 export const TopLevelSchema = z.object({
1111 "intersection": IntersectionSchema.optional(),
12-});
12+}).strict();
1313 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/keyword-enum.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -284,5 +284,5 @@ export type Enum = z.infer<typeof EnumSchema>;
284284
285285 export const TopLevelSchema = z.object({
286286 "enum": EnumSchema.optional(),
287-});
287+}).passthrough();
288288 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/keyword-unions.schema

1 generated file · +354 −354
Mschema-typescript-zoddefault / TopLevel.ts+354 −354
@@ -1,1108 +1,1108 @@
11 import * as z from "zod";
22
33
4+export const AnySchema = z.object({
5+}).strict();
6+export type Any = z.infer<typeof AnySchema>;
7+
8+export const BoolSchema = z.object({
9+}).strict();
10+export type Bool = z.infer<typeof BoolSchema>;
11+
12+export const ClassClassSchema = z.object({
13+}).strict();
14+export type ClassClass = z.infer<typeof ClassClassSchema>;
15+
16+export const FalseSchema = z.object({
17+}).strict();
18+export type False = z.infer<typeof FalseSchema>;
19+
20+export const ImpSchema = z.object({
21+}).strict();
22+export type Imp = z.infer<typeof ImpSchema>;
23+
24+export const NoSchema = z.object({
25+}).strict();
26+export type No = z.infer<typeof NoSchema>;
27+
28+export const NsStringSchema = z.object({
29+}).strict();
30+export type NsString = z.infer<typeof NsStringSchema>;
31+
32+export const NullSchema = z.object({
33+}).strict();
34+export type Null = z.infer<typeof NullSchema>;
35+
36+export const NoneSchema = z.object({
37+}).strict();
38+export type None = z.infer<typeof NoneSchema>;
39+
40+export const ProtocolSchema = z.object({
41+}).strict();
42+export type Protocol = z.infer<typeof ProtocolSchema>;
43+
44+export const SelSchema = z.object({
45+}).strict();
46+export type Sel = z.infer<typeof SelSchema>;
47+
48+export const SelfSchema = z.object({
49+}).strict();
50+export type Self = z.infer<typeof SelfSchema>;
51+
52+export const TrueSchema = z.object({
53+}).strict();
54+export type True = z.infer<typeof TrueSchema>;
55+
56+export const TypeSchema = z.object({
57+}).strict();
58+export type Type = z.infer<typeof TypeSchema>;
59+
60+export const YesSchema = z.object({
61+}).strict();
62+export type Yes = z.infer<typeof YesSchema>;
63+
64+export const EmptySchema = z.object({
65+}).strict();
66+export type Empty = z.infer<typeof EmptySchema>;
67+
68+export const BoolClassSchema = z.object({
69+}).strict();
70+export type BoolClass = z.infer<typeof BoolClassSchema>;
71+
72+export const ComplexSchema = z.object({
73+}).strict();
74+export type Complex = z.infer<typeof ComplexSchema>;
75+
76+export const ImaginerySchema = z.object({
77+}).strict();
78+export type Imaginery = z.infer<typeof ImaginerySchema>;
79+
480 export const AbstractSchema = z.object({
5-});
81+}).strict();
682 export type Abstract = z.infer<typeof AbstractSchema>;
783
884 export const AlignasSchema = z.object({
9-});
85+}).strict();
1086 export type Alignas = z.infer<typeof AlignasSchema>;
1187
1288 export const AlignofSchema = z.object({
13-});
89+}).strict();
1490 export type Alignof = z.infer<typeof AlignofSchema>;
1591
1692 export const AndSchema = z.object({
17-});
93+}).strict();
1894 export type And = z.infer<typeof AndSchema>;
1995
2096 export const AndEqSchema = z.object({
21-});
97+}).strict();
2298 export type AndEq = z.infer<typeof AndEqSchema>;
2399
24-export const AnySchema = z.object({
25-});
26-export type Any = z.infer<typeof AnySchema>;
100+export const AnyClassSchema = z.object({
101+}).strict();
102+export type AnyClass = z.infer<typeof AnyClassSchema>;
27103
28104 export const ArrayClassSchema = z.object({
29-});
105+}).strict();
30106 export type ArrayClass = z.infer<typeof ArrayClassSchema>;
31107
32108 export const AsSchema = z.object({
33-});
109+}).strict();
34110 export type As = z.infer<typeof AsSchema>;
35111
36112 export const AsmSchema = z.object({
37-});
113+}).strict();
38114 export type Asm = z.infer<typeof AsmSchema>;
39115
40116 export const AssertSchema = z.object({
41-});
117+}).strict();
42118 export type Assert = z.infer<typeof AssertSchema>;
43119
44120 export const AssociatedtypeSchema = z.object({
45-});
121+}).strict();
46122 export type Associatedtype = z.infer<typeof AssociatedtypeSchema>;
47123
48124 export const AssociativitySchema = z.object({
49-});
125+}).strict();
50126 export type Associativity = z.infer<typeof AssociativitySchema>;
51127
52128 export const AsyncSchema = z.object({
53-});
129+}).strict();
54130 export type Async = z.infer<typeof AsyncSchema>;
55131
56132 export const AtomicSchema = z.object({
57-});
133+}).strict();
58134 export type Atomic = z.infer<typeof AtomicSchema>;
59135
60136 export const AtomicCancelSchema = z.object({
61-});
137+}).strict();
62138 export type AtomicCancel = z.infer<typeof AtomicCancelSchema>;
63139
64140 export const AtomicCommitSchema = z.object({
65-});
141+}).strict();
66142 export type AtomicCommit = z.infer<typeof AtomicCommitSchema>;
67143
68144 export const AtomicNoexceptSchema = z.object({
69-});
145+}).strict();
70146 export type AtomicNoexcept = z.infer<typeof AtomicNoexceptSchema>;
71147
72148 export const AutoSchema = z.object({
73-});
149+}).strict();
74150 export type Auto = z.infer<typeof AutoSchema>;
75151
76152 export const AwaitSchema = z.object({
77-});
153+}).strict();
78154 export type Await = z.infer<typeof AwaitSchema>;
79155
80156 export const BaseSchema = z.object({
81-});
157+}).strict();
82158 export type Base = z.infer<typeof BaseSchema>;
83159
84160 export const BitandSchema = z.object({
85-});
161+}).strict();
86162 export type Bitand = z.infer<typeof BitandSchema>;
87163
88164 export const BitorSchema = z.object({
89-});
165+}).strict();
90166 export type Bitor = z.infer<typeof BitorSchema>;
91167
92-export const BoolSchema = z.object({
93-});
94-export type Bool = z.infer<typeof BoolSchema>;
168+export const UnionBoolBoolSchema = z.object({
169+}).strict();
170+export type UnionBoolBool = z.infer<typeof UnionBoolBoolSchema>;
95171
96172 export const BooleanSchema = z.object({
97-});
173+}).strict();
98174 export type Boolean = z.infer<typeof BooleanSchema>;
99175
100176 export const BreakSchema = z.object({
101-});
177+}).strict();
102178 export type Break = z.infer<typeof BreakSchema>;
103179
104180 export const BycopySchema = z.object({
105-});
181+}).strict();
106182 export type Bycopy = z.infer<typeof BycopySchema>;
107183
108184 export const ByrefSchema = z.object({
109-});
185+}).strict();
110186 export type Byref = z.infer<typeof ByrefSchema>;
111187
112188 export const ByteSchema = z.object({
113-});
189+}).strict();
114190 export type Byte = z.infer<typeof ByteSchema>;
115191
116192 export const CaseSchema = z.object({
117-});
193+}).strict();
118194 export type Case = z.infer<typeof CaseSchema>;
119195
120196 export const CatchSchema = z.object({
121-});
197+}).strict();
122198 export type Catch = z.infer<typeof CatchSchema>;
123199
124200 export const ChanSchema = z.object({
125-});
201+}).strict();
126202 export type Chan = z.infer<typeof ChanSchema>;
127203
128204 export const CharSchema = z.object({
129-});
205+}).strict();
130206 export type Char = z.infer<typeof CharSchema>;
131207
132208 export const Char16TSchema = z.object({
133-});
209+}).strict();
134210 export type Char16T = z.infer<typeof Char16TSchema>;
135211
136212 export const Char32TSchema = z.object({
137-});
213+}).strict();
138214 export type Char32T = z.infer<typeof Char32TSchema>;
139215
140216 export const CheckedSchema = z.object({
141-});
217+}).strict();
142218 export type Checked = z.infer<typeof CheckedSchema>;
143219
144-export const ClassClassSchema = z.object({
145-});
146-export type ClassClass = z.infer<typeof ClassClassSchema>;
220+export const UnionClassClassSchema = z.object({
221+}).strict();
222+export type UnionClassClass = z.infer<typeof UnionClassClassSchema>;
147223
148224 export const CoAwaitSchema = z.object({
149-});
225+}).strict();
150226 export type CoAwait = z.infer<typeof CoAwaitSchema>;
151227
152228 export const CoReturnSchema = z.object({
153-});
229+}).strict();
154230 export type CoReturn = z.infer<typeof CoReturnSchema>;
155231
156232 export const CoYieldSchema = z.object({
157-});
233+}).strict();
158234 export type CoYield = z.infer<typeof CoYieldSchema>;
159235
160236 export const ComplSchema = z.object({
161-});
237+}).strict();
162238 export type Compl = z.infer<typeof ComplSchema>;
163239
164-export const ComplexSchema = z.object({
165-});
166-export type Complex = z.infer<typeof ComplexSchema>;
167-
168240 export const ConceptSchema = z.object({
169-});
241+}).strict();
170242 export type Concept = z.infer<typeof ConceptSchema>;
171243
172244 export const ConsoleSchema = z.object({
173-});
245+}).strict();
174246 export type Console = z.infer<typeof ConsoleSchema>;
175247
176248 export const ConstSchema = z.object({
177-});
249+}).strict();
178250 export type Const = z.infer<typeof ConstSchema>;
179251
180252 export const ConstCastSchema = z.object({
181-});
253+}).strict();
182254 export type ConstCast = z.infer<typeof ConstCastSchema>;
183255
184256 export const ConstexprSchema = z.object({
185-});
257+}).strict();
186258 export type Constexpr = z.infer<typeof ConstexprSchema>;
187259
188260 export const ConstructorSchema = z.object({
189-});
261+}).strict();
190262 export type Constructor = z.infer<typeof ConstructorSchema>;
191263
192264 export const ContinueSchema = z.object({
193-});
265+}).strict();
194266 export type Continue = z.infer<typeof ContinueSchema>;
195267
196268 export const ConvenienceSchema = z.object({
197-});
269+}).strict();
198270 export type Convenience = z.infer<typeof ConvenienceSchema>;
199271
200272 export const ConvertSchema = z.object({
201-});
273+}).strict();
202274 export type Convert = z.infer<typeof ConvertSchema>;
203275
204276 export const ConverterSchema = z.object({
205-});
277+}).strict();
206278 export type Converter = z.infer<typeof ConverterSchema>;
207279
208280 export const DateClassSchema = z.object({
209-});
281+}).strict();
210282 export type DateClass = z.infer<typeof DateClassSchema>;
211283
212284 export const DateParseHandlingSchema = z.object({
213-});
285+}).strict();
214286 export type DateParseHandling = z.infer<typeof DateParseHandlingSchema>;
215287
216288 export const DebuggerSchema = z.object({
217-});
289+}).strict();
218290 export type Debugger = z.infer<typeof DebuggerSchema>;
219291
220292 export const DecimalSchema = z.object({
221-});
293+}).strict();
222294 export type Decimal = z.infer<typeof DecimalSchema>;
223295
224296 export const DeclareSchema = z.object({
225-});
297+}).strict();
226298 export type Declare = z.infer<typeof DeclareSchema>;
227299
228300 export const DecltypeSchema = z.object({
229-});
301+}).strict();
230302 export type Decltype = z.infer<typeof DecltypeSchema>;
231303
232304 export const DecodeStringSchema = z.object({
233-});
305+}).strict();
234306 export type DecodeString = z.infer<typeof DecodeStringSchema>;
235307
236308 export const DefSchema = z.object({
237-});
309+}).strict();
238310 export type Def = z.infer<typeof DefSchema>;
239311
240312 export const DefaultSchema = z.object({
241-});
313+}).strict();
242314 export type Default = z.infer<typeof DefaultSchema>;
243315
244316 export const DeferSchema = z.object({
245-});
317+}).strict();
246318 export type Defer = z.infer<typeof DeferSchema>;
247319
248320 export const DeinitSchema = z.object({
249-});
321+}).strict();
250322 export type Deinit = z.infer<typeof DeinitSchema>;
251323
252324 export const DelSchema = z.object({
253-});
325+}).strict();
254326 export type Del = z.infer<typeof DelSchema>;
255327
256328 export const DelegateSchema = z.object({
257-});
329+}).strict();
258330 export type Delegate = z.infer<typeof DelegateSchema>;
259331
260332 export const DeleteSchema = z.object({
261-});
333+}).strict();
262334 export type Delete = z.infer<typeof DeleteSchema>;
263335
264336 export const DictSchema = z.object({
265-});
337+}).strict();
266338 export type Dict = z.infer<typeof DictSchema>;
267339
268340 export const DictionarySchema = z.object({
269-});
341+}).strict();
270342 export type Dictionary = z.infer<typeof DictionarySchema>;
271343
272344 export const DidSetSchema = z.object({
273-});
345+}).strict();
274346 export type DidSet = z.infer<typeof DidSetSchema>;
275347
276348 export const DoSchema = z.object({
277-});
349+}).strict();
278350 export type Do = z.infer<typeof DoSchema>;
279351
280352 export const DoubleSchema = z.object({
281-});
353+}).strict();
282354 export type Double = z.infer<typeof DoubleSchema>;
283355
284356 export const DynamicSchema = z.object({
285-});
357+}).strict();
286358 export type Dynamic = z.infer<typeof DynamicSchema>;
287359
288360 export const DynamicCastSchema = z.object({
289-});
361+}).strict();
290362 export type DynamicCast = z.infer<typeof DynamicCastSchema>;
291363
292364 export const ElifSchema = z.object({
293-});
365+}).strict();
294366 export type Elif = z.infer<typeof ElifSchema>;
295367
296368 export const ElseSchema = z.object({
297-});
369+}).strict();
298370 export type Else = z.infer<typeof ElseSchema>;
299371
300-export const EmptySchema = z.object({
301-});
302-export type Empty = z.infer<typeof EmptySchema>;
303-
304372 export const EncodeQuickTypeSchema = z.object({
305-});
373+}).strict();
306374 export type EncodeQuickType = z.infer<typeof EncodeQuickTypeSchema>;
307375
308376 export const EnumSchema = z.object({
309-});
377+}).strict();
310378 export type Enum = z.infer<typeof EnumSchema>;
311379
312380 export const EventSchema = z.object({
313-});
381+}).strict();
314382 export type Event = z.infer<typeof EventSchema>;
315383
316384 export const ExceptSchema = z.object({
317-});
385+}).strict();
318386 export type Except = z.infer<typeof ExceptSchema>;
319387
320388 export const ExceptionSchema = z.object({
321-});
389+}).strict();
322390 export type Exception = z.infer<typeof ExceptionSchema>;
323391
324392 export const ExplicitSchema = z.object({
325-});
393+}).strict();
326394 export type Explicit = z.infer<typeof ExplicitSchema>;
327395
328396 export const ExportSchema = z.object({
329-});
397+}).strict();
330398 export type Export = z.infer<typeof ExportSchema>;
331399
332400 export const ExposingSchema = z.object({
333-});
401+}).strict();
334402 export type Exposing = z.infer<typeof ExposingSchema>;
335403
336404 export const ExtendsSchema = z.object({
337-});
405+}).strict();
338406 export type Extends = z.infer<typeof ExtendsSchema>;
339407
340408 export const ExtensionSchema = z.object({
341-});
409+}).strict();
342410 export type Extension = z.infer<typeof ExtensionSchema>;
343411
344412 export const ExternSchema = z.object({
345-});
413+}).strict();
346414 export type Extern = z.infer<typeof ExternSchema>;
347415
348416 export const FallthroughSchema = z.object({
349-});
417+}).strict();
350418 export type Fallthrough = z.infer<typeof FallthroughSchema>;
351419
352-export const FalseSchema = z.object({
353-});
354-export type False = z.infer<typeof FalseSchema>;
420+export const FalseClassSchema = z.object({
421+}).strict();
422+export type FalseClass = z.infer<typeof FalseClassSchema>;
355423
356424 export const FileprivateSchema = z.object({
357-});
425+}).strict();
358426 export type Fileprivate = z.infer<typeof FileprivateSchema>;
359427
360428 export const FinalSchema = z.object({
361-});
429+}).strict();
362430 export type Final = z.infer<typeof FinalSchema>;
363431
364432 export const FinallySchema = z.object({
365-});
433+}).strict();
366434 export type Finally = z.infer<typeof FinallySchema>;
367435
368436 export const FixedSchema = z.object({
369-});
437+}).strict();
370438 export type Fixed = z.infer<typeof FixedSchema>;
371439
372440 export const FloatSchema = z.object({
373-});
441+}).strict();
374442 export type Float = z.infer<typeof FloatSchema>;
375443
376444 export const ForSchema = z.object({
377-});
445+}).strict();
378446 export type For = z.infer<typeof ForSchema>;
379447
380448 export const ForeachSchema = z.object({
381-});
449+}).strict();
382450 export type Foreach = z.infer<typeof ForeachSchema>;
383451
384452 export const FriendSchema = z.object({
385-});
453+}).strict();
386454 export type Friend = z.infer<typeof FriendSchema>;
387455
388456 export const FromSchema = z.object({
389-});
457+}).strict();
390458 export type From = z.infer<typeof FromSchema>;
391459
392460 export const FromJsonSchema = z.object({
393-});
461+}).strict();
394462 export type FromJson = z.infer<typeof FromJsonSchema>;
395463
396464 export const FuncSchema = z.object({
397-});
465+}).strict();
398466 export type Func = z.infer<typeof FuncSchema>;
399467
400468 export const FunctionSchema = z.object({
401-});
469+}).strict();
402470 export type Function = z.infer<typeof FunctionSchema>;
403471
404472 export const GetSchema = z.object({
405-});
473+}).strict();
406474 export type Get = z.infer<typeof GetSchema>;
407475
408476 export const GlobalSchema = z.object({
409-});
477+}).strict();
410478 export type Global = z.infer<typeof GlobalSchema>;
411479
412480 export const GoSchema = z.object({
413-});
481+}).strict();
414482 export type Go = z.infer<typeof GoSchema>;
415483
416484 export const GotoSchema = z.object({
417-});
485+}).strict();
418486 export type Goto = z.infer<typeof GotoSchema>;
419487
420488 export const GuardSchema = z.object({
421-});
489+}).strict();
422490 export type Guard = z.infer<typeof GuardSchema>;
423491
424492 export const HasOwnPropertySchema = z.object({
425-});
493+}).strict();
426494 export type HasOwnProperty = z.infer<typeof HasOwnPropertySchema>;
427495
428496 export const IdSchema = z.object({
429-});
497+}).strict();
430498 export type Id = z.infer<typeof IdSchema>;
431499
432500 export const IfSchema = z.object({
433-});
501+}).strict();
434502 export type If = z.infer<typeof IfSchema>;
435503
436-export const ImaginerySchema = z.object({
437-});
438-export type Imaginery = z.infer<typeof ImaginerySchema>;
439-
440-export const ImpSchema = z.object({
441-});
442-export type Imp = z.infer<typeof ImpSchema>;
443-
444504 export const ImplementsSchema = z.object({
445-});
505+}).strict();
446506 export type Implements = z.infer<typeof ImplementsSchema>;
447507
448508 export const ImplicitSchema = z.object({
449-});
509+}).strict();
450510 export type Implicit = z.infer<typeof ImplicitSchema>;
451511
452512 export const ImportSchema = z.object({
453-});
513+}).strict();
454514 export type Import = z.infer<typeof ImportSchema>;
455515
456516 export const InSchema = z.object({
457-});
517+}).strict();
458518 export type In = z.infer<typeof InSchema>;
459519
460520 export const IndirectSchema = z.object({
461-});
521+}).strict();
462522 export type Indirect = z.infer<typeof IndirectSchema>;
463523
464524 export const InfixSchema = z.object({
465-});
525+}).strict();
466526 export type Infix = z.infer<typeof InfixSchema>;
467527
468528 export const InitSchema = z.object({
469-});
529+}).strict();
470530 export type Init = z.infer<typeof InitSchema>;
471531
472532 export const InlineSchema = z.object({
473-});
533+}).strict();
474534 export type Inline = z.infer<typeof InlineSchema>;
475535
476536 export const InoutSchema = z.object({
477-});
537+}).strict();
478538 export type Inout = z.infer<typeof InoutSchema>;
479539
480540 export const InstanceofSchema = z.object({
481-});
541+}).strict();
482542 export type Instanceof = z.infer<typeof InstanceofSchema>;
483543
484544 export const IntSchema = z.object({
485-});
545+}).strict();
486546 export type Int = z.infer<typeof IntSchema>;
487547
488548 export const InterfaceSchema = z.object({
489-});
549+}).strict();
490550 export type Interface = z.infer<typeof InterfaceSchema>;
491551
492552 export const InternalSchema = z.object({
493-});
553+}).strict();
494554 export type Internal = z.infer<typeof InternalSchema>;
495555
496556 export const IsSchema = z.object({
497-});
557+}).strict();
498558 export type Is = z.infer<typeof IsSchema>;
499559
500560 export const IterableSchema = z.object({
501-});
561+}).strict();
502562 export type Iterable = z.infer<typeof IterableSchema>;
503563
504564 export const JdecSchema = z.object({
505-});
565+}).strict();
506566 export type Jdec = z.infer<typeof JdecSchema>;
507567
508568 export const JencSchema = z.object({
509-});
569+}).strict();
510570 export type Jenc = z.infer<typeof JencSchema>;
511571
512572 export const JpipeSchema = z.object({
513-});
573+}).strict();
514574 export type Jpipe = z.infer<typeof JpipeSchema>;
515575
516576 export const JsonSchema = z.object({
517-});
577+}).strict();
518578 export type Json = z.infer<typeof JsonSchema>;
519579
520580 export const JsonConverterSchema = z.object({
521-});
581+}).strict();
522582 export type JsonConverter = z.infer<typeof JsonConverterSchema>;
523583
524584 export const JsonSerializerSchema = z.object({
525-});
585+}).strict();
526586 export type JsonSerializer = z.infer<typeof JsonSerializerSchema>;
527587
528588 export const JsonTokenSchema = z.object({
529-});
589+}).strict();
530590 export type JsonToken = z.infer<typeof JsonTokenSchema>;
531591
532592 export const JsonWriterSchema = z.object({
533-});
593+}).strict();
534594 export type JsonWriter = z.infer<typeof JsonWriterSchema>;
535595
536596 export const LambdaSchema = z.object({
537-});
597+}).strict();
538598 export type Lambda = z.infer<typeof LambdaSchema>;
539599
540600 export const LazySchema = z.object({
541-});
601+}).strict();
542602 export type Lazy = z.infer<typeof LazySchema>;
543603
544604 export const LeftSchema = z.object({
545-});
605+}).strict();
546606 export type Left = z.infer<typeof LeftSchema>;
547607
548608 export const LetSchema = z.object({
549-});
609+}).strict();
550610 export type Let = z.infer<typeof LetSchema>;
551611
552612 export const ListSchema = z.object({
553-});
613+}).strict();
554614 export type List = z.infer<typeof ListSchema>;
555615
556616 export const LockSchema = z.object({
557-});
617+}).strict();
558618 export type Lock = z.infer<typeof LockSchema>;
559619
560620 export const LongSchema = z.object({
561-});
621+}).strict();
562622 export type Long = z.infer<typeof LongSchema>;
563623
564624 export const MapSchema = z.object({
565-});
625+}).strict();
566626 export type Map = z.infer<typeof MapSchema>;
567627
568628 export const MetadataPropertyHandlingSchema = z.object({
569-});
629+}).strict();
570630 export type MetadataPropertyHandling = z.infer<typeof MetadataPropertyHandlingSchema>;
571631
572632 export const ModuleSchema = z.object({
573-});
633+}).strict();
574634 export type Module = z.infer<typeof ModuleSchema>;
575635
576636 export const MutableSchema = z.object({
577-});
637+}).strict();
578638 export type Mutable = z.infer<typeof MutableSchema>;
579639
580640 export const MutatingSchema = z.object({
581-});
641+}).strict();
582642 export type Mutating = z.infer<typeof MutatingSchema>;
583643
584644 export const NamespaceSchema = z.object({
585-});
645+}).strict();
586646 export type Namespace = z.infer<typeof NamespaceSchema>;
587647
588648 export const NativeSchema = z.object({
589-});
649+}).strict();
590650 export type Native = z.infer<typeof NativeSchema>;
591651
592652 export const NewSchema = z.object({
593-});
653+}).strict();
594654 export type New = z.infer<typeof NewSchema>;
595655
596656 export const NewtonsoftSchema = z.object({
597-});
657+}).strict();
598658 export type Newtonsoft = z.infer<typeof NewtonsoftSchema>;
599659
600660 export const NilSchema = z.object({
601-});
661+}).strict();
602662 export type Nil = z.infer<typeof NilSchema>;
603663
604-export const NoSchema = z.object({
605-});
606-export type No = z.infer<typeof NoSchema>;
607-
608664 export const NoexceptSchema = z.object({
609-});
665+}).strict();
610666 export type Noexcept = z.infer<typeof NoexceptSchema>;
611667
612668 export const NonatomicSchema = z.object({
613-});
669+}).strict();
614670 export type Nonatomic = z.infer<typeof NonatomicSchema>;
615671
616-export const NoneSchema = z.object({
617-});
618-export type None = z.infer<typeof NoneSchema>;
672+export const NoneClassSchema = z.object({
673+}).strict();
674+export type NoneClass = z.infer<typeof NoneClassSchema>;
619675
620676 export const NonlocalSchema = z.object({
621-});
677+}).strict();
622678 export type Nonlocal = z.infer<typeof NonlocalSchema>;
623679
624680 export const NonmutatingSchema = z.object({
625-});
681+}).strict();
626682 export type Nonmutating = z.infer<typeof NonmutatingSchema>;
627683
628684 export const NotSchema = z.object({
629-});
685+}).strict();
630686 export type Not = z.infer<typeof NotSchema>;
631687
632688 export const NotEqSchema = z.object({
633-});
689+}).strict();
634690 export type NotEq = z.infer<typeof NotEqSchema>;
635691
636-export const NsStringSchema = z.object({
637-});
638-export type NsString = z.infer<typeof NsStringSchema>;
639-
640-export const NullSchema = z.object({
641-});
642-export type Null = z.infer<typeof NullSchema>;
692+export const NullClassSchema = z.object({
693+}).strict();
694+export type NullClass = z.infer<typeof NullClassSchema>;
643695
644696 export const NullptrSchema = z.object({
645-});
697+}).strict();
646698 export type Nullptr = z.infer<typeof NullptrSchema>;
647699
648700 export const NumberSchema = z.object({
649-});
701+}).strict();
650702 export type Number = z.infer<typeof NumberSchema>;
651703
652704 export const ObjectClassSchema = z.object({
653-});
705+}).strict();
654706 export type ObjectClass = z.infer<typeof ObjectClassSchema>;
655707
656708 export const OfSchema = z.object({
657-});
709+}).strict();
658710 export type Of = z.infer<typeof OfSchema>;
659711
660712 export const OnewaySchema = z.object({
661-});
713+}).strict();
662714 export type Oneway = z.infer<typeof OnewaySchema>;
663715
664716 export const OpenSchema = z.object({
665-});
717+}).strict();
666718 export type Open = z.infer<typeof OpenSchema>;
667719
668720 export const OperatorSchema = z.object({
669-});
721+}).strict();
670722 export type Operator = z.infer<typeof OperatorSchema>;
671723
672724 export const OptionalSchema = z.object({
673-});
725+}).strict();
674726 export type Optional = z.infer<typeof OptionalSchema>;
675727
676728 export const OrSchema = z.object({
677-});
729+}).strict();
678730 export type Or = z.infer<typeof OrSchema>;
679731
680732 export const OrEqSchema = z.object({
681-});
733+}).strict();
682734 export type OrEq = z.infer<typeof OrEqSchema>;
683735
684736 export const OutSchema = z.object({
685-});
737+}).strict();
686738 export type Out = z.infer<typeof OutSchema>;
687739
688740 export const OverrideSchema = z.object({
689-});
741+}).strict();
690742 export type Override = z.infer<typeof OverrideSchema>;
691743
692744 export const PackageSchema = z.object({
693-});
745+}).strict();
694746 export type Package = z.infer<typeof PackageSchema>;
695747
696748 export const ParamsSchema = z.object({
697-});
749+}).strict();
698750 export type Params = z.infer<typeof ParamsSchema>;
699751
700752 export const PassSchema = z.object({
701-});
753+}).strict();
702754 export type Pass = z.infer<typeof PassSchema>;
703755
704756 export const PortSchema = z.object({
705-});
757+}).strict();
706758 export type Port = z.infer<typeof PortSchema>;
707759
708760 export const PostfixSchema = z.object({
709-});
761+}).strict();
710762 export type Postfix = z.infer<typeof PostfixSchema>;
711763
712764 export const PrecedenceSchema = z.object({
713-});
765+}).strict();
714766 export type Precedence = z.infer<typeof PrecedenceSchema>;
715767
716768 export const PrefixSchema = z.object({
717-});
769+}).strict();
718770 export type Prefix = z.infer<typeof PrefixSchema>;
719771
720772 export const PrintSchema = z.object({
721-});
773+}).strict();
722774 export type Print = z.infer<typeof PrintSchema>;
723775
724776 export const PrintfSchema = z.object({
725-});
777+}).strict();
726778 export type Printf = z.infer<typeof PrintfSchema>;
727779
728780 export const PrivateSchema = z.object({
729-});
781+}).strict();
730782 export type Private = z.infer<typeof PrivateSchema>;
731783
732784 export const ProtectedSchema = z.object({
733-});
785+}).strict();
734786 export type Protected = z.infer<typeof ProtectedSchema>;
735787
736-export const ProtocolSchema = z.object({
737-});
738-export type Protocol = z.infer<typeof ProtocolSchema>;
788+export const ProtocolClassSchema = z.object({
789+}).strict();
790+export type ProtocolClass = z.infer<typeof ProtocolClassSchema>;
739791
740792 export const PublicSchema = z.object({
741-});
793+}).strict();
742794 export type Public = z.infer<typeof PublicSchema>;
743795
744-export const UnionBoolBoolSchema = z.object({
745-});
746-export type UnionBoolBool = z.infer<typeof UnionBoolBoolSchema>;
747-
748796 export const QuicktypeSchema = z.object({
749-});
797+}).strict();
750798 export type Quicktype = z.infer<typeof QuicktypeSchema>;
751799
752800 export const RaiseSchema = z.object({
753-});
801+}).strict();
754802 export type Raise = z.infer<typeof RaiseSchema>;
755803
756804 export const RangeSchema = z.object({
757-});
805+}).strict();
758806 export type Range = z.infer<typeof RangeSchema>;
759807
760808 export const ReadonlySchema = z.object({
761-});
809+}).strict();
762810 export type Readonly = z.infer<typeof ReadonlySchema>;
763811
764812 export const RefSchema = z.object({
765-});
813+}).strict();
766814 export type Ref = z.infer<typeof RefSchema>;
767815
768816 export const RegisterSchema = z.object({
769-});
817+}).strict();
770818 export type Register = z.infer<typeof RegisterSchema>;
771819
772820 export const ReinterpretCastSchema = z.object({
773-});
821+}).strict();
774822 export type ReinterpretCast = z.infer<typeof ReinterpretCastSchema>;
775823
776824 export const RepeatSchema = z.object({
777-});
825+}).strict();
778826 export type Repeat = z.infer<typeof RepeatSchema>;
779827
780828 export const RequireSchema = z.object({
781-});
829+}).strict();
782830 export type Require = z.infer<typeof RequireSchema>;
783831
784832 export const RequiredSchema = z.object({
785-});
833+}).strict();
786834 export type Required = z.infer<typeof RequiredSchema>;
787835
788836 export const RequiresSchema = z.object({
789-});
837+}).strict();
790838 export type Requires = z.infer<typeof RequiresSchema>;
791839
792840 export const RestrictSchema = z.object({
793-});
841+}).strict();
794842 export type Restrict = z.infer<typeof RestrictSchema>;
795843
796844 export const RetainSchema = z.object({
797-});
845+}).strict();
798846 export type Retain = z.infer<typeof RetainSchema>;
799847
800848 export const RethrowsSchema = z.object({
801-});
849+}).strict();
802850 export type Rethrows = z.infer<typeof RethrowsSchema>;
803851
804852 export const ReturnSchema = z.object({
805-});
853+}).strict();
806854 export type Return = z.infer<typeof ReturnSchema>;
807855
808856 export const RightSchema = z.object({
809-});
857+}).strict();
810858 export type Right = z.infer<typeof RightSchema>;
811859
812860 export const SbyteSchema = z.object({
813-});
861+}).strict();
814862 export type Sbyte = z.infer<typeof SbyteSchema>;
815863
816864 export const SealedSchema = z.object({
817-});
865+}).strict();
818866 export type Sealed = z.infer<typeof SealedSchema>;
819867
820-export const SelSchema = z.object({
821-});
822-export type Sel = z.infer<typeof SelSchema>;
823-
824868 export const SelectSchema = z.object({
825-});
869+}).strict();
826870 export type Select = z.infer<typeof SelectSchema>;
827871
828-export const SelfSchema = z.object({
829-});
830-export type Self = z.infer<typeof SelfSchema>;
872+export const SelfClassSchema = z.object({
873+}).strict();
874+export type SelfClass = z.infer<typeof SelfClassSchema>;
831875
832876 export const SerializeSchema = z.object({
833-});
877+}).strict();
834878 export type Serialize = z.infer<typeof SerializeSchema>;
835879
836880 export const SetSchema = z.object({
837-});
881+}).strict();
838882 export type Set = z.infer<typeof SetSchema>;
839883
840884 export const ShortSchema = z.object({
841-});
885+}).strict();
842886 export type Short = z.infer<typeof ShortSchema>;
843887
844888 export const SignedSchema = z.object({
845-});
889+}).strict();
846890 export type Signed = z.infer<typeof SignedSchema>;
847891
848892 export const SizeofSchema = z.object({
849-});
893+}).strict();
850894 export type Sizeof = z.infer<typeof SizeofSchema>;
851895
852896 export const StackallocSchema = z.object({
853-});
897+}).strict();
854898 export type Stackalloc = z.infer<typeof StackallocSchema>;
855899
856900 export const StaticSchema = z.object({
857-});
901+}).strict();
858902 export type Static = z.infer<typeof StaticSchema>;
859903
860904 export const StaticAssertSchema = z.object({
861-});
905+}).strict();
862906 export type StaticAssert = z.infer<typeof StaticAssertSchema>;
863907
864908 export const StaticCastSchema = z.object({
865-});
909+}).strict();
866910 export type StaticCast = z.infer<typeof StaticCastSchema>;
867911
868912 export const StrictfpSchema = z.object({
869-});
913+}).strict();
870914 export type Strictfp = z.infer<typeof StrictfpSchema>;
871915
872916 export const StringClassSchema = z.object({
873-});
917+}).strict();
874918 export type StringClass = z.infer<typeof StringClassSchema>;
875919
876920 export const StructSchema = z.object({
877-});
921+}).strict();
878922 export type Struct = z.infer<typeof StructSchema>;
879923
880924 export const SubscriptSchema = z.object({
881-});
925+}).strict();
882926 export type Subscript = z.infer<typeof SubscriptSchema>;
883927
884928 export const SuperSchema = z.object({
885-});
929+}).strict();
886930 export type Super = z.infer<typeof SuperSchema>;
887931
888932 export const SwitchSchema = z.object({
889-});
933+}).strict();
890934 export type Switch = z.infer<typeof SwitchSchema>;
891935
892936 export const SymbolSchema = z.object({
893-});
937+}).strict();
894938 export type Symbol = z.infer<typeof SymbolSchema>;
895939
896940 export const SynchronizedSchema = z.object({
897-});
941+}).strict();
898942 export type Synchronized = z.infer<typeof SynchronizedSchema>;
899943
900944 export const SystemSchema = z.object({
901-});
945+}).strict();
902946 export type System = z.infer<typeof SystemSchema>;
903947
904948 export const TemplateSchema = z.object({
905-});
949+}).strict();
906950 export type Template = z.infer<typeof TemplateSchema>;
907951
908952 export const ThenSchema = z.object({
909-});
953+}).strict();
910954 export type Then = z.infer<typeof ThenSchema>;
911955
912956 export const ThisSchema = z.object({
913-});
957+}).strict();
914958 export type This = z.infer<typeof ThisSchema>;
915959
916960 export const ThreadLocalSchema = z.object({
917-});
961+}).strict();
918962 export type ThreadLocal = z.infer<typeof ThreadLocalSchema>;
919963
920964 export const ThrowSchema = z.object({
921-});
965+}).strict();
922966 export type Throw = z.infer<typeof ThrowSchema>;
923967
924968 export const ThrowsSchema = z.object({
925-});
969+}).strict();
926970 export type Throws = z.infer<typeof ThrowsSchema>;
927971
928972 export const ToJsonSchema = z.object({
929-});
973+}).strict();
930974 export type ToJson = z.infer<typeof ToJsonSchema>;
931975
932976 export const TopLevelClassSchema = z.object({
933-});
977+}).strict();
934978 export type TopLevelClass = z.infer<typeof TopLevelClassSchema>;
935979
936-export const AnyClassSchema = z.object({
937-});
938-export type AnyClass = z.infer<typeof AnyClassSchema>;
939-
940-export const BoolClassSchema = z.object({
941-});
942-export type BoolClass = z.infer<typeof BoolClassSchema>;
943-
944-export const UnionClassClassSchema = z.object({
945-});
946-export type UnionClassClass = z.infer<typeof UnionClassClassSchema>;
947-
948-export const FalseClassSchema = z.object({
949-});
950-export type FalseClass = z.infer<typeof FalseClassSchema>;
951-
952-export const NoneClassSchema = z.object({
953-});
954-export type NoneClass = z.infer<typeof NoneClassSchema>;
955-
956-export const NullClassSchema = z.object({
957-});
958-export type NullClass = z.infer<typeof NullClassSchema>;
959-
960-export const ProtocolClassSchema = z.object({
961-});
962-export type ProtocolClass = z.infer<typeof ProtocolClassSchema>;
963-
964-export const SelfClassSchema = z.object({
965-});
966-export type SelfClass = z.infer<typeof SelfClassSchema>;
967-
968-export const TrueClassSchema = z.object({
969-});
970-export type TrueClass = z.infer<typeof TrueClassSchema>;
971-
972-export const TypeClassSchema = z.object({
973-});
974-export type TypeClass = z.infer<typeof TypeClassSchema>;
975-
976980 export const TransientSchema = z.object({
977-});
981+}).strict();
978982 export type Transient = z.infer<typeof TransientSchema>;
979983
980-export const TrueSchema = z.object({
981-});
982-export type True = z.infer<typeof TrueSchema>;
984+export const TrueClassSchema = z.object({
985+}).strict();
986+export type TrueClass = z.infer<typeof TrueClassSchema>;
983987
984988 export const TrySchema = z.object({
985-});
989+}).strict();
986990 export type Try = z.infer<typeof TrySchema>;
987991
988-export const TypeSchema = z.object({
989-});
990-export type Type = z.infer<typeof TypeSchema>;
992+export const TypeClassSchema = z.object({
993+}).strict();
994+export type TypeClass = z.infer<typeof TypeClassSchema>;
991995
992996 export const TypealiasSchema = z.object({
993-});
997+}).strict();
994998 export type Typealias = z.infer<typeof TypealiasSchema>;
995999
9961000 export const TypedefSchema = z.object({
997-});
1001+}).strict();
9981002 export type Typedef = z.infer<typeof TypedefSchema>;
9991003
10001004 export const TypeidSchema = z.object({
1001-});
1005+}).strict();
10021006 export type Typeid = z.infer<typeof TypeidSchema>;
10031007
10041008 export const TypenameSchema = z.object({
1005-});
1009+}).strict();
10061010 export type Typename = z.infer<typeof TypenameSchema>;
10071011
10081012 export const TypeofSchema = z.object({
1009-});
1013+}).strict();
10101014 export type Typeof = z.infer<typeof TypeofSchema>;
10111015
10121016 export const UintSchema = z.object({
1013-});
1017+}).strict();
10141018 export type Uint = z.infer<typeof UintSchema>;
10151019
10161020 export const UlongSchema = z.object({
1017-});
1021+}).strict();
10181022 export type Ulong = z.infer<typeof UlongSchema>;
10191023
10201024 export const UncheckedSchema = z.object({
1021-});
1025+}).strict();
10221026 export type Unchecked = z.infer<typeof UncheckedSchema>;
10231027
10241028 export const UndefinedSchema = z.object({
1025-});
1029+}).strict();
10261030 export type Undefined = z.infer<typeof UndefinedSchema>;
10271031
10281032 export const UnionSchema = z.object({
1029-});
1033+}).strict();
10301034 export type Union = z.infer<typeof UnionSchema>;
10311035
10321036 export const UnownedSchema = z.object({
1033-});
1037+}).strict();
10341038 export type Unowned = z.infer<typeof UnownedSchema>;
10351039
10361040 export const UnsafeSchema = z.object({
1037-});
1041+}).strict();
10381042 export type Unsafe = z.infer<typeof UnsafeSchema>;
10391043
10401044 export const UnsignedSchema = z.object({
1041-});
1045+}).strict();
10421046 export type Unsigned = z.infer<typeof UnsignedSchema>;
10431047
10441048 export const UshortSchema = z.object({
1045-});
1049+}).strict();
10461050 export type Ushort = z.infer<typeof UshortSchema>;
10471051
10481052 export const UsingSchema = z.object({
1049-});
1053+}).strict();
10501054 export type Using = z.infer<typeof UsingSchema>;
10511055
10521056 export const VarSchema = z.object({
1053-});
1057+}).strict();
10541058 export type Var = z.infer<typeof VarSchema>;
10551059
10561060 export const VirtualSchema = z.object({
1057-});
1061+}).strict();
10581062 export type Virtual = z.infer<typeof VirtualSchema>;
10591063
10601064 export const VoidSchema = z.object({
1061-});
1065+}).strict();
10621066 export type Void = z.infer<typeof VoidSchema>;
10631067
10641068 export const VolatileSchema = z.object({
1065-});
1069+}).strict();
10661070 export type Volatile = z.infer<typeof VolatileSchema>;
10671071
10681072 export const WcharTSchema = z.object({
1069-});
1073+}).strict();
10701074 export type WcharT = z.infer<typeof WcharTSchema>;
10711075
10721076 export const WeakSchema = z.object({
1073-});
1077+}).strict();
10741078 export type Weak = z.infer<typeof WeakSchema>;
10751079
10761080 export const WhereSchema = z.object({
1077-});
1081+}).strict();
10781082 export type Where = z.infer<typeof WhereSchema>;
10791083
10801084 export const WhileSchema = z.object({
1081-});
1085+}).strict();
10821086 export type While = z.infer<typeof WhileSchema>;
10831087
10841088 export const WillSetSchema = z.object({
1085-});
1089+}).strict();
10861090 export type WillSet = z.infer<typeof WillSetSchema>;
10871091
10881092 export const WithSchema = z.object({
1089-});
1093+}).strict();
10901094 export type With = z.infer<typeof WithSchema>;
10911095
10921096 export const XorSchema = z.object({
1093-});
1097+}).strict();
10941098 export type Xor = z.infer<typeof XorSchema>;
10951099
10961100 export const XorEqSchema = z.object({
1097-});
1101+}).strict();
10981102 export type XorEq = z.infer<typeof XorEqSchema>;
10991103
1100-export const YesSchema = z.object({
1101-});
1102-export type Yes = z.infer<typeof YesSchema>;
1103-
11041104 export const YieldSchema = z.object({
1105-});
1105+}).strict();
11061106 export type Yield = z.infer<typeof YieldSchema>;
11071107
11081108 export const TopLevelSchema = z.preprocess(value => typeof value === "object" && value !== null && !Array.isArray(value) ? Object.assign(Object.create(null), value) : value, z.object({
@@ -1383,5 +1383,5 @@ export const TopLevelSchema = z.preprocess(value => typeof value === "object" &&
13831383 "xor_eq": z.union([XorEqSchema, z.number()]).optional(),
13841384 "YES": z.union([YesSchema, z.number()]).optional(),
13851385 "yield": z.union([YieldSchema, z.number()]).optional(),
1386-}));
1386+}).passthrough());
13871387 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/light.schema

1 generated file · +2 −2
Mschema-typescript-zoddefault / TopLevel.ts+2 −2
@@ -5,10 +5,10 @@ export const LightParamsSchema = z.object({
55 "app_id": z.string(),
66 "outlet_id": z.string(),
77 "rgba": z.string(),
8-});
8+}).strict();
99 export type LightParams = z.infer<typeof LightParamsSchema>;
1010
1111 export const TopLevelSchema = z.object({
1212 "LightParams": LightParamsSchema,
13-});
13+}).strict();
1414 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/list.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -7,5 +7,5 @@ export type TopLevel = {
77 export const TopLevelSchema: z.ZodType<TopLevel> = z.lazy(() =>
88 z.object({
99 "next": TopLevelSchema.optional(),
10- })
10+ }).passthrough()
1111 );
Test case

test/inputs/schema/min-max-items.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -7,5 +7,5 @@ export const TopLevelSchema = z.object({
77 "minOnly": z.array(z.string()).min(2),
88 "plain": z.array(z.string()),
99 "unionItems": z.array(z.union([z.number().int(), z.string()])).min(2),
10-});
10+}).passthrough();
1111 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/minmax-integer.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -10,5 +10,5 @@ export const TopLevelSchema = z.object({
1010 "minMaxIntersection": z.number().int().min(3).max(5),
1111 "minMaxUnion": z.number().int(),
1212 "union": z.number().int().min(3).max(6),
13-});
13+}).passthrough();
1414 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/minmax.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -10,5 +10,5 @@ export const TopLevelSchema = z.object({
1010 "minMaxIntersection": z.number().min(3).max(5),
1111 "minMaxUnion": z.number(),
1212 "union": z.number().min(3).max(6),
13-});
13+}).passthrough();
1414 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/minmaxlength.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -10,5 +10,5 @@ export const TopLevelSchema = z.object({
1010 "minmaxlength": z.string().min(3).max(5),
1111 "minMaxUnion": z.string(),
1212 "union": z.string().min(3).max(6),
13-});
13+}).passthrough();
1414 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/multi-type-enum.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -10,5 +10,5 @@ export type FooEnum = z.infer<typeof FooEnumSchema>;
1010
1111 export const TopLevelSchema = z.object({
1212 "foo": z.union([z.boolean(), z.number(), FooEnumSchema]),
13-});
13+}).passthrough();
1414 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/mutually-recursive.schema

1 generated file · +2 −2
Mschema-typescript-zoddefault / TopLevel.ts+2 −2
@@ -7,7 +7,7 @@ export type Bar = {
77 export const BarSchema: z.ZodType<Bar> = z.lazy(() =>
88 z.object({
99 "foo": z.union([z.array(TopLevelSchema), TopLevelSchema]),
10- })
10+ }).passthrough()
1111 );
1212
1313 export type TopLevel = {
@@ -16,5 +16,5 @@ export type TopLevel = {
1616 export const TopLevelSchema: z.ZodType<TopLevel> = z.lazy(() =>
1717 z.object({
1818 "bar": BarSchema.optional(),
19- })
19+ }).passthrough()
2020 );
Test case

test/inputs/schema/nested-intersection-union.schema

1 generated file · +2 −2
Mschema-typescript-zoddefault / TopLevel.ts+2 −2
@@ -6,10 +6,10 @@ export const ItemSchema = z.object({
66 "id": z.string().optional(),
77 "output": z.string().optional(),
88 "summary": z.string().optional(),
9-});
9+}).passthrough();
1010 export type Item = z.infer<typeof ItemSchema>;
1111
1212 export const TopLevelSchema = z.object({
1313 "input": z.array(ItemSchema),
14-});
14+}).strict();
1515 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/non-standard-ref.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -5,5 +5,5 @@ export const TopLevelSchema = z.object({
55 "bar": z.number().int(),
66 "foo": z.number().int(),
77 "quux": z.boolean(),
8-});
8+}).passthrough();
99 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/nullable-optional-one-of.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -10,5 +10,5 @@ export type Kind = z.infer<typeof KindSchema>;
1010 export const TopLevelSchema = z.object({
1111 "b": z.union([z.null(), z.string()]).optional(),
1212 "kind": KindSchema,
13-});
13+}).passthrough();
1414 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/object-type-required.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -4,5 +4,5 @@ import * as z from "zod";
44 export const TopLevelSchema = z.object({
55 "foo": z.string(),
66 "bar": z.string().optional(),
7-});
7+}).passthrough();
88 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/optional-any.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -4,5 +4,5 @@ import * as z from "zod";
44 export const TopLevelSchema = z.object({
55 "bar": z.boolean(),
66 "foo": z.any().optional(),
7-});
7+}).strict();
88 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

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

1 generated file · +2 −2
Mschema-typescript-zoddefault / TopLevel.ts+2 −2
@@ -4,7 +4,7 @@ import * as z from "zod";
44 export const CoordinateSchema = z.object({
55 "latitude": z.number(),
66 "longitude": z.number(),
7-});
7+}).strict();
88 export type Coordinate = z.infer<typeof CoordinateSchema>;
99
1010 export const TopLevelSchema = z.object({
@@ -15,5 +15,5 @@ export const TopLevelSchema = z.object({
1515 "requiredCount": z.number().int().min(1).max(100),
1616 "requiredLabel": z.string().min(2).max(16),
1717 "weight": z.number().min(0.5).max(99.5).optional(),
18-});
18+}).strict();
1919 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/optional-constraints.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -7,5 +7,5 @@ export const TopLevelSchema = z.object({
77 "optPattern": z.string().regex(new RegExp("^[a-z]+$")).optional(),
88 "optString": z.string().min(3).max(10).optional(),
99 "reqZeroMin": z.number().int().min(0).max(100),
10-});
10+}).passthrough();
1111 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/optional-date-time.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -8,5 +8,5 @@ export const TopLevelSchema = z.object({
88 "required-date": z.string(),
99 "required-date-time": z.coerce.date(),
1010 "required-time": z.string(),
11-});
11+}).strict();
1212 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/optional-enum.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -10,5 +10,5 @@ export type Shortcut = z.infer<typeof ShortcutSchema>;
1010 export const TopLevelSchema = z.object({
1111 "name": z.string(),
1212 "shortcut": ShortcutSchema.optional(),
13-});
13+}).strict();
1414 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/pattern.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -5,5 +5,5 @@ export const TopLevelSchema = z.object({
55 "pattern1": z.string().regex(new RegExp("a[.]*")),
66 "pattern2": z.string().regex(new RegExp("b[.]*")),
77 "union": z.string().regex(new RegExp("(b[.]*)|(c[.]*)")),
8-});
8+}).passthrough();
99 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/postman-collection.schema

1 generated file · +2 −2
Mschema-typescript-zoddefault / TopLevel.ts+2 −2
@@ -11,10 +11,10 @@ export const TopLevelSchema: z.ZodType<TopLevel> = z.lazy(() =>
1111 "item": z.array(TopLevelSchema).optional(),
1212 "name": z.string().optional(),
1313 "response": z.array(ResponseSchema).optional(),
14- })
14+ }).passthrough()
1515 );
1616
1717 export const ResponseSchema = z.object({
1818 "body": z.string().optional(),
19-});
19+}).passthrough();
2020 export type Response = z.infer<typeof ResponseSchema>;
Test case

test/inputs/schema/prefix-items.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -4,5 +4,5 @@ import * as z from "zod";
44 export const TopLevelSchema = z.object({
55 "open": z.array(z.union([z.boolean(), z.number().int()])),
66 "tuple": z.array(z.union([z.boolean(), z.number().int()])),
7-});
7+}).passthrough();
88 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/recursive-union-flattening.schema

1 generated file · +10 −10
Mschema-typescript-zoddefault / TopLevel.ts+10 −10
@@ -1,19 +1,19 @@
11 import * as z from "zod";
22
33
4-export type XClass = {
5- "x"?: Array<Array<any> | boolean | XClass | number | null | string> | boolean | number | Record<string, any> | null | string;
4+export type XObject = {
5+ "x"?: Array<Array<any> | boolean | number | null | XObject | string> | boolean | number | Record<string, any> | null | string;
66 };
7-export const XClassSchema: z.ZodType<XClass> = z.lazy(() =>
7+export const XObjectSchema: z.ZodType<XObject> = z.lazy(() =>
88 z.object({
9- "x": z.union([z.null(), z.array(z.union([z.null(), z.array(z.any()), z.boolean(), XClassSchema, z.number(), z.string()])), z.boolean(), z.number(), z.record(z.string(), z.any()), z.string()]).optional(),
10- })
9+ "x": z.union([z.null(), z.array(z.union([z.null(), z.array(z.any()), z.boolean(), z.number(), XObjectSchema, z.string()])), z.boolean(), z.number(), z.record(z.string(), z.any()), z.string()]).optional(),
10+ }).passthrough()
1111 );
1212
13-export const TopLevelClassSchema = z.object({
14- "x": z.union([z.null(), z.array(z.union([z.null(), z.array(z.any()), z.boolean(), XClassSchema, z.number(), z.string()])), z.boolean(), z.number(), z.record(z.string(), z.any()), z.string()]).optional(),
15-});
16-export type TopLevelClass = z.infer<typeof TopLevelClassSchema>;
13+export const TopLevelObjectSchema = z.object({
14+ "x": z.union([z.null(), z.array(z.union([z.null(), z.array(z.any()), z.boolean(), z.number(), XObjectSchema, z.string()])), z.boolean(), z.number(), z.record(z.string(), z.any()), z.string()]).optional(),
15+}).passthrough();
16+export type TopLevelObject = z.infer<typeof TopLevelObjectSchema>;
1717
18-export const TopLevelSchema = z.union([z.null(), z.array(z.union([z.null(), z.array(z.any()), z.boolean(), TopLevelClassSchema, z.number(), z.string()])), z.boolean(), z.number(), z.number().int(), z.record(z.string(), z.any()), z.string()]);
18+export const TopLevelSchema = z.union([z.null(), z.array(z.union([z.null(), z.array(z.any()), z.boolean(), z.number(), TopLevelObjectSchema, z.string()])), z.boolean(), z.number(), z.number().int(), z.record(z.string(), z.any()), z.string()]);
1919 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/ref-id-files.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -3,5 +3,5 @@ import * as z from "zod";
33
44 export const TopLevelSchema = z.object({
55 "foo": z.number().int(),
6-});
6+}).passthrough();
77 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/ref-remote.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -7,5 +7,5 @@ export type TopLevel = {
77 export const TopLevelSchema: z.ZodType<TopLevel> = z.lazy(() =>
88 z.object({
99 "next": TopLevelSchema.optional(),
10- })
10+ }).passthrough()
1111 );
Test case

test/inputs/schema/renaming-bug.schema

1 generated file · +15 −15
Mschema-typescript-zoddefault / TopLevel.ts+15 −15
@@ -5,9 +5,9 @@ export const AxisSchema = z.enum([
55 "X",
66 "Y",
77 "Z",
8- "XY",
98 "YZ",
109 "ZX",
10+ "XY",
1111 ]);
1212 export type Axis = z.infer<typeof AxisSchema>;
1313
@@ -27,53 +27,53 @@ export type Name = z.infer<typeof NameSchema>;
2727
2828 export const ColorSchema = z.object({
2929 "rgb": z.number().optional(),
30-});
30+}).passthrough();
3131 export type Color = z.infer<typeof ColorSchema>;
3232
3333 export const CircularShapeSchema = z.object({
3434 "shapeName": z.string().optional(),
35-});
35+}).passthrough();
3636 export type CircularShape = z.infer<typeof CircularShapeSchema>;
3737
3838 export const PartSchema = z.object({
3939 "depth": z.string().optional(),
4040 "length": z.string().optional(),
4141 "width": z.string().optional(),
42-});
42+}).passthrough();
4343 export type Part = z.infer<typeof PartSchema>;
4444
4545 export const HistorySchema = z.object({
4646 "class": z.string().optional(),
47-});
47+}).passthrough();
4848 export type History = z.infer<typeof HistorySchema>;
4949
5050 export const LimitSchema = z.object({
5151 "maximum": z.number().optional(),
5252 "minimum": z.number().optional(),
53-});
53+}).passthrough();
5454 export type Limit = z.infer<typeof LimitSchema>;
5555
5656 export const VehicleTypeSchema = z.object({
5757 "name": NameSchema.optional(),
5858 "width": AxisSchema.optional(),
5959 "length": AxisSchema.optional(),
60-});
60+}).passthrough();
6161 export type VehicleType = z.infer<typeof VehicleTypeSchema>;
6262
6363 export const RectShapeSchema = z.object({
6464 "parts": z.array(PartSchema).optional(),
65-});
65+}).passthrough();
6666 export type RectShape = z.infer<typeof RectShapeSchema>;
6767
6868 export const SpeedSchema = z.object({
6969 "velocity": LimitSchema.optional(),
70-});
70+}).passthrough();
7171 export type Speed = z.infer<typeof SpeedSchema>;
7272
7373 export const GeometrySchema = z.object({
7474 "rectShape": RectShapeSchema.optional(),
7575 "circularShape": z.array(CircularShapeSchema).optional(),
76-});
76+}).passthrough();
7777 export type Geometry = z.infer<typeof GeometrySchema>;
7878
7979 export const VehicleSchema = z.object({
@@ -83,32 +83,32 @@ export const VehicleSchema = z.object({
8383 "subModule": z.boolean().optional(),
8484 "type": VehicleTypeSchema.optional(),
8585 "year": z.string().optional(),
86-});
86+}).passthrough();
8787 export type Vehicle = z.infer<typeof VehicleSchema>;
8888
8989 export const ShapeSchema = z.object({
9090 "geometry": GeometrySchema.optional(),
9191 "history": HistorySchema.optional(),
92-});
92+}).passthrough();
9393 export type Shape = z.infer<typeof ShapeSchema>;
9494
9595 export const BerrySchema = z.object({
9696 "color": ColorSchema.optional(),
9797 "name": z.string().min(1).optional(),
9898 "shapes": z.array(ShapeSchema).optional(),
99-});
99+}).passthrough();
100100 export type Berry = z.infer<typeof BerrySchema>;
101101
102102 export const FruitSchema = z.object({
103103 "apple": z.boolean().optional(),
104104 "berries": z.array(BerrySchema).optional(),
105105 "orange": z.boolean().optional(),
106-});
106+}).passthrough();
107107 export type Fruit = z.infer<typeof FruitSchema>;
108108
109109 export const TopLevelSchema = z.object({
110110 "version": z.string().regex(new RegExp("^\\d{1,5}.{1}\\d{1,5}.{1}\\d{1,5}$")).optional(),
111111 "fruits": z.array(FruitSchema).optional(),
112112 "vehicles": z.array(VehicleSchema).optional(),
113-});
113+}).passthrough();
114114 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/required-draft3.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -3,5 +3,5 @@ import * as z from "zod";
33
44 export const TopLevelSchema = z.object({
55 "longitude": z.number(),
6-});
6+}).passthrough();
77 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/required-non-properties.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -4,5 +4,5 @@ import * as z from "zod";
44 export const TopLevelSchema = z.object({
55 "foo": z.number().int(),
66 "bar": z.any(),
7-});
7+}).passthrough();
88 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/required.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -3,5 +3,5 @@ import * as z from "zod";
33
44 export const TopLevelSchema = z.object({
55 "longitude": z.number(),
6-});
6+}).passthrough();
77 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/rust-cycle-breaker-union.schema

1 generated file · +3 −3
Mschema-typescript-zoddefault / TopLevel.ts+3 −3
@@ -2,18 +2,18 @@ import * as z from "zod";
22
33
44 export type Node = {
5- "next"?: Node | null | string;
5+ "next"?: null | Node | string;
66 "value": string;
77 };
88 export const NodeSchema: z.ZodType<Node> = z.lazy(() =>
99 z.object({
1010 "next": z.union([z.null(), NodeSchema, z.string()]).optional(),
1111 "value": z.string(),
12- })
12+ }).passthrough()
1313 );
1414
1515 export const TopLevelSchema = z.object({
1616 "next": z.union([z.null(), NodeSchema, z.string()]).optional(),
1717 "value": z.string(),
18-});
18+}).passthrough();
1919 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/schema-constraints.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -4,5 +4,5 @@ import * as z from "zod";
44 export const TopLevelSchema = z.object({
55 "minMaxLength": z.string().min(5).max(5),
66 "percent": z.number().min(0).max(1),
7-});
7+}).passthrough();
88 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/simple-ref.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -7,5 +7,5 @@ export type TopLevel = {
77 export const TopLevelSchema: z.ZodType<TopLevel> = z.lazy(() =>
88 z.object({
99 "next": TopLevelSchema.optional(),
10- })
10+ }).passthrough()
1111 );
Test case

test/inputs/schema/strict-optional.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -3,5 +3,5 @@ import * as z from "zod";
33
44 export const TopLevelSchema = z.object({
55 "foo": z.union([z.null(), z.number()]),
6-});
6+}).passthrough();
77 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/top-level-array.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -4,7 +4,7 @@ import * as z from "zod";
44 export const TextClassificationOutputElementSchema = z.object({
55 "label": z.string(),
66 "score": z.number(),
7-});
7+}).passthrough();
88 export type TextClassificationOutputElement = z.infer<typeof TextClassificationOutputElementSchema>;
99
1010 export const TopLevelSchema = z.array(TextClassificationOutputElementSchema);
Test case

test/inputs/schema/tuple.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -3,5 +3,5 @@ import * as z from "zod";
33
44 export const TopLevelSchema = z.object({
55 "tuple": z.array(z.union([z.boolean(), z.number().int()])),
6-});
6+}).passthrough();
77 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/unevaluated-properties.schema

1 generated file · +4 −4
Mschema-typescript-zoddefault / TopLevel.ts+4 −4
@@ -2,23 +2,23 @@ import * as z from "zod";
22
33
44 export const ClosedClassSchema = z.object({
5-});
5+}).strict();
66 export type ClosedClass = z.infer<typeof ClosedClassSchema>;
77
88 export const ItemSchema = z.object({
99 "key": z.string(),
1010 "value": z.string(),
11-});
11+}).passthrough();
1212 export type Item = z.infer<typeof ItemSchema>;
1313
1414 export const ConfigSchema = z.object({
1515 "closed": z.union([z.null(), z.array(z.any()), z.boolean(), ClosedClassSchema, z.number(), z.number().int(), z.string()]).optional(),
1616 "name": z.string().optional(),
1717 "settings": z.record(z.string(), z.array(ItemSchema)).optional(),
18-});
18+}).passthrough();
1919 export type Config = z.infer<typeof ConfigSchema>;
2020
2121 export const TopLevelSchema = z.object({
2222 "config": ConfigSchema.optional(),
23-});
23+}).passthrough();
2424 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/union-int-double.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -3,5 +3,5 @@ import * as z from "zod";
33
44 export const TopLevelSchema = z.object({
55 "value": z.union([z.number(), z.string()]),
6-});
6+}).passthrough();
77 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/union-list.schema

1 generated file · +2 −2
Mschema-typescript-zoddefault / TopLevel.ts+2 −2
@@ -7,10 +7,10 @@ export type UnionListClass = {
77 export const UnionListClassSchema: z.ZodType<UnionListClass> = z.lazy(() =>
88 z.object({
99 "next": z.union([UnionListClassSchema, z.number()]),
10- })
10+ }).strict()
1111 );
1212
1313 export const TopLevelSchema = z.object({
1414 "list": z.union([UnionListClassSchema, z.number()]),
15-});
15+}).strict();
1616 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/union.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -5,7 +5,7 @@ export const TopLevelElementSchema = z.object({
55 "one": z.number().int().optional(),
66 "two": z.boolean(),
77 "three": z.number().optional(),
8-});
8+}).passthrough();
99 export type TopLevelElement = z.infer<typeof TopLevelElementSchema>;
1010
1111 export const TopLevelSchema = z.array(TopLevelElementSchema);
Test case

test/inputs/schema/uuid.schema

1 generated file · +1 −1
Mschema-typescript-zoddefault / TopLevel.ts+1 −1
@@ -13,5 +13,5 @@ export const TopLevelSchema = z.object({
1313 "one": z.string().uuid(),
1414 "optional": z.string().uuid().optional(),
1515 "unionWithEnum": z.union([UnionWithEnumEnumSchema, z.string().uuid()]),
16-});
16+}).passthrough();
1717 export type TopLevel = z.infer<typeof TopLevelSchema>;
Test case

test/inputs/schema/vega-lite.schema

1 generated file · +132 −105
Mschema-typescript-zoddefault / TopLevel.ts+132 −105
@@ -597,7 +597,7 @@ export const SelectionSchema: z.ZodType<Selection> = z.lazy(() =>
597597 "not": z.union([SelectionSchema, z.string()]).optional(),
598598 "and": z.array(z.union([SelectionSchema, z.string()])).optional(),
599599 "or": z.array(z.union([SelectionSchema, z.string()])).optional(),
600- })
600+ }).strict()
601601 );
602602
603603 export type Predicate = {
@@ -622,7 +622,7 @@ export const PredicateSchema: z.ZodType<Predicate> = z.lazy(() =>
622622 "range": z.array(z.union([z.null(), DateTimeSchema, z.number()])).min(2).max(2).optional(),
623623 "oneOf": z.array(z.union([z.boolean(), DateTimeSchema, z.number(), z.string()])).optional(),
624624 "selection": z.union([SelectionSchema, z.string()]).optional(),
625- })
625+ }).strict()
626626 );
627627
628628 export type Spec = {
@@ -665,7 +665,7 @@ export const SpecSchema: z.ZodType<Spec> = z.lazy(() =>
665665 "repeat": RepeatSchema.optional(),
666666 "vconcat": z.array(SpecSchema).optional(),
667667 "hconcat": z.array(SpecSchema).optional(),
668- })
668+ }).strict()
669669 );
670670
671671 export type LayerSpec = {
@@ -698,14 +698,14 @@ export const LayerSpecSchema: z.ZodType<LayerSpec> = z.lazy(() =>
698698 "mark": z.union([MarkDefSchema, MarkSchema]).optional(),
699699 "projection": ProjectionSchema.optional(),
700700 "selection": z.record(z.string(), SelectionDefSchema).optional(),
701- })
701+ }).strict()
702702 );
703703
704704 export const AutoSizeParamsSchema = z.object({
705705 "contains": ContainsSchema.optional(),
706706 "resize": z.boolean().optional(),
707707 "type": AutosizeTypeSchema.optional(),
708-});
708+}).strict();
709709 export type AutoSizeParams = z.infer<typeof AutoSizeParamsSchema>;
710710
711711 export const MarkConfigSchema = z.object({
@@ -739,7 +739,7 @@ export const MarkConfigSchema = z.object({
739739 "tension": z.number().min(0).max(1).optional(),
740740 "text": z.string().optional(),
741741 "theta": z.number().optional(),
742-});
742+}).strict();
743743 export type MarkConfig = z.infer<typeof MarkConfigSchema>;
744744
745745 export const AxisConfigSchema = z.object({
@@ -782,7 +782,7 @@ export const AxisConfigSchema = z.object({
782782 "titlePadding": z.number().optional(),
783783 "titleX": z.number().optional(),
784784 "titleY": z.number().optional(),
785-});
785+}).strict();
786786 export type AxisConfig = z.infer<typeof AxisConfigSchema>;
787787
788788 export const VgAxisConfigSchema = z.object({
@@ -824,7 +824,7 @@ export const VgAxisConfigSchema = z.object({
824824 "titlePadding": z.number().optional(),
825825 "titleX": z.number().optional(),
826826 "titleY": z.number().optional(),
827-});
827+}).strict();
828828 export type VgAxisConfig = z.infer<typeof VgAxisConfigSchema>;
829829
830830 export const BarConfigSchema = z.object({
@@ -861,7 +861,7 @@ export const BarConfigSchema = z.object({
861861 "tension": z.number().min(0).max(1).optional(),
862862 "text": z.string().optional(),
863863 "theta": z.number().optional(),
864-});
864+}).strict();
865865 export type BarConfig = z.infer<typeof BarConfigSchema>;
866866
867867 export const LegendConfigSchema = z.object({
@@ -901,7 +901,7 @@ export const LegendConfigSchema = z.object({
901901 "titleFontWeight": z.union([z.number(), z.string()]).optional(),
902902 "titleLimit": z.number().optional(),
903903 "titlePadding": z.number().optional(),
904-});
904+}).strict();
905905 export type LegendConfig = z.infer<typeof LegendConfigSchema>;
906906
907907 export const PaddingClassSchema = z.object({
@@ -909,35 +909,28 @@ export const PaddingClassSchema = z.object({
909909 "left": z.number().optional(),
910910 "right": z.number().optional(),
911911 "top": z.number().optional(),
912-});
912+}).strict();
913913 export type PaddingClass = z.infer<typeof PaddingClassSchema>;
914914
915-export const ProjectionConfigSchema = z.object({
916- "center": z.array(z.number()).optional(),
917- "clipAngle": z.number().optional(),
918- "clipExtent": z.array(z.array(z.number())).optional(),
919- "coefficient": z.number().optional(),
920- "distance": z.number().optional(),
921- "fraction": z.number().optional(),
922- "lobes": z.number().optional(),
923- "parallel": z.number().optional(),
924- "precision": z.record(z.string(), z.union([z.number(), z.string()])).optional(),
925- "radius": z.number().optional(),
926- "ratio": z.number().optional(),
927- "rotate": z.array(z.number()).optional(),
928- "spacing": z.number().optional(),
929- "tilt": z.number().optional(),
930- "type": VgProjectionTypeSchema.optional(),
931-});
932-export type ProjectionConfig = z.infer<typeof ProjectionConfigSchema>;
915+export const PurplePrecisionSchema = z.object({
916+ "length": z.number(),
917+}).catchall(z.string());
918+export type PurplePrecision = z.infer<typeof PurplePrecisionSchema>;
933919
934-export const VgSchemeSchema = z.object({
920+export const CategoryVgSchemeSchema = z.object({
921+ "count": z.number().optional(),
922+ "extent": z.array(z.number()).optional(),
923+ "scheme": z.string(),
924+}).strict();
925+export type CategoryVgScheme = z.infer<typeof CategoryVgSchemeSchema>;
926+
927+export const RangeConfigValueVgSchemeSchema = z.object({
935928 "count": z.number().optional(),
936929 "extent": z.array(z.number()).optional(),
937930 "scheme": z.string().optional(),
938931 "step": z.number().optional(),
939-});
940-export type VgScheme = z.infer<typeof VgSchemeSchema>;
932+}).strict();
933+export type RangeConfigValueVgScheme = z.infer<typeof RangeConfigValueVgSchemeSchema>;
941934
942935 export const ScaleConfigSchema = z.object({
943936 "bandPaddingInner": z.number().min(0).max(1).optional(),
@@ -959,7 +952,7 @@ export const ScaleConfigSchema = z.object({
959952 "round": z.boolean().optional(),
960953 "textXRangeStep": z.number().min(0).optional(),
961954 "useUnaggregatedDomain": z.boolean().optional(),
962-});
955+}).strict();
963956 export type ScaleConfig = z.infer<typeof ScaleConfigSchema>;
964957
965958 export const BrushConfigSchema = z.object({
@@ -970,7 +963,7 @@ export const BrushConfigSchema = z.object({
970963 "strokeDashOffset": z.number().optional(),
971964 "strokeOpacity": z.number().optional(),
972965 "strokeWidth": z.number().optional(),
973-});
966+}).strict();
974967 export type BrushConfig = z.infer<typeof BrushConfigSchema>;
975968
976969 export const MultiSelectionConfigSchema = z.object({
@@ -981,7 +974,7 @@ export const MultiSelectionConfigSchema = z.object({
981974 "on": z.any().optional(),
982975 "resolve": SelectionResolutionSchema.optional(),
983976 "toggle": z.union([z.boolean(), z.string()]).optional(),
984-});
977+}).strict();
985978 export type MultiSelectionConfig = z.infer<typeof MultiSelectionConfigSchema>;
986979
987980 export const VgBindingSchema = z.object({
@@ -991,7 +984,7 @@ export const VgBindingSchema = z.object({
991984 "max": z.number().optional(),
992985 "min": z.number().optional(),
993986 "step": z.number().optional(),
994-});
987+}).strict();
995988 export type VgBinding = z.infer<typeof VgBindingSchema>;
996989
997990 export const VgMarkConfigSchema = z.object({
@@ -1023,7 +1016,7 @@ export const VgMarkConfigSchema = z.object({
10231016 "tension": z.number().min(0).max(1).optional(),
10241017 "text": z.string().optional(),
10251018 "theta": z.number().optional(),
1026-});
1019+}).strict();
10271020 export type VgMarkConfig = z.infer<typeof VgMarkConfigSchema>;
10281021
10291022 export const TextConfigSchema = z.object({
@@ -1058,7 +1051,7 @@ export const TextConfigSchema = z.object({
10581051 "tension": z.number().min(0).max(1).optional(),
10591052 "text": z.string().optional(),
10601053 "theta": z.number().optional(),
1061-});
1054+}).strict();
10621055 export type TextConfig = z.infer<typeof TextConfigSchema>;
10631056
10641057 export const TickConfigSchema = z.object({
@@ -1094,7 +1087,7 @@ export const TickConfigSchema = z.object({
10941087 "text": z.string().optional(),
10951088 "theta": z.number().optional(),
10961089 "thickness": z.number().min(0).optional(),
1097-});
1090+}).strict();
10981091 export type TickConfig = z.infer<typeof TickConfigSchema>;
10991092
11001093 export const VgTitleConfigSchema = z.object({
@@ -1108,7 +1101,7 @@ export const VgTitleConfigSchema = z.object({
11081101 "limit": z.number().min(0).optional(),
11091102 "offset": z.number().optional(),
11101103 "orient": TitleOrientSchema.optional(),
1111-});
1104+}).strict();
11121105 export type VgTitleConfig = z.infer<typeof VgTitleConfigSchema>;
11131106
11141107 export const ViewConfigSchema = z.object({
@@ -1122,7 +1115,7 @@ export const ViewConfigSchema = z.object({
11221115 "strokeOpacity": z.number().optional(),
11231116 "strokeWidth": z.number().optional(),
11241117 "width": z.number().optional(),
1125-});
1118+}).strict();
11261119 export type ViewConfig = z.infer<typeof ViewConfigSchema>;
11271120
11281121 export const DataFormatSchema = z.object({
@@ -1131,7 +1124,7 @@ export const DataFormatSchema = z.object({
11311124 "property": z.string().optional(),
11321125 "feature": z.string().optional(),
11331126 "mesh": z.string().optional(),
1134-});
1127+}).strict();
11351128 export type DataFormat = z.infer<typeof DataFormatSchema>;
11361129
11371130 export const BinParamsSchema = z.object({
@@ -1143,14 +1136,14 @@ export const BinParamsSchema = z.object({
11431136 "nice": z.boolean().optional(),
11441137 "step": z.number().optional(),
11451138 "steps": z.array(z.number()).min(1).optional(),
1146-});
1139+}).strict();
11471140 export type BinParams = z.infer<typeof BinParamsSchema>;
11481141
11491142 export const ConditionalValueDefSchema = z.object({
11501143 "test": z.union([PredicateSchema, z.string()]).optional(),
11511144 "value": z.union([z.boolean(), z.number(), z.string()]),
11521145 "selection": z.union([SelectionSchema, z.string()]).optional(),
1153-});
1146+}).strict();
11541147 export type ConditionalValueDef = z.infer<typeof ConditionalValueDefSchema>;
11551148
11561149 export const DateTimeSchema = z.object({
@@ -1164,12 +1157,12 @@ export const DateTimeSchema = z.object({
11641157 "seconds": z.number().min(0).max(59).optional(),
11651158 "utc": z.boolean().optional(),
11661159 "year": z.number().optional(),
1167-});
1160+}).strict();
11681161 export type DateTime = z.infer<typeof DateTimeSchema>;
11691162
11701163 export const RepeatRefSchema = z.object({
11711164 "repeat": RepeatEnumSchema,
1172-});
1165+}).strict();
11731166 export type RepeatRef = z.infer<typeof RepeatRefSchema>;
11741167
11751168 export const LegendSchema = z.object({
@@ -1183,46 +1176,46 @@ export const LegendSchema = z.object({
11831176 "type": LegendTypeSchema.optional(),
11841177 "values": z.array(z.union([DateTimeSchema, z.number(), z.string()])).optional(),
11851178 "zindex": z.number().min(0).optional(),
1186-});
1179+}).strict();
11871180 export type Legend = z.infer<typeof LegendSchema>;
11881181
11891182 export const DomainClassSchema = z.object({
11901183 "field": z.string().optional(),
11911184 "selection": z.string(),
11921185 "encoding": z.string().optional(),
1193-});
1186+}).strict();
11941187 export type DomainClass = z.infer<typeof DomainClassSchema>;
11951188
11961189 export const InterpolateParamsSchema = z.object({
11971190 "gamma": z.number().optional(),
11981191 "type": InterpolateParamsTypeSchema,
1199-});
1192+}).strict();
12001193 export type InterpolateParams = z.infer<typeof InterpolateParamsSchema>;
12011194
12021195 export const NiceClassSchema = z.object({
12031196 "interval": z.string(),
12041197 "step": z.number(),
1205-});
1198+}).strict();
12061199 export type NiceClass = z.infer<typeof NiceClassSchema>;
12071200
12081201 export const SchemeParamsSchema = z.object({
12091202 "extent": z.array(z.number()).optional(),
12101203 "name": z.string(),
1211-});
1204+}).strict();
12121205 export type SchemeParams = z.infer<typeof SchemeParamsSchema>;
12131206
12141207 export const SortFieldSchema = z.object({
12151208 "field": z.union([RepeatRefSchema, z.string()]).optional(),
12161209 "op": AggregateOpSchema,
12171210 "order": z.union([z.null(), SortEnumSchema]).optional(),
1218-});
1211+}).strict();
12191212 export type SortField = z.infer<typeof SortFieldSchema>;
12201213
12211214 export const HeaderSchema = z.object({
12221215 "format": z.string().optional(),
12231216 "labelAngle": z.number().min(-360).max(360).optional(),
12241217 "title": z.union([z.null(), z.string()]).optional(),
1225-});
1218+}).strict();
12261219 export type Header = z.infer<typeof HeaderSchema>;
12271220
12281221 export const FieldDefSchema = z.object({
@@ -1231,7 +1224,7 @@ export const FieldDefSchema = z.object({
12311224 "field": z.union([RepeatRefSchema, z.string()]).optional(),
12321225 "timeUnit": TimeUnitSchema.optional(),
12331226 "type": TypeSchema,
1234-});
1227+}).strict();
12351228 export type FieldDef = z.infer<typeof FieldDefSchema>;
12361229
12371230 export const ConditionalPredicateFieldDefClassSchema = z.object({
@@ -1243,7 +1236,7 @@ export const ConditionalPredicateFieldDefClassSchema = z.object({
12431236 "field": z.union([RepeatRefSchema, z.string()]).optional(),
12441237 "timeUnit": TimeUnitSchema.optional(),
12451238 "type": TypeSchema.optional(),
1246-});
1239+}).strict();
12471240 export type ConditionalPredicateFieldDefClass = z.infer<typeof ConditionalPredicateFieldDefClassSchema>;
12481241
12491242 export const OrderFieldDefSchema = z.object({
@@ -1253,7 +1246,7 @@ export const OrderFieldDefSchema = z.object({
12531246 "sort": z.union([z.null(), SortEnumSchema]).optional(),
12541247 "timeUnit": TimeUnitSchema.optional(),
12551248 "type": TypeSchema,
1256-});
1249+}).strict();
12571250 export type OrderFieldDef = z.infer<typeof OrderFieldDefSchema>;
12581251
12591252 export const ConditionalPredicateTextFieldDefClassSchema = z.object({
@@ -1266,7 +1259,7 @@ export const ConditionalPredicateTextFieldDefClassSchema = z.object({
12661259 "format": z.string().optional(),
12671260 "timeUnit": TimeUnitSchema.optional(),
12681261 "type": TypeSchema.optional(),
1269-});
1262+}).strict();
12701263 export type ConditionalPredicateTextFieldDefClass = z.infer<typeof ConditionalPredicateTextFieldDefClassSchema>;
12711264
12721265 export const AxisSchema = z.object({
@@ -1292,7 +1285,7 @@ export const AxisSchema = z.object({
12921285 "titlePadding": z.number().optional(),
12931286 "values": z.array(z.union([DateTimeSchema, z.number()])).optional(),
12941287 "zindex": z.number().min(0).optional(),
1295-});
1288+}).strict();
12961289 export type Axis = z.infer<typeof AxisSchema>;
12971290
12981291 export const X2ClassSchema = z.object({
@@ -1302,7 +1295,7 @@ export const X2ClassSchema = z.object({
13021295 "timeUnit": TimeUnitSchema.optional(),
13031296 "type": TypeSchema.optional(),
13041297 "value": z.union([z.boolean(), z.number(), z.string()]).optional(),
1305-});
1298+}).strict();
13061299 export type X2Class = z.infer<typeof X2ClassSchema>;
13071300
13081301 export const MarkDefSchema = z.object({
@@ -1339,32 +1332,18 @@ export const MarkDefSchema = z.object({
13391332 "text": z.string().optional(),
13401333 "theta": z.number().optional(),
13411334 "type": MarkSchema,
1342-});
1335+}).strict();
13431336 export type MarkDef = z.infer<typeof MarkDefSchema>;
13441337
1345-export const ProjectionSchema = z.object({
1346- "center": z.array(z.number()).optional(),
1347- "clipAngle": z.number().optional(),
1348- "clipExtent": z.array(z.array(z.number())).optional(),
1349- "coefficient": z.number().optional(),
1350- "distance": z.number().optional(),
1351- "fraction": z.number().optional(),
1352- "lobes": z.number().optional(),
1353- "parallel": z.number().optional(),
1354- "precision": z.record(z.string(), z.union([z.number(), z.string()])).optional(),
1355- "radius": z.number().optional(),
1356- "ratio": z.number().optional(),
1357- "rotate": z.array(z.number()).optional(),
1358- "spacing": z.number().optional(),
1359- "tilt": z.number().optional(),
1360- "type": VgProjectionTypeSchema.optional(),
1361-});
1362-export type Projection = z.infer<typeof ProjectionSchema>;
1338+export const FluffyPrecisionSchema = z.object({
1339+ "length": z.number(),
1340+}).catchall(z.string());
1341+export type FluffyPrecision = z.infer<typeof FluffyPrecisionSchema>;
13631342
13641343 export const AxisResolveMapSchema = z.object({
13651344 "x": ResolveModeSchema.optional(),
13661345 "y": ResolveModeSchema.optional(),
1367-});
1346+}).strict();
13681347 export type AxisResolveMap = z.infer<typeof AxisResolveMapSchema>;
13691348
13701349 export const LegendResolveMapSchema = z.object({
@@ -1372,7 +1351,7 @@ export const LegendResolveMapSchema = z.object({
13721351 "opacity": ResolveModeSchema.optional(),
13731352 "shape": ResolveModeSchema.optional(),
13741353 "size": ResolveModeSchema.optional(),
1375-});
1354+}).strict();
13761355 export type LegendResolveMap = z.infer<typeof LegendResolveMapSchema>;
13771356
13781357 export const ScaleResolveMapSchema = z.object({
@@ -1382,7 +1361,7 @@ export const ScaleResolveMapSchema = z.object({
13821361 "size": ResolveModeSchema.optional(),
13831362 "x": ResolveModeSchema.optional(),
13841363 "y": ResolveModeSchema.optional(),
1385-});
1364+}).strict();
13861365 export type ScaleResolveMap = z.infer<typeof ScaleResolveMapSchema>;
13871366
13881367 export const SelectionDefSchema = z.object({
@@ -1398,7 +1377,7 @@ export const SelectionDefSchema = z.object({
13981377 "mark": BrushConfigSchema.optional(),
13991378 "translate": z.union([z.boolean(), z.string()]).optional(),
14001379 "zoom": z.union([z.boolean(), z.string()]).optional(),
1401-});
1380+}).strict();
14021381 export type SelectionDef = z.infer<typeof SelectionDefSchema>;
14031382
14041383 export const TitleParamsSchema = z.object({
@@ -1407,22 +1386,51 @@ export const TitleParamsSchema = z.object({
14071386 "orient": TitleOrientSchema.optional(),
14081387 "style": z.union([z.array(z.string()), z.string()]).optional(),
14091388 "text": z.string(),
1410-});
1389+}).strict();
14111390 export type TitleParams = z.infer<typeof TitleParamsSchema>;
14121391
14131392 export const AggregatedFieldDefSchema = z.object({
14141393 "as": z.string(),
14151394 "field": z.string(),
14161395 "op": AggregateOpSchema,
1417-});
1396+}).strict();
14181397 export type AggregatedFieldDef = z.infer<typeof AggregatedFieldDefSchema>;
14191398
14201399 export const RepeatSchema = z.object({
14211400 "column": z.array(z.string()).optional(),
14221401 "row": z.array(z.string()).optional(),
1423-});
1402+}).strict();
14241403 export type Repeat = z.infer<typeof RepeatSchema>;
14251404
1405+export const ProjectionConfigSchema = z.object({
1406+ "center": z.array(z.number()).optional(),
1407+ "clipAngle": z.number().optional(),
1408+ "clipExtent": z.array(z.array(z.number())).optional(),
1409+ "coefficient": z.number().optional(),
1410+ "distance": z.number().optional(),
1411+ "fraction": z.number().optional(),
1412+ "lobes": z.number().optional(),
1413+ "parallel": z.number().optional(),
1414+ "precision": PurplePrecisionSchema.optional(),
1415+ "radius": z.number().optional(),
1416+ "ratio": z.number().optional(),
1417+ "rotate": z.array(z.number()).optional(),
1418+ "spacing": z.number().optional(),
1419+ "tilt": z.number().optional(),
1420+ "type": VgProjectionTypeSchema.optional(),
1421+}).strict();
1422+export type ProjectionConfig = z.infer<typeof ProjectionConfigSchema>;
1423+
1424+export const RangeConfigSchema = z.object({
1425+ "category": z.union([z.array(z.string()), CategoryVgSchemeSchema]).optional(),
1426+ "diverging": z.union([z.array(z.string()), CategoryVgSchemeSchema]).optional(),
1427+ "heatmap": z.union([z.array(z.string()), CategoryVgSchemeSchema]).optional(),
1428+ "ordinal": z.union([z.array(z.string()), CategoryVgSchemeSchema]).optional(),
1429+ "ramp": z.union([z.array(z.string()), CategoryVgSchemeSchema]).optional(),
1430+ "symbol": z.array(z.string()).optional(),
1431+}).catchall(z.union([z.array(z.union([z.number(), z.string()])), RangeConfigValueVgSchemeSchema]));
1432+export type RangeConfig = z.infer<typeof RangeConfigSchema>;
1433+
14261434 export const IntervalSelectionConfigSchema = z.object({
14271435 "bind": BindEnumSchema.optional(),
14281436 "empty": EmptySchema.optional(),
@@ -1433,7 +1441,7 @@ export const IntervalSelectionConfigSchema = z.object({
14331441 "resolve": SelectionResolutionSchema.optional(),
14341442 "translate": z.union([z.boolean(), z.string()]).optional(),
14351443 "zoom": z.union([z.boolean(), z.string()]).optional(),
1436-});
1444+}).strict();
14371445 export type IntervalSelectionConfig = z.infer<typeof IntervalSelectionConfigSchema>;
14381446
14391447 export const SingleSelectionConfigSchema = z.object({
@@ -1444,7 +1452,7 @@ export const SingleSelectionConfigSchema = z.object({
14441452 "nearest": z.boolean().optional(),
14451453 "on": z.any().optional(),
14461454 "resolve": SelectionResolutionSchema.optional(),
1447-});
1455+}).strict();
14481456 export type SingleSelectionConfig = z.infer<typeof SingleSelectionConfigSchema>;
14491457
14501458 export const DataSchema = z.object({
@@ -1452,7 +1460,7 @@ export const DataSchema = z.object({
14521460 "url": z.string().optional(),
14531461 "values": z.union([z.array(z.union([z.boolean(), z.number(), z.record(z.string(), z.any()), z.string()])), z.record(z.string(), z.any()), z.string()]).optional(),
14541462 "name": z.string().optional(),
1455-});
1463+}).strict();
14561464 export type Data = z.infer<typeof DataSchema>;
14571465
14581466 export const ScaleSchema = z.object({
@@ -1471,7 +1479,7 @@ export const ScaleSchema = z.object({
14711479 "scheme": z.union([SchemeParamsSchema, z.string()]).optional(),
14721480 "type": ScaleTypeSchema.optional(),
14731481 "zero": z.boolean().optional(),
1474-});
1482+}).strict();
14751483 export type Scale = z.infer<typeof ScaleSchema>;
14761484
14771485 export const FacetFieldDefSchema = z.object({
@@ -1482,7 +1490,7 @@ export const FacetFieldDefSchema = z.object({
14821490 "sort": z.union([z.null(), SortEnumSchema]).optional(),
14831491 "timeUnit": TimeUnitSchema.optional(),
14841492 "type": TypeSchema,
1485-});
1493+}).strict();
14861494 export type FacetFieldDef = z.infer<typeof FacetFieldDefSchema>;
14871495
14881496 export const DefWithConditionSchema = z.object({
@@ -1493,7 +1501,7 @@ export const DefWithConditionSchema = z.object({
14931501 "timeUnit": TimeUnitSchema.optional(),
14941502 "type": TypeSchema.optional(),
14951503 "value": z.union([z.boolean(), z.number(), z.string()]).optional(),
1496-});
1504+}).strict();
14971505 export type DefWithCondition = z.infer<typeof DefWithConditionSchema>;
14981506
14991507 export const TextDefWithConditionSchema = z.object({
@@ -1505,7 +1513,7 @@ export const TextDefWithConditionSchema = z.object({
15051513 "timeUnit": TimeUnitSchema.optional(),
15061514 "type": TypeSchema.optional(),
15071515 "value": z.union([z.boolean(), z.number(), z.string()]).optional(),
1508-});
1516+}).strict();
15091517 export type TextDefWithCondition = z.infer<typeof TextDefWithConditionSchema>;
15101518
15111519 export const XClassSchema = z.object({
@@ -1519,34 +1527,53 @@ export const XClassSchema = z.object({
15191527 "timeUnit": TimeUnitSchema.optional(),
15201528 "type": TypeSchema.optional(),
15211529 "value": z.union([z.boolean(), z.number(), z.string()]).optional(),
1522-});
1530+}).strict();
15231531 export type XClass = z.infer<typeof XClassSchema>;
15241532
15251533 export const FacetMappingSchema = z.object({
15261534 "column": FacetFieldDefSchema.optional(),
15271535 "row": FacetFieldDefSchema.optional(),
1528-});
1536+}).strict();
15291537 export type FacetMapping = z.infer<typeof FacetMappingSchema>;
15301538
1539+export const ProjectionSchema = z.object({
1540+ "center": z.array(z.number()).optional(),
1541+ "clipAngle": z.number().optional(),
1542+ "clipExtent": z.array(z.array(z.number())).optional(),
1543+ "coefficient": z.number().optional(),
1544+ "distance": z.number().optional(),
1545+ "fraction": z.number().optional(),
1546+ "lobes": z.number().optional(),
1547+ "parallel": z.number().optional(),
1548+ "precision": FluffyPrecisionSchema.optional(),
1549+ "radius": z.number().optional(),
1550+ "ratio": z.number().optional(),
1551+ "rotate": z.array(z.number()).optional(),
1552+ "spacing": z.number().optional(),
1553+ "tilt": z.number().optional(),
1554+ "type": VgProjectionTypeSchema.optional(),
1555+}).strict();
1556+export type Projection = z.infer<typeof ProjectionSchema>;
1557+
15311558 export const ResolveSchema = z.object({
15321559 "axis": AxisResolveMapSchema.optional(),
15331560 "legend": LegendResolveMapSchema.optional(),
15341561 "scale": ScaleResolveMapSchema.optional(),
1535-});
1562+}).strict();
15361563 export type Resolve = z.infer<typeof ResolveSchema>;
15371564
15381565 export const LookupDataSchema = z.object({
15391566 "data": DataSchema,
15401567 "fields": z.array(z.string()).optional(),
15411568 "key": z.string(),
1542-});
1569+}).strict();
15431570 export type LookupData = z.infer<typeof LookupDataSchema>;
15441571
15451572 export const SelectionConfigSchema = z.object({
15461573 "interval": IntervalSelectionConfigSchema.optional(),
15471574 "multi": MultiSelectionConfigSchema.optional(),
15481575 "single": SingleSelectionConfigSchema.optional(),
1549-});
1576+}).strict();
15501577 export type SelectionConfig = z.infer<typeof SelectionConfigSchema>;
15511578
15521579 export const ConditionalPredicateMarkPropFieldDefClassSchema = z.object({
@@ -1561,7 +1588,7 @@ export const ConditionalPredicateMarkPropFieldDefClassSchema = z.object({
15611588 "sort": z.union([z.null(), SortFieldSchema, SortEnumSchema]).optional(),
15621589 "timeUnit": TimeUnitSchema.optional(),
15631590 "type": TypeSchema.optional(),
1564-});
1591+}).strict();
15651592 export type ConditionalPredicateMarkPropFieldDefClass = z.infer<typeof ConditionalPredicateMarkPropFieldDefClassSchema>;
15661593
15671594 export const TransformSchema = z.object({
@@ -1576,7 +1603,7 @@ export const TransformSchema = z.object({
15761603 "timeUnit": TimeUnitSchema.optional(),
15771604 "aggregate": z.array(AggregatedFieldDefSchema).optional(),
15781605 "groupby": z.array(z.string()).optional(),
1579-});
1606+}).strict();
15801607 export type Transform = z.infer<typeof TransformSchema>;
15811608
15821609 export const ConfigSchema = z.object({
@@ -1604,7 +1631,7 @@ export const ConfigSchema = z.object({
16041631 "padding": z.union([PaddingClassSchema, z.number()]).optional(),
16051632 "point": MarkConfigSchema.optional(),
16061633 "projection": ProjectionConfigSchema.optional(),
1607- "range": z.record(z.string(), z.union([z.array(z.union([z.number(), z.string()])), VgSchemeSchema])).optional(),
1634+ "range": RangeConfigSchema.optional(),
16081635 "rect": MarkConfigSchema.optional(),
16091636 "rule": MarkConfigSchema.optional(),
16101637 "scale": ScaleConfigSchema.optional(),
@@ -1617,7 +1644,7 @@ export const ConfigSchema = z.object({
16171644 "timeFormat": z.string().optional(),
16181645 "title": VgTitleConfigSchema.optional(),
16191646 "view": ViewConfigSchema.optional(),
1620-});
1647+}).strict();
16211648 export type Config = z.infer<typeof ConfigSchema>;
16221649
16231650 export const MarkPropDefWithConditionSchema = z.object({
@@ -1631,7 +1658,7 @@ export const MarkPropDefWithConditionSchema = z.object({
16311658 "timeUnit": TimeUnitSchema.optional(),
16321659 "type": TypeSchema.optional(),
16331660 "value": z.union([z.boolean(), z.number(), z.string()]).optional(),
1634-});
1661+}).strict();
16351662 export type MarkPropDefWithCondition = z.infer<typeof MarkPropDefWithConditionSchema>;
16361663
16371664 export const EncodingSchema = z.object({
@@ -1648,7 +1675,7 @@ export const EncodingSchema = z.object({
16481675 "x2": X2ClassSchema.optional(),
16491676 "y": XClassSchema.optional(),
16501677 "y2": X2ClassSchema.optional(),
1651-});
1678+}).strict();
16521679 export type Encoding = z.infer<typeof EncodingSchema>;
16531680
16541681 export const EncodingWithFacetSchema = z.object({
@@ -1667,7 +1694,7 @@ export const EncodingWithFacetSchema = z.object({
16671694 "x2": X2ClassSchema.optional(),
16681695 "y": XClassSchema.optional(),
16691696 "y2": X2ClassSchema.optional(),
1670-});
1697+}).strict();
16711698 export type EncodingWithFacet = z.infer<typeof EncodingWithFacetSchema>;
16721699
16731700 export const TopLevelSchema = z.object({
@@ -1694,5 +1721,5 @@ export const TopLevelSchema = z.object({
16941721 "repeat": RepeatSchema.optional(),
16951722 "vconcat": z.array(SpecSchema).optional(),
16961723 "hconcat": z.array(SpecSchema).optional(),
1697-});
1724+}).strict();
16981725 export type TopLevel = z.infer<typeof TopLevelSchema>;
No generated files match these filters.